mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-22 05:14:46 -07:00
fix endless tx state at receiver info
This commit is contained in:
@@ -10,6 +10,7 @@ typedef enum {
|
|||||||
SubGhzNotificationStateTx,
|
SubGhzNotificationStateTx,
|
||||||
SubGhzNotificationStateRx,
|
SubGhzNotificationStateRx,
|
||||||
SubGhzNotificationStateRxDone,
|
SubGhzNotificationStateRxDone,
|
||||||
|
SubGhzNotificationStateTxWait,
|
||||||
} SubGhzNotificationState;
|
} SubGhzNotificationState;
|
||||||
|
|
||||||
/** SubGhzTxRx state */
|
/** SubGhzTxRx state */
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
|
|||||||
// user release OK
|
// user release OK
|
||||||
// we switch off endless_tx - that mean protocols yield finish endless transmission,
|
// we switch off endless_tx - that mean protocols yield finish endless transmission,
|
||||||
// send upload "repeat=xx" times, and after will be stoped by the tick event down in this code
|
// send upload "repeat=xx" times, and after will be stoped by the tick event down in this code
|
||||||
subghz->state_notifications = SubGhzNotificationStateIDLE;
|
subghz->state_notifications = SubGhzNotificationStateTxWait;
|
||||||
subghz_block_generic_global.endless_tx = false;
|
subghz_block_generic_global.endless_tx = false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -192,7 +192,7 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
|
|||||||
notification_message(subghz->notifications, &sequence_blink_green_100);
|
notification_message(subghz->notifications, &sequence_blink_green_100);
|
||||||
subghz->state_notifications = SubGhzNotificationStateRx;
|
subghz->state_notifications = SubGhzNotificationStateRx;
|
||||||
break;
|
break;
|
||||||
case SubGhzNotificationStateIDLE:
|
case SubGhzNotificationStateTxWait:
|
||||||
// we wait until hardware TX finished and after stop TX and start RX, else just blink led
|
// we wait until hardware TX finished and after stop TX and start RX, else just blink led
|
||||||
if(!subghz_devices_is_async_complete_tx(subghz->txrx->radio_device)) {
|
if(!subghz_devices_is_async_complete_tx(subghz->txrx->radio_device)) {
|
||||||
notification_message(subghz->notifications, &sequence_blink_magenta_10);
|
notification_message(subghz->notifications, &sequence_blink_magenta_10);
|
||||||
@@ -202,6 +202,8 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
|
|||||||
widget_reset(subghz->widget);
|
widget_reset(subghz->widget);
|
||||||
subghz_scene_receiver_info_draw_widget(subghz);
|
subghz_scene_receiver_info_draw_widget(subghz);
|
||||||
|
|
||||||
|
subghz->state_notifications = SubGhzNotificationStateIDLE;
|
||||||
|
|
||||||
if(!scene_manager_has_previous_scene(subghz->scene_manager, SubGhzSceneDecodeRAW)) {
|
if(!scene_manager_has_previous_scene(subghz->scene_manager, SubGhzSceneDecodeRAW)) {
|
||||||
subghz_txrx_rx_start(subghz->txrx);
|
subghz_txrx_rx_start(subghz->txrx);
|
||||||
subghz_txrx_hopper_unpause(subghz->txrx);
|
subghz_txrx_hopper_unpause(subghz->txrx);
|
||||||
|
|||||||
Reference in New Issue
Block a user