Reject unsupported RXPS before changing suspended scan policy

Keep rejected power-saving requests from changing radio2's saved RX policy or timings. Exercise actual CLI, scan restoration and calibration sleep guards with semantic negative controls.
This commit is contained in:
mikecarper committed 2026-10-16 19:17:22 -07:00
1 parent 4348fdcc56
commit 0dcba50d88
3 files changed
+320 -4

No files matched your search

+3 -4
View File
@@ -1974,14 +1974,13 @@ bool RadioLibWrapper::setRxPowerSaving(bool enabled, uint32_t rx_us, uint32_t sl
if (_beacon_owned) return false;
#endif
if (_cw_active) return false;
// A rejected request must not become the policy restored after radio2 ends.
if (enabled && !supportsRxPowerSaving()) return false;
if (_profile_rxps_suspended) {
_profile_saved_rxps = enabled;
_rx_ps_rx_us = rx_us;
_rx_ps_sleep_us = sleep_us;
return !enabled || supportsRxPowerSaving();
}
if (enabled && !supportsRxPowerSaving()) {
return false;
return true;
}
uint8_t resume_rx = beginReconfigure();