Skip to content

Commit

Permalink
Merge pull request #135 from NordicSemiconductor/feat/update-shared-a…
Browse files Browse the repository at this point in the history
…nd-nrfutil

Feat: update dependancies
  • Loading branch information
kylebonnici authored Feb 14, 2024
2 parents 8558a60 + 549d3bc commit 92cef3e
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 45 deletions.
67 changes: 38 additions & 29 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"author": "Nordic Semiconductor ASA",
"license": "SEE LICENSE IN LICENSE",
"engines": {
"nrfconnect": ">=4.3.0"
"nrfconnect": ">=4.4.1"
},
"main": "dist/bundle.js",
"nrfConnectForDesktop": {
"nrfutil": {
"device": [
"2.0.3"
"2.1.1"
],
"npm": [
"0.3.0"
Expand Down Expand Up @@ -49,7 +49,7 @@
"prepare": "husky install"
},
"devDependencies": {
"@nordicsemiconductor/pc-nrfconnect-shared": "^150.0.0",
"@nordicsemiconductor/pc-nrfconnect-shared": "^157.0.0",
"chart.js": "^4.0.1",
"chartjs-adapter-date-fns": "^2.0.1",
"react-chartjs-2": "^5.0.1",
Expand Down
5 changes: 2 additions & 3 deletions src/actions/fileActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
*/

import { dialog, getCurrentWindow } from '@electron/remote';
import { AppThunk } from '@nordicsemiconductor/pc-nrfconnect-shared';
import usageData from '@nordicsemiconductor/pc-nrfconnect-shared/src/utils/usageData';
import { AppThunk, telemetry } from '@nordicsemiconductor/pc-nrfconnect-shared';
import {
OpenDialogOptions,
OpenDialogReturnValue,
Expand Down Expand Up @@ -45,7 +44,7 @@ const saveSettings =
usbPower: currentState.usbPower,
};

usageData.sendUsageData('Export Configuartion', {
telemetry.sendEvent('Export Configuration', {
config: out,
});

Expand Down
4 changes: 2 additions & 2 deletions src/components/SidePanel/OpenSerialTerminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
Device,
openWindow,
selectedDevice,
usageData,
telemetry,
} from '@nordicsemiconductor/pc-nrfconnect-shared';

import { getPmicState } from '../../features/pmicControl/pmicControlSlice';
Expand Down Expand Up @@ -58,7 +58,7 @@ export default () => {
};

const openSerialTerminal = (device: Device, serialPortPath: string) => {
usageData.sendUsageData(EventAction.OPEN_SERIAL_TERMINAL);
telemetry.sendEvent(EventAction.OPEN_SERIAL_TERMINAL);
openWindow.openApp(
{ name: 'pc-nrfconnect-serial-terminal', source: 'official' },
{
Expand Down
17 changes: 12 additions & 5 deletions src/features/pmicControl/npm/deviceSetups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,18 @@ export const npm1300DeviceSetup = (firmware: NpmFirmware): DeviceSetup => ({
progress.stepProgressPercentage,
progress.message
);
}).catch(err => {
if (err && !success) {
reject(err.message);
}
});
})
.then(() => {
onProgress(
100,
'Programming upload complete. Waiting for device to apply firmware and reboot. This take around a minute.'
);
})
.catch(err => {
if (err && !success) {
reject(err.message);
}
});
logger.debug('firmware updated finished');
}),
},
Expand Down
9 changes: 6 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
*/

import React from 'react';
import { App, render } from '@nordicsemiconductor/pc-nrfconnect-shared';
import usageData from '@nordicsemiconductor/pc-nrfconnect-shared/src/utils/usageData';
import {
App,
render,
telemetry,
} from '@nordicsemiconductor/pc-nrfconnect-shared';

import appReducer from './appReducer';
import Charger from './components/Charger/Charger';
Expand All @@ -24,7 +27,7 @@ import NpmGenericDialog from './features/pmicControl/npm/NpmGenericDialog';

import './index.scss';

usageData.enableTelemetry();
telemetry.enableTelemetry();

render(
<App
Expand Down

0 comments on commit 92cef3e

Please sign in to comment.