SubGhz: fix incorrect response in rpc mode. Code cleanup. (#1964)

* Code cleanup
* SubGhz: correct logic in RPC
* SubGhz: do not blink on app rpc fail

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Sergey Monchenko
2022-11-04 09:08:51 +03:00
committed by GitHub
parent d68ac50efd
commit 3bd74b7f01
8 changed files with 25 additions and 18 deletions

View File

@@ -155,9 +155,7 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
} else if(event.event == SubGhzCustomEventSceneReceiverInfoSave) {
//CC1101 Stop RX -> Save
subghz->state_notifications = SubGhzNotificationStateIDLE;
if(subghz->txrx->hopper_state != SubGhzHopperStateOFF) {
subghz->txrx->hopper_state = SubGhzHopperStateOFF;
}
subghz->txrx->hopper_state = SubGhzHopperStateOFF;
if(subghz->txrx->txrx_state == SubGhzTxRxStateRx) {
subghz_rx_end(subghz);
subghz_sleep(subghz);