From 7ce7725bf04d2b0db17ae3673e76ce0291345b50 Mon Sep 17 00:00:00 2001 From: Julius Jurgelenas Date: Wed, 19 Jun 2024 10:57:12 +0300 Subject: [PATCH] Do not pass user defines when in manual mode. Closes #602 --- .../BinaryFlashingStrategy/BinaryConfigurator/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/api/src/services/BinaryFlashingStrategy/BinaryConfigurator/index.ts b/src/api/src/services/BinaryFlashingStrategy/BinaryConfigurator/index.ts index 3561bae7..9ea8b5c2 100644 --- a/src/api/src/services/BinaryFlashingStrategy/BinaryConfigurator/index.ts +++ b/src/api/src/services/BinaryFlashingStrategy/BinaryConfigurator/index.ts @@ -5,6 +5,7 @@ import UserDefineKey from '../../../library/FirmwareBuilder/Enum/UserDefineKey'; import { NoOpFunc, OnOutputFunc } from '../../../library/Commander'; import Python from '../../../library/Python'; import { LoggerService } from '../../../logger'; +import UserDefinesMode from '../../../models/enum/UserDefinesMode'; const maskSensitiveFlags = (data: string[][]): string[][] => { const sensitiveData = ['--phrase', '--ssid', '--password']; @@ -55,7 +56,10 @@ export default class BinaryConfigurator { if (subType.toLocaleLowerCase().includes('tx_')) { flags.push(['--tx']); } - flags.push(...this.userDefinesToFlags(params.userDefines)); + + if (params.userDefinesMode === UserDefinesMode.UserInterface) { + flags.push(...this.userDefinesToFlags(params.userDefines)); + } if (params.forceFlash) { flags.push(['--force']);