Skip to content

Commit 10fcc44

Browse files
committed
Add flag
1 parent a0c4d3c commit 10fcc44

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

src/common/Resource.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export const AppResourceButton = ({
8888
title,
8989
onInstallStart,
9090
onInstallFinish,
91+
selectDeviceOnAppOpen,
9192
}: {
9293
description: string;
9394
app: string;
@@ -97,6 +98,7 @@ export const AppResourceButton = ({
9798
vComIndex?: number;
9899
onInstallStart?: () => void;
99100
onInstallFinish?: () => void;
101+
selectDeviceOnAppOpen?: boolean;
100102
}) => {
101103
const device = useAppSelector(getSelectedDeviceUnsafely);
102104
const [displayName, setDisplayName] = useState(app);
@@ -106,6 +108,8 @@ export const AppResourceButton = ({
106108
? device.serialPorts?.[vComIndex]?.comName
107109
: undefined;
108110

111+
const selectDevice = selectDeviceOnAppOpen !== false;
112+
109113
useEffect(() => {
110114
apps.getDownloadableApps().then(({ apps: receivedApps }) => {
111115
const updatedAppInfo = receivedApps.find(a => a.name === app);
@@ -151,18 +155,20 @@ export const AppResourceButton = ({
151155
onInstallFinish?.();
152156
}
153157

154-
const deviceOptions = path
155-
? { serialPortPath: path }
156-
: { serialNumber: device.serialNumber };
158+
const options = selectDevice
159+
? {
160+
device: path
161+
? { serialPortPath: path }
162+
: { serialNumber: device.serialNumber },
163+
}
164+
: {};
157165

158166
openWindow.openApp(
159167
{
160168
name: app,
161169
source: 'official',
162170
},
163-
{
164-
device: deviceOptions,
165-
}
171+
options
166172
);
167173

168174
telemetry.sendEvent('Opened evaluation app', {

src/features/flows/nRF54LM20/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ const evaluateConfig = [
195195
app: 'pc-nrfconnect-ppk',
196196
description:
197197
'The Power Profiler app is the recommended software tool for measurements.',
198+
selectDeviceOnAppOpen: false,
198199
},
199200
],
200201
},

0 commit comments

Comments
 (0)