Commit 48571810 authored by martin hou's avatar martin hou

增加productId跟踪

parent 1d2ac0d5
......@@ -40,6 +40,11 @@ export function Home() {
setGreeting(null)
}
const connect = async () => {
await jensen.connect();
alert(jensen.getModel() + ' connected')
}
const disconnectBTDevice = async () => {
let r = await jensen.disconnectBTDevice();
console.log(r);
......@@ -168,7 +173,7 @@ export function Home() {
return (
<>
<div style={{ display: 'flex', flexDirection: 'row', gap: '16px', padding: '16px', alignItems: 'center' }}>
<button style={{ width: '200px', height: '50px' }} onClick={() => jensen.connect()}>
<button style={{ width: '200px', height: '50px' }} onClick={connect}>
Connect
</button>
<button style={{ width: '200px', height: '50px' }} onClick={getFilePart}>
......
......@@ -137,6 +137,7 @@ function Jensen(log) {
: device.productId == 0xb00e
? 'hidock-p1'
: device.productId == 0xb00f ? 'hidock-p1:mini' : 'unknown';
console.log('device pid: ' + device.productId);
} catch (e) {
Logger.error('jensen', 'setup', String(e));
}
......
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