Commit 968016cc authored by martin hou's avatar martin hou

fix: 删除async关键字

parent 3e0e948c
......@@ -175,20 +175,24 @@ export function Home() {
});
}
const writeSN = async () => {
let nsn = prompt('请输入新的SN号', '');
if (nsn && nsn.match(/^HD(H1|1E|P1)\w{9}$/gi))
{
let rst = await jensen.writeSerialNumber(nsn);
alert(rst.result);
}
}
return (
<>
<div style={{ display: 'flex', flexDirection: 'row', gap: '16px', padding: '16px', alignItems: 'center' }}>
<button style={{ width: '200px', height: '50px' }} onClick={connect}>
Connect
</button>
<button style={{ width: '200px', height: '50px' }} onClick={getFilePart}>
get File Part
</button>
<button style={{ width: '200px', height: '50px' }} onClick={getTime}>
Get Time
</button>
<button style={{ width: '200px', height: '50px' }} onClick={listFiles}>List Files</button>
<button style={{ width: '200px', height: '50px' }} onClick={transferFile}>Transfer File</button>
<button style={{ width: '200px', height: '50px' }} onClick={connect}>连接</button>
<button style={{ width: '200px', height: '50px' }} onClick={getFilePart}>获取文件</button>
<button style={{ width: '200px', height: '50px' }} onClick={writeSN}>SN写号</button>
<button style={{ width: '200px', height: '50px' }} onClick={getTime}>获取时间</button>
<button style={{ width: '200px', height: '50px' }} onClick={listFiles}>文件列表</button>
<button style={{ width: '200px', height: '50px' }} onClick={transferFile}>传输文件</button>
<button style={{ width: '200px', height: '50px' }} onClick={getBluetoothStatus}>蓝牙连接状态</button>
<button style={{ width : '200px', height : '50px' }} onClick={bluetoothScan}>蓝牙扫描</button>
<button style={{ width : '200px', height : '50px' }} onClick={disconnectBTDevice}>蓝牙断开</button>
......
......@@ -71,7 +71,7 @@ const COMMAND_NAMES = {
let Logger = null;
async function Jensen(log, conn) {
function Jensen(log, conn) {
Logger = log || internalLogger;
let device = conn;
let actions = {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment