Fix remote LNA toggle bugs: correct register comparison, add missing implementations, wire up companion radio
getRxBoostedGain was returned true because both 0x94 (power saving) and 0x96 (boosted gain = 1) return true
This commit is contained in:
@@ -93,9 +93,9 @@ class CustomSX1262 : public SX1262 {
|
||||
return detected;
|
||||
}
|
||||
|
||||
uint8_t getRxBoostedGainMode() {
|
||||
bool getRxBoostedGainMode() {
|
||||
uint8_t rxGain = 0;
|
||||
readRegister(RADIOLIB_SX126X_REG_RX_GAIN, &rxGain, 1);
|
||||
return rxGain;
|
||||
return (rxGain == RADIOLIB_SX126X_RX_GAIN_BOOSTED);
|
||||
}
|
||||
};
|
||||
@@ -85,9 +85,9 @@ class CustomSX1268 : public SX1268 {
|
||||
return detected;
|
||||
}
|
||||
|
||||
uint8_t getRxBoostedGainMode() {
|
||||
bool getRxBoostedGainMode() {
|
||||
uint8_t rxGain = 0;
|
||||
readRegister(RADIOLIB_SX126X_REG_RX_GAIN, &rxGain, 1);
|
||||
return rxGain;
|
||||
return (rxGain == RADIOLIB_SX126X_RX_GAIN_BOOSTED);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user