Skip to content

Commit 020aa6f

Browse files
committed
More extra externs
1 parent 2a04226 commit 020aa6f

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

src/include/rxtx_intf.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
***/
1111
#if defined(TARGET_TX)
1212
extern bool RxWiFiReadyToSend;
13+
extern char backpackVersion[];
1314

1415
void SetSyncSpam();
1516
void ResetPower();

src/lib/Backpack/devBackpack.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "targets.h"
22

3+
#include "rxtx_intf.h"
34
#include "CRSFHandset.h"
45
#include "CRSFRouter.h"
56
#include "config.h"
@@ -17,8 +18,6 @@
1718
// Stop overriding channels with PTR data if older than this
1819
#define HT_STALE_TIMEOUT_MS 1000
1920

20-
extern char backpackVersion[];
21-
2221
bool TxBackpackWiFiReadyToSend = false;
2322
bool VRxBackpackWiFiReadyToSend = false;
2423
bool BackpackTelemReadyToSend = false;

src/lib/tx-crsf/TXModuleParameters.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343

4444
#define HAS_RADIO (GPIO_PIN_SCK != UNDEF_PIN)
4545

46-
extern char backpackVersion[];
47-
extern TXModuleEndpoint crsfTransmitter;
48-
4946
#if defined(Regulatory_Domain_EU_CE_2400)
5047
#if defined(RADIO_LR1121)
5148
char strPowerLevels[] = "10/10;25/25;25/50;25/100;25/250;25/500;25/1000;25/2000;MatchTX ";
@@ -394,7 +391,7 @@ void TXModuleEndpoint::sendELRSstatus(const crsf_addr_e origin)
394391
}
395392

396393
void TXModuleEndpoint::updateModelID() {
397-
itoa(crsfTransmitter.modelId, modelMatchUnit+6, 10);
394+
itoa(modelId, modelMatchUnit+6, 10);
398395
strcat(modelMatchUnit, ")");
399396
}
400397

@@ -890,7 +887,7 @@ void TXModuleEndpoint::registerParameters()
890887
msp.makeCommand();
891888
msp.function = MSP_SET_RX_CONFIG;
892889
msp.addByte(MSP_ELRS_MODEL_ID);
893-
msp.addByte(newModelMatch ? crsfTransmitter.modelId : 0xff);
890+
msp.addByte(newModelMatch ? modelId : 0xff);
894891
crsfRouter.AddMspMessage(&msp, CRSF_ADDRESS_CRSF_RECEIVER, CRSF_ADDRESS_CRSF_TRANSMITTER);
895892
}
896893
updateModelID();

src/lib/tx-crsf/devTXLUA.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#include "common.h"
33
#include "device.h"
44

5-
extern TXModuleEndpoint crsfTransmitter;
6-
75
static int event()
86
{
97
if (connectionState < FAILURE_STATES)

0 commit comments

Comments
 (0)