Skip to content
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

Prepare release 2.4.1 #159

Merged
merged 8 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
10 changes: 10 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 2.4.1 - Unreleased
KievDevel marked this conversation as resolved.
Show resolved Hide resolved

### Added

- Support for Apple silicon.

### Fixed

- Sweep mode in some cases wasn't using the selected channels.

## 2.4.0 - 2024-04-09

### Changed
Expand Down
46 changes: 20 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pc-nrfconnect-dtm",
"version": "2.4.0",
"version": "2.4.1",
"displayName": "Direct Test Mode",
"description": "RF PHY testing of Bluetooth Low Energy devices",
"homepage": "https://github.com/NordicSemiconductor/pc-nrfconnect-dtm",
Expand Down Expand Up @@ -45,7 +45,7 @@
"prepare": "husky install"
},
"devDependencies": {
"@nordicsemiconductor/pc-nrfconnect-shared": "^170.0.0",
"@nordicsemiconductor/pc-nrfconnect-shared": "^176.0.0",
"@testing-library/user-event": "^13.1.9",
"chart.js": "^4.0.1",
"chartjs-plugin-datalabels": "2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/actions/testActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const startTests =
const singleChannelIndexed = bleChannelsValues.indexOf(singleChannel);
const channelRangeIndexed = channelRange
.map(channel => bleChannelsValues.indexOf(channel))
.sort();
.sort((a, b) => a - b);

const testMode = paneName(getState());

Expand Down
8 changes: 6 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Receiver from './Receiver';
import appReducer from './reducers';
import SidePanel from './SidePanel';
import Transmitter from './Transmitter';
import { Panes } from './utils/panes';

import './index.scss';

Expand All @@ -28,10 +29,13 @@ render(
sidePanel={<SidePanel />}
panes={[
{
name: 'Transmitter',
name: Panes.TRANSMITTER,
Main: Transmitter,
},
{ name: 'Receiver', Main: Receiver },
{
name: Panes.RECEIVER,
Main: Receiver,
},
]}
/>
);
9 changes: 6 additions & 3 deletions src/utils/panes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ import { currentPane } from '@nordicsemiconductor/pc-nrfconnect-shared';

import { RootState } from '../reducers/types';

export const TRANSMITTER = 0;
export const RECEIVER = 1;
// todo: sync with Mode type from 'src/reducers/types.ts'
export enum Panes {
TRANSMITTER = 'Transmitter',
RECEIVER = 'Receiver',
}

export const isTransmitterPane = (state: RootState) =>
currentPane(state) === TRANSMITTER;
currentPane(state) === Panes.TRANSMITTER;

export const paneName = (state: RootState) =>
isTransmitterPane(state) ? 'transmitter' : 'receiver';