Skip to content

Commit

Permalink
Fix grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
devbis authored and G1K committed Oct 21, 2020
1 parent a4a79de commit bd5c5b4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/adapter/zigate/adapter/zigateAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ class ZiGateAdapter extends Adapter {
debug.log('start', arguments)
let startResult: TsType.StartResult = 'resumed';
try {
await this.driver.open();
debug.log("well connected to zigate key.", arguments);
debug.log("connected to zigate adapter successfully.", arguments);
await this.driver.sendCommand(ZiGateCommandCode.SetDeviceType, {deviceType: 0});

const resetResponse = await this.driver.sendCommand(ZiGateCommandCode.Reset, {}, 5000)
if (resetResponse.code === ZiGateMessageCode.RestartNonFactoryNew) {
Expand All @@ -133,9 +133,8 @@ class ZiGateAdapter extends Adapter {
});
await this.driver.sendCommand(ZiGateCommandCode.RawMode, {enabled: 0x01});
await this.initNetwork();
} catch (error) {
debug.error('%o', error);
throw new Error("don't connected to zigate key");
} catch(error) {
throw new Error("failed to connect to zigate adapter\n %o", error);
}

return startResult; // 'resumed' | 'reset' | 'restored'
Expand Down

0 comments on commit bd5c5b4

Please sign in to comment.