Skip to content

Commit eae8aab

Browse files
authored
Revert "invertIQ refact (ExpressLRS#949)" (ExpressLRS#999)
This reverts commit df1af6a.
1 parent 3ce11b0 commit eae8aab

4 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/include/common.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ extern uint8_t BindingUID[6];
1616
extern uint8_t UID[6];
1717
extern uint8_t MasterUID[6];
1818
extern uint16_t CRCInitializer;
19-
extern uint8_t invertIQ;
2019

2120
typedef enum
2221
{

src/src/common.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ uint8_t MasterUID[6] = {UID[0], UID[1], UID[2], UID[3], UID[4], UID[5]}; // Spec
113113

114114
uint16_t CRCInitializer = (UID[4] << 8) | UID[5];
115115

116-
uint8_t invertIQ = UID[5] & 0x01;
117-
118116
#define RSSI_FLOOR_NUM_READS 5 // number of times to sweep the noise foor to get avg. RSSI reading
119117
#define MEDIAN_SIZE 20
120118

src/src/rx_main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ void SetRFLinkRate(uint8_t index) // Set speed of RF link
241241
{
242242
expresslrs_mod_settings_s *const ModParams = get_elrs_airRateConfig(index);
243243
expresslrs_rf_pref_params_s *const RFperf = get_elrs_RFperfParams(index);
244+
bool invertIQ = UID[5] & 0x01;
244245

245246
hwTimer.updateInterval(ModParams->interval);
246247
Radio.Config(ModParams->bw, ModParams->sf, ModParams->cr, GetInitialFreq(), ModParams->PreambleLen, invertIQ, ModParams->PayloadLength);

src/src/tx_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ void ICACHE_RAM_ATTR SetRFLinkRate(uint8_t index) // Set speed of RF link (hz)
341341
index = adjustPacketRateForBaud(index);
342342
expresslrs_mod_settings_s *const ModParams = get_elrs_airRateConfig(index);
343343
expresslrs_rf_pref_params_s *const RFperf = get_elrs_RFperfParams(index);
344-
344+
bool invertIQ = UID[5] & 0x01;
345345
if ((ModParams == ExpressLRS_currAirRate_Modparams)
346346
&& (RFperf == ExpressLRS_currAirRate_RFperfParams)
347347
&& (invertIQ == Radio.IQinverted))

0 commit comments

Comments
 (0)