Commit 898c9a67 authored by martin hou's avatar martin hou

feat: 补充方法描述

parent 792ac420
......@@ -99,12 +99,13 @@ export type Logger = {
};
declare class Jensen {
constructor(log?: Logger);
constructor(log?: Logger, conn?: USBDevice);
init: () => Promise<boolean>;
connect: () => Promise<void>;
onconnect: () => void;
disconnect: () => void;
ondisconnect?: () => void;
reconnect: () => Promise<boolean>;
isStopConnectionCheck: boolean;
isConnected: () => boolean;
getModel: () => string;
......
......@@ -161,6 +161,7 @@ async function Jensen(log, conn) {
if (device && device.opened) device.close();
device.open();
await setup();
return true;
}
catch(ex)
{
......
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