Skip to content

Commit

Permalink
Prepare release v4.1.1: Merge pull request #461 from NordicSemicondu…
Browse files Browse the repository at this point in the history
…ctor/release-prep-4.1.1

 Prepare release v4.1.1
  • Loading branch information
KievDevel authored May 30, 2024
2 parents d9f8491 + 86f00e7 commit 325e268
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 40 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 4.1.1 - 2024-05-30

### Added

- Support for Apple silicon.

## 4.1.0 - 2024-04-15

### Changed
Expand Down
50 changes: 22 additions & 28 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-ppk",
"version": "4.1.0",
"version": "4.1.1",
"displayName": "Power Profiler",
"description": "App for use with Nordic Power Profiler Kits",
"homepage": "https://github.com/NordicSemiconductor/pc-nrfconnect-ppk",
Expand Down Expand Up @@ -47,7 +47,7 @@
"nordic-publish": "node ./dist/nordic-publish.js"
},
"devDependencies": {
"@nordicsemiconductor/pc-nrfconnect-shared": "^170.0.0",
"@nordicsemiconductor/pc-nrfconnect-shared": "^177.0.0",
"@types/archiver": "^6.0.2",
"@types/fs-extra": "^11.0.4",
"@types/redux-mock-store": "^1.0.3",
Expand Down
4 changes: 2 additions & 2 deletions src/actions/fileActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import {
} from '../slices/chartSlice';
import { updateSampleFreqLog10 } from '../slices/dataLoggerSlice';
import loadData from '../utils/loadFileHandler';
import { DATA_LOGGER } from '../utils/panes';
import { Panes } from '../utils/panes';
import { getLastSaveDir, setLastSaveDir } from '../utils/persistentStore';
import saveData, { PPK2Metadata } from '../utils/saveFileHandler';

Expand Down Expand Up @@ -161,7 +161,7 @@ export const load =
}
);

dispatch(setCurrentPane(DATA_LOGGER));
dispatch(setCurrentPane(Panes.DATA_LOGGER));
dispatch(closeProgressDialog());

if (timestamp) {
Expand Down
10 changes: 9 additions & 1 deletion src/components/DeviceSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
DeviceSelector,
DeviceSetupConfig,
getAppFile,
isDeviceInDFUBootloader,
logger,
sdfuDeviceSetup,
} from '@nordicsemiconductor/pc-nrfconnect-shared';
Expand All @@ -35,7 +36,14 @@ export const deviceSetupConfig: DeviceSetupConfig = {
params: {},
},
],
false
false,
d =>
!isDeviceInDFUBootloader(d) &&
!!d.serialPorts &&
d.serialPorts.length > 0 &&
!!d.traits.nordicUsb &&
!!d.usb &&
d.usb.device.descriptor.idProduct === 0xc00a
),
],
};
Expand Down
5 changes: 5 additions & 0 deletions src/components/__tests__/SidePanel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ jest.mock('../../utils/persistentStore', () => ({

const getTimestampMock = jest.fn(() => 100);

jest.mock('../../utils/panes', () => ({
isDataLoggerPane: jest.fn(() => true),
isScopePane: jest.fn(() => false),
}));

jest.mock('../../globals', () => {
const temp = jest.requireActual('../../globals');
return {
Expand Down
6 changes: 3 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { updateTitle } from './globals';
import reducers from './slices';
import { getFileLoaded, isSavePending } from './slices/appSlice';
import { getRecordingMode } from './slices/chartSlice';
import { isDataLoggerPane, isScopePane } from './utils/panes';
import { isDataLoggerPane, isScopePane, Panes } from './utils/panes';

import './index.scss';

Expand Down Expand Up @@ -83,8 +83,8 @@ render(
sidePanel={<SidePanel />}
documentation={DocumentationSections}
panes={[
{ name: 'Data Logger', Main: ChartWrapper },
{ name: 'Scope', Main: ChartWrapper },
{ name: Panes.DATA_LOGGER, Main: ChartWrapper },
{ name: Panes.SCOPE, Main: ChartWrapper },
]}
>
<AppTitleHook />
Expand Down
13 changes: 9 additions & 4 deletions src/utils/panes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ import { currentPane } from '@nordicsemiconductor/pc-nrfconnect-shared';

import type { RootState } from '../slices';

export const SCOPE = 1;
export const DATA_LOGGER = 0;
export enum Panes {
DATA_LOGGER = 'Data Logger',
SCOPE = 'Scope',
}

export const isScopePane = (state: RootState) => currentPane(state) === SCOPE;
export const isScopePane = (state: RootState) =>
currentPane(state) === Panes.SCOPE;
export const isDataLoggerPane = (state: RootState) =>
currentPane(state) === DATA_LOGGER;
currentPane(state) === Panes.DATA_LOGGER;

export const getState = (state: RootState) => state;

0 comments on commit 325e268

Please sign in to comment.