Esteban Fuentealba 2 лет назад
Родитель
Сommit
89c6726aed
3 измененных файлов с 4 добавлено и 9 удалено
  1. 1 1
      application.fam
  2. 3 2
      gb_live_camera.c
  3. 0 6
      gb_live_camera.h

+ 1 - 1
application.fam

@@ -7,7 +7,7 @@ App(
     requires=["gui"],
     requires=["gui"],
     stack_size=8*1024,
     stack_size=8*1024,
     order=1,
     order=1,
-    fap_version=[1,0],
+    fap_version=[1,1],
     fap_libs=["assets"],
     fap_libs=["assets"],
 	fap_icon="icons/icon.png",
 	fap_icon="icons/icon.png",
     fap_icon_assets="icons",
     fap_icon_assets="icons",

+ 3 - 2
gb_live_camera.c

@@ -224,8 +224,6 @@ static int32_t gb_live_camera_worker(void* context) {
                         false);
                         false);
                 }
                 }
             } while(length > 0);
             } while(length > 0);
-
-            notification_message(app->notification, &sequence_notification);
             with_view_model(app->view, UartDumpModel * model, { UNUSED(model); }, true);
             with_view_model(app->view, UartDumpModel * model, { UNUSED(model); }, true);
         }
         }
     }
     }
@@ -247,6 +245,8 @@ static UartEchoApp* gb_live_camera_app_alloc() {
     view_dispatcher_enable_queue(app->view_dispatcher);
     view_dispatcher_enable_queue(app->view_dispatcher);
     view_dispatcher_attach_to_gui(app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
     view_dispatcher_attach_to_gui(app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
 
 
+    //  Turn backlight on
+    notification_message(app->notification, &sequence_display_backlight_enforce_on);
     // Views
     // Views
     app->view = view_alloc();
     app->view = view_alloc();
     view_set_context(app->view, app);
     view_set_context(app->view, app);
@@ -294,6 +294,7 @@ static void gb_live_camera_app_free(UartEchoApp* app) {
     furi_hal_uart_set_irq_cb(FuriHalUartIdLPUART1, NULL, NULL);
     furi_hal_uart_set_irq_cb(FuriHalUartIdLPUART1, NULL, NULL);
     furi_hal_uart_deinit(FuriHalUartIdLPUART1);
     furi_hal_uart_deinit(FuriHalUartIdLPUART1);
 
 
+    notification_message(app->notification, &sequence_display_backlight_enforce_auto);
     // Free views
     // Free views
     view_dispatcher_remove_view(app->view_dispatcher, 0);
     view_dispatcher_remove_view(app->view_dispatcher, 0);
 
 

+ 0 - 6
gb_live_camera.h

@@ -81,9 +81,3 @@ typedef enum {
 } WorkerEventFlags;
 } WorkerEventFlags;
 
 
 #define WORKER_EVENTS_MASK (WorkerEventStop | WorkerEventRx)
 #define WORKER_EVENTS_MASK (WorkerEventStop | WorkerEventRx)
-
-const NotificationSequence sequence_notification = {
-    &message_display_backlight_on,
-    &message_delay_10,
-    NULL,
-};