Skip to content

Commit

Permalink
Merge pull request #678 from ExpressLRS/fix-rx-as-tx
Browse files Browse the repository at this point in the history
Fix RX_AS_TX for esp32-c3 targets
  • Loading branch information
jurgelenas authored Sep 15, 2024
2 parents fcb770f + dc61c93 commit 2661709
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 2661709

Please sign in to comment.