diff --git a/scenes/meal_pager_scene_menu.c b/scenes/meal_pager_scene_menu.c index af48496574a..59b305aa60c 100644 --- a/scenes/meal_pager_scene_menu.c +++ b/scenes/meal_pager_scene_menu.c @@ -44,7 +44,17 @@ bool meal_pager_scene_menu_on_event(void* context, SceneManagerEvent event) { app->scene_manager, Meal_PagerSceneMenu, SubmenuIndexSettings); scene_manager_next_scene(app->scene_manager, Meal_PagerSceneSettings); return true; + } else if (event.event == Meal_PagerCustomEventViewTransmitterSendStop) { + app->state_notifications = SubGhzNotificationStateIDLE; + subghz_txrx_stop(app->subghz->txrx); + FURI_LOG_D(TAG, "Stop Event from Menu"); + return true; + } + } else if(event.type == SceneManagerEventTypeTick) { + if(app->state_notifications == SubGhzNotificationStateTx) { + notification_message(app->notification, &sequence_blink_magenta_10); } + return true; } return false; } diff --git a/scenes/meal_pager_scene_transmit.c b/scenes/meal_pager_scene_transmit.c index 2dd6dc1112a..02f2b2ded4a 100644 --- a/scenes/meal_pager_scene_transmit.c +++ b/scenes/meal_pager_scene_transmit.c @@ -33,8 +33,9 @@ void meal_pager_scene_transmit_on_enter(void* context) { FURI_LOG_D(TAG, "Generated tmp.sub"); //meal_pager_blink_start_subghz(app); FURI_LOG_D(TAG, "Start Transmitting"); - subghz_send(app); - + if (!app->stop_transmit) { + subghz_send(app); + } dolphin_deed(DolphinDeedSubGhzSend); //FURI_LOG_D(TAG, "Finished Transmitting"); //meal_pager_blink_stop(app); @@ -54,10 +55,9 @@ bool meal_pager_scene_transmit_on_event(void* context, SceneManagerEvent event) case Meal_PagerCustomEventTransmitDown: break; case Meal_PagerCustomEventTransmitBack: - notification_message(app->notification, &sequence_reset_red); - notification_message(app->notification, &sequence_reset_green); - notification_message(app->notification, &sequence_reset_blue); app->stop_transmit = true; + app->state_notifications = SubGhzNotificationStateIDLE; + meal_pager_blink_stop(app); if(!scene_manager_search_and_switch_to_previous_scene( app->scene_manager, Meal_PagerSceneMenu)) { scene_manager_stop(app->scene_manager); @@ -75,7 +75,10 @@ bool meal_pager_scene_transmit_on_event(void* context, SceneManagerEvent event) } } else if(event.type == SceneManagerEventTypeTick) { if(app->state_notifications == SubGhzNotificationStateTx) { - notification_message(app->notification, &sequence_blink_magenta_10); + app->state_notifications = SubGhzNotificationStateIDLE; + subghz_txrx_stop(app->subghz->txrx); + meal_pager_blink_stop(app); + //notification_message(app->notification, &sequence_blink_magenta_10); } return true; } diff --git a/views/meal_pager_transmit.c b/views/meal_pager_transmit.c index 2e7a57b82a0..62166669ca5 100644 --- a/views/meal_pager_transmit.c +++ b/views/meal_pager_transmit.c @@ -48,8 +48,9 @@ void meal_pager_transmit_draw(Canvas* canvas, Meal_PagerTransmitModel* model) { snprintf(pagerText, 20, "Pager: %lu", model->pager); canvas_draw_str_aligned(canvas, 0, 10, AlignLeft, AlignTop, pager_type_text_long[model->pager_type]); canvas_set_font(canvas, FontSecondary); - canvas_draw_str_aligned(canvas, 0, 22, AlignLeft, AlignTop, stationText); - canvas_draw_str_aligned(canvas, 0, 32, AlignLeft, AlignTop, pagerText); + canvas_draw_str_aligned(canvas, 0, 22, AlignLeft, AlignTop, "Generating Data"); + canvas_draw_str_aligned(canvas, 0, 32, AlignLeft, AlignTop, stationText); + canvas_draw_str_aligned(canvas, 0, 42, AlignLeft, AlignTop, pagerText); } static void meal_pager_transmit_model_init(Meal_PagerTransmitModel* const model) {