Skip to content

Commit

Permalink
Merge pull request #178 from NordicSemiconductor/fix/slider-broken
Browse files Browse the repository at this point in the history
Fix/slider broken
  • Loading branch information
boundlesscalm authored Feb 24, 2025
2 parents dd0a80a + 69033fe commit 27b8b3c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 2.4.3 - Unreleased

### Changed

- nRF54L15 DK: Only valid Transmit Power values (-8 dBm to 8 dBm) are now
displayed.

### Fixed

- Issue where the Transmit Power slider would disallow setting valid values.

## 2.4.2 - 2024-11-11

### Changed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pc-nrfconnect-dtm",
"version": "2.4.2",
"version": "2.4.3",
"displayName": "Direct Test Mode",
"description": "RF PHY testing of Bluetooth Low Energy devices",
"homepage": "https://github.com/NordicSemiconductor/pc-nrfconnect-dtm",
Expand Down
2 changes: 1 addition & 1 deletion src/SidePanel/TransmitSetupView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const TxPowerView = () => {
const dBmValues = fromPCA(boardType).txPower;

useEffect(() => {
if (dBmValues.indexOf(txPowerIdx) === -1) {
if (txPowerIdx === -1) {
dispatch(txPowerChanged(dBmValues.length - 1));
}
}, [dispatch, dBmValues, txPowerIdx]);
Expand Down
7 changes: 7 additions & 0 deletions src/utils/boards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,19 @@ const nRF52832 = {

const nRF52840 = { ...defaultDevice };

const nRF54L15 = {
...defaultDevice,
txPower: Constants.dbmValues.filter(tx => tx >= -8),
};

function fromPCA(board: string | null) {
switch (board) {
case 'PCA10056':
return nRF52840;
case 'PCA10040':
return nRF52832;
case 'PCA10156':
return nRF54L15;
default:
return defaultDevice;
}
Expand Down

0 comments on commit 27b8b3c

Please sign in to comment.