Skip to content

Commit

Permalink
fix: set flag immediately before executing SoftReset
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone committed Oct 17, 2023
1 parent 8e2e141 commit 676faa4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/zwave-js/src/lib/driver/Driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2519,15 +2519,6 @@ export class Driver extends TypedEventEmitter<DriverEventCallbacks>
await this.sendMessage(new SoftResetRequest(this), {
supportCheck: false,
pauseSendThread: true,
// Work around an issue in the 700 series firmware where the ACK after a soft-reset has a random high nibble
onProgress: (progress) => {
// This was broken in 7.19, not fixed so far
if (this.controller.sdkVersionGte("7.19.0")) {
if (progress.state === TransactionState.Active) {
this.serial?.ignoreAckHighNibbleOnce();
}
}
},
});
} catch (e) {
this.controllerLog.print(
Expand Down Expand Up @@ -5022,6 +5013,15 @@ ${handlers.length} left`,

const result = createDeferredPromise<Message | undefined>();

// Work around an issue in the 700 series firmware where the ACK after a soft-reset has a random high nibble.
// This was broken in 7.19, not fixed so far
if (
msg.functionType === FunctionType.SoftReset
&& this.controller.sdkVersionGte("7.19.0")
) {
this.serial?.ignoreAckHighNibbleOnce();
}

this.serialAPIInterpreter = interpret(machine).onDone((evt) => {
this.serialAPIInterpreter?.stop();
this.serialAPIInterpreter = undefined;
Expand Down

0 comments on commit 676faa4

Please sign in to comment.