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

Tone Generator: Add indicator (by Matt)

Co-authored-by: Matthew <mkukanichgmu@gmail.com>
Willy-JL 1 год назад
Родитель
Сommit
30563727e8
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      tone_gen/src/scenes/playback_scene.c

+ 7 - 1
tone_gen/src/scenes/playback_scene.c

@@ -1,4 +1,5 @@
 #include <furi_hal.h>
 #include <furi_hal.h>
+#include <notification/notification_messages.h>
 
 
 #include "playback_scene.h"
 #include "playback_scene.h"
 #include "../app_context.h"
 #include "../app_context.h"
@@ -64,7 +65,9 @@ void scene_on_enter_playback_scene(void* context) {
     // Set the currently active view
     // Set the currently active view
     FURI_LOG_I(TAG, "setting active view");
     FURI_LOG_I(TAG, "setting active view");
     view_dispatcher_switch_to_view(app->view_dispatcher, ToneGenAppView_PlaybackView);
     view_dispatcher_switch_to_view(app->view_dispatcher, ToneGenAppView_PlaybackView);
-
+    NotificationApp* notifications = furi_record_open(RECORD_NOTIFICATION);
+    notification_message(notifications, &sequence_set_only_blue_255);
+    furi_record_close(RECORD_NOTIFICATION);
     if(initializeSpeaker()) {
     if(initializeSpeaker()) {
         FURI_LOG_I(TAG, "Starting sound");
         FURI_LOG_I(TAG, "Starting sound");
         startSound(toneDataModel);
         startSound(toneDataModel);
@@ -85,4 +88,7 @@ void scene_on_exit_playback_scene(void* context) {
     UNUSED(context);
     UNUSED(context);
     stopSound();
     stopSound();
     deinitializeSpeaker();
     deinitializeSpeaker();
+    NotificationApp* notifications = furi_record_open(RECORD_NOTIFICATION);
+    notification_message(notifications, &sequence_reset_rgb);
+    furi_record_close(RECORD_NOTIFICATION);
 }
 }