Sub-GHz: Choose RSSI threshold for Hopping mode

by Willy-JL
This commit is contained in:
MX
2024-07-15 04:40:23 +03:00
parent 365159c11a
commit 039274f718
7 changed files with 73 additions and 21 deletions

View File

@@ -363,7 +363,7 @@ void subghz_txrx_stop(SubGhzTxRx* instance) {
}
}
void subghz_txrx_hopper_update(SubGhzTxRx* instance) {
void subghz_txrx_hopper_update(SubGhzTxRx* instance, float stay_threshold) {
furi_assert(instance);
switch(instance->hopper_state) {
@@ -386,7 +386,7 @@ void subghz_txrx_hopper_update(SubGhzTxRx* instance) {
float rssi = subghz_devices_get_rssi(instance->radio_device);
// Stay if RSSI is high enough
if(rssi > -90.0f) {
if(rssi > stay_threshold) {
instance->hopper_timeout = 10;
instance->hopper_state = SubGhzHopperStateRSSITimeOut;
return;