Skip to content

Commit

Permalink
Fix RX_AS_TX for esp32-c3 targets
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgelenas committed Sep 15, 2024
1 parent c8c2f1d commit dc61c93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/api/src/factories/TargetUserDefinesFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
Expand Down

0 comments on commit dc61c93

Please sign in to comment.