Skip to content

Commit

Permalink
Merge pull request #841 from NordicSemiconductor/fix/external-jlink
Browse files Browse the repository at this point in the history
fix: external jlink with device-info
  • Loading branch information
kylebonnici authored Dec 1, 2023
2 parents d717549 + e6354a3 commit c4957a7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
5 changes: 4 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@ This project does _not_ adhere to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it
every new version is a new major version.

## 136.0.0 - UNRELEASED
## 136.0.0 - 2023-12-01

### Fixed

- `useStopWatch` milliseconds was not correctly calculated
- External JLink devices would not connect to apps device list properly if
selected before they are connected to the debug-in heder of the device

### Changed

- `useStopWatch` reset and start no longer force a rerender if these are a
dependency of a useEffect
- `useStopWatch` start optional time param no longer default to the last time
when paused but 0.
- `nrfutil device` `device-info` return undefined if reading info throws

### Steps to upgrade when using this package

Expand Down
29 changes: 17 additions & 12 deletions nrfutil/device/deviceInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,20 @@ export default async (
core?: DeviceCore,
onProgress?: (progress: Progress) => void,
controller?: AbortController
) =>
device.traits.jlink || device.traits.nordicDfu
? (
await deviceSingleTaskEndOperation<DeviceInfoRaw>(
device,
'device-info',
onProgress,
controller,
core ? ['--core', core] : []
)
).deviceInfo
: undefined;
) => {
try {
return device.traits.jlink || device.traits.nordicDfu
? (
await deviceSingleTaskEndOperation<DeviceInfoRaw>(
device,
'device-info',
onProgress,
controller,
core ? ['--core', core] : []
)
).deviceInfo
: undefined;
} catch (_) {
return undefined;
}
};

0 comments on commit c4957a7

Please sign in to comment.