diff --git a/src/api/src/factories/TargetUserDefinesFactory.ts b/src/api/src/factories/TargetUserDefinesFactory.ts index b1d00a8e..e7555d5a 100644 --- a/src/api/src/factories/TargetUserDefinesFactory.ts +++ b/src/api/src/factories/TargetUserDefinesFactory.ts @@ -91,10 +91,10 @@ export default class TargetUserDefinesFactory { return UserDefine.Text(UserDefineKey.AUTO_WIFI_ON_INTERVAL, '60', true); case UserDefineKey.RX_AS_TX: let rxAxTxTypes: string[] = []; - if (this.platform === 'esp32') { + if (this.platform?.startsWith('esp32')) { rxAxTxTypes = ['internal', 'external']; } - if (this.platform === 'esp8285') { + if (this.platform?.startsWith('esp8285')) { rxAxTxTypes = ['internal']; } return UserDefine.Enum(UserDefineKey.RX_AS_TX, rxAxTxTypes, 'internal'); diff --git a/src/api/src/services/BinaryFlashingStrategy/DeviceDescriptionsLoader/index.ts b/src/api/src/services/BinaryFlashingStrategy/DeviceDescriptionsLoader/index.ts index 5568c943..e994887f 100644 --- a/src/api/src/services/BinaryFlashingStrategy/DeviceDescriptionsLoader/index.ts +++ b/src/api/src/services/BinaryFlashingStrategy/DeviceDescriptionsLoader/index.ts @@ -395,7 +395,10 @@ export default class DeviceDescriptionsLoader { userDefines.push( targetUserDefinesFactory.build(UserDefineKey.LOCK_ON_FIRST_CONNECTION) ); - if (config.platform !== 'stm32') { + if ( + config.platform.startsWith('esp32') || + config.platform.startsWith('esp8285') + ) { userDefines.push( targetUserDefinesFactory.build(UserDefineKey.RX_AS_TX) );