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:
Wessel Nieboer
2026-02-24 23:49:06 +01:00
parent f4951d0895
commit 8bf63256b6
10 changed files with 32 additions and 15 deletions

View File

@@ -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);
}
};

View File

@@ -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);
}
};