From b68cb7c894afe6cd0e4fd649c7b0d09dfed01567 Mon Sep 17 00:00:00 2001 From: kylebonnici Date: Wed, 29 May 2024 23:25:18 +0200 Subject: [PATCH] Feat: update shared --- package-lock.json | 6 +++--- src/actions/jlinkTargetActions.ts | 27 +++++++-------------------- src/components/ControlPanel.tsx | 2 +- src/reducers/settingsReducer.ts | 1 + 4 files changed, 12 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index c240f167..2b3a8c6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pc-nrfconnect-programmer", - "version": "4.3.1", + "version": "4.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pc-nrfconnect-programmer", - "version": "4.3.1", + "version": "4.4.0", "license": "SEE LICENSE IN LICENSE", "devDependencies": { "@nordicsemiconductor/pc-nrfconnect-shared": "github:NordicSemiconductor/pc-nrfconnect-shared#feat/add-support-ob-fw-update" @@ -2869,7 +2869,7 @@ }, "node_modules/@nordicsemiconductor/pc-nrfconnect-shared": { "version": "178.0.0", - "resolved": "git+ssh://git@github.com/NordicSemiconductor/pc-nrfconnect-shared.git#a7d2c778317990c4982f38a90f391abad34b46d3", + "resolved": "git+ssh://git@github.com/NordicSemiconductor/pc-nrfconnect-shared.git#d5053d469d948db07d0c2833d8fa11c1b50739dc", "dev": true, "hasInstallScript": true, "license": "ISC", diff --git a/src/actions/jlinkTargetActions.ts b/src/actions/jlinkTargetActions.ts index 83166cb3..f5605a0d 100644 --- a/src/actions/jlinkTargetActions.ts +++ b/src/actions/jlinkTargetActions.ts @@ -10,7 +10,6 @@ import { describeError, Device, logger, - setWaitForDevice, } from '@nordicsemiconductor/pc-nrfconnect-shared'; import { BatchCallbacks, @@ -411,33 +410,21 @@ export const recover = export const updateOBFirmware = (device: Device): AppThunk> => - async dispatch => { - dispatch( - setWaitForDevice({ - timeout: 30000, - when: 'always', - once: false, - }) - ); - logger.info(`Updating OB Firmware`); - await NrfutilDeviceLib.updateDebugProbeFirmware(device).then(result => { + dispatch => { + logger.info(`Updating J-Link OB firmware.`); + return dispatch( + NrfutilDeviceLib.updateOBFirmwareWithWaitForDevice(device) + ).then(result => { if (result.versionAfterUpdate === result.versionBeforeUpdate) { logger.info( - `No OB version update was required. OB version is at ${result.versionAfterUpdate}.` + `No J-Link OB firmware update was required. Version is at ${result.versionAfterUpdate}.` ); } else { logger.info( - `OB version was updated to ${result.versionAfterUpdate}.` + `J-Link OB firmware version was updated to ${result.versionAfterUpdate}.` ); } }); - dispatch( - setWaitForDevice({ - timeout: 30000, - when: 'always', - once: true, - }) - ); }; export const recoverAndWrite = diff --git a/src/components/ControlPanel.tsx b/src/components/ControlPanel.tsx index 96c929a1..d585b97b 100644 --- a/src/components/ControlPanel.tsx +++ b/src/components/ControlPanel.tsx @@ -312,7 +312,7 @@ Are you sure you want to continue?`, disabled={isMcuboot || !isJLink || !targetIsReady} > - Update OB Firmware + Update J-Link OB Firmware