Просмотр исходного кода

Fix for wrong blinking settings

David Lee 2 лет назад
Родитель
Сommit
c687b9dd1d
2 измененных файлов с 6 добавлено и 5 удалено
  1. 5 1
      scenes/meal_pager_scene_menu.c
  2. 1 4
      scenes/meal_pager_scene_transmit.c

+ 5 - 1
scenes/meal_pager_scene_menu.c

@@ -1,4 +1,5 @@
 #include "../meal_pager_i.h"
 #include "../meal_pager_i.h"
+#include "../helpers/meal_pager_led.h"
 
 
 enum SubmenuIndex {
 enum SubmenuIndex {
     SubmenuIndexTransmit = 10,
     SubmenuIndexTransmit = 10,
@@ -52,7 +53,10 @@ bool meal_pager_scene_menu_on_event(void* context, SceneManagerEvent event) {
         }
         }
     } else if(event.type == SceneManagerEventTypeTick) {
     } else if(event.type == SceneManagerEventTypeTick) {
         if(app->state_notifications == SubGhzNotificationStateTx) {
         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;
         return true;
     }
     }

+ 1 - 4
scenes/meal_pager_scene_transmit.c

@@ -75,10 +75,7 @@ bool meal_pager_scene_transmit_on_event(void* context, SceneManagerEvent event)
         }
         }
     } else if(event.type == SceneManagerEventTypeTick) {
     } else if(event.type == SceneManagerEventTypeTick) {
         if(app->state_notifications == SubGhzNotificationStateTx) {
         if(app->state_notifications == SubGhzNotificationStateTx) {
-            app->state_notifications = SubGhzNotificationStateIDLE;
-            subghz_txrx_stop(app->subghz->txrx);
-            meal_pager_blink_stop(app);
-            //notification_message(app->notification, &sequence_blink_magenta_10);
+            notification_message(app->notification, &sequence_blink_magenta_10);
         }
         }
         return true;
         return true;
     }
     }