Skip to content

Change fw updater success condition #493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 28, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
change fw updater success condition
  • Loading branch information
Alberto Iannaccone committed Apr 28, 2021
commit dbca201408d29cb1b4b3be3442d92f39c01c343c
10 changes: 6 additions & 4 deletions src/firmware-updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,16 @@ export default class FirmwareUpdater {

const handleFirmwareUpdateMessage = message => {
switch (message.ProgrammerStatus) {
case 'Busy':
if (message.Msg.indexOf('Operation completed: success! :-)') >= 0) {
this.updating.next({ status: this.updateStatusEnum.DONE });
updateFirmwareMessagesSubscription.unsubscribe();
}
break;
case 'Error':
this.updating.next({ status: this.updateStatusEnum.ERROR, err: `Can't update Firmware: ${message.Msg}` });
updateFirmwareMessagesSubscription.unsubscribe();
break;
case 'Done':
this.updating.next({ status: this.updateStatusEnum.DONE });
updateFirmwareMessagesSubscription.unsubscribe();
break;
default:
break;
}
Expand Down