diff --git a/application.fam b/application.fam index 74c9c673690..f969f9dc50d 100644 --- a/application.fam +++ b/application.fam @@ -14,8 +14,5 @@ App( Lib( name="worker", ), - Lib( - name="led", - ), ], ) diff --git a/lib/led/nfc_playlist_led.c b/lib/led/nfc_playlist_led.c deleted file mode 100644 index 6411f185335..00000000000 --- a/lib/led/nfc_playlist_led.c +++ /dev/null @@ -1,42 +0,0 @@ -#include "nfc_playlist_led.h" - -NotificationMessage blink_message_normal = { - .type = NotificationMessageTypeLedBlinkStart, - .data.led_blink.color = LightBlue | LightGreen, - .data.led_blink.on_time = 10, - .data.led_blink.period = 100 -}; -const NotificationSequence blink_sequence_normal = { - &blink_message_normal, - &message_do_not_reset, - NULL -}; - -NotificationMessage blink_message_error = { - .type = NotificationMessageTypeLedBlinkStart, - .data.led_blink.color = LightRed, - .data.led_blink.on_time = 10, - .data.led_blink.period = 100 -}; - -const NotificationSequence blink_sequence_error = { - &blink_message_error, - &message_do_not_reset, - NULL -}; - -void start_blink(NfcPlaylist* nfc_playlist, int state) { - if (nfc_playlist->settings.emulate_led_indicator) { - if (state == NfcPlaylistLedState_Normal) { - notification_message_block(nfc_playlist->notification, &blink_sequence_normal); - } else if (state == NfcPlaylistLedState_Error) { - notification_message_block(nfc_playlist->notification, &blink_sequence_error); - } - } -} - -void stop_blink(NfcPlaylist* nfc_playlist) { - if (nfc_playlist->settings.emulate_led_indicator) { - notification_message_block(nfc_playlist->notification, &sequence_blink_stop); - } -} \ No newline at end of file diff --git a/lib/led/nfc_playlist_led.h b/lib/led/nfc_playlist_led.h deleted file mode 100644 index 5864ccad322..00000000000 --- a/lib/led/nfc_playlist_led.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once -#include <../../nfc_playlist.h> -#include - -typedef enum NfcPlaylistLedState { - NfcPlaylistLedState_Normal, - NfcPlaylistLedState_Error -} NfcPlaylistLedState; - -void start_blink(NfcPlaylist* nfc_playlist, int state); -void stop_blink(NfcPlaylist* nfc_playlist); \ No newline at end of file diff --git a/nfc_playlist.c b/nfc_playlist.c index acbe6216dc9..9151a7e852c 100644 --- a/nfc_playlist.c +++ b/nfc_playlist.c @@ -1,51 +1,4 @@ #include "nfc_playlist.h" -#include "nfc_playlist_i.h" - -static void (*const nfc_playlist_scene_on_enter_handlers[])(void*) = { - nfc_playlist_main_menu_scene_on_enter, - nfc_playlist_settings_scene_on_enter, - nfc_playlist_emulation_scene_on_enter, - nfc_playlist_playlist_select_scene_on_enter, - nfc_playlist_file_edit_scene_on_enter, - nfc_playlist_file_rename_scene_on_enter, - nfc_playlist_confirm_delete_scene_on_enter, - nfc_playlist_view_playlist_content_scene_on_enter, - nfc_playlist_nfc_select_scene_on_enter, - nfc_playlist_name_new_file_scene_on_enter -}; - -static bool (*const nfc_playlist_scene_on_event_handlers[])(void*, SceneManagerEvent) = { - nfc_playlist_main_menu_scene_on_event, - nfc_playlist_settings_scene_on_event, - nfc_playlist_emulation_scene_on_event, - nfc_playlist_playlist_select_scene_on_event, - nfc_playlist_file_edit_scene_on_event, - nfc_playlist_file_rename_scene_on_event, - nfc_playlist_confirm_delete_scene_on_event, - nfc_playlist_view_playlist_content_scene_on_event, - nfc_playlist_nfc_select_scene_on_event, - nfc_playlist_name_new_file_scene_on_event -}; - -static void (*const nfc_playlist_scene_on_exit_handlers[])(void*) = { - nfc_playlist_main_menu_scene_on_exit, - nfc_playlist_settings_scene_on_exit, - nfc_playlist_emulation_scene_on_exit, - nfc_playlist_playlist_select_scene_on_exit, - nfc_playlist_file_edit_scene_on_exit, - nfc_playlist_file_rename_scene_on_exit, - nfc_playlist_confirm_delete_scene_on_exit, - nfc_playlist_view_playlist_content_scene_on_exit, - nfc_playlist_nfc_select_scene_on_exit, - nfc_playlist_name_new_file_scene_on_exit -}; - -static const SceneManagerHandlers nfc_playlist_scene_manager_handlers = { - .on_enter_handlers = nfc_playlist_scene_on_enter_handlers, - .on_event_handlers = nfc_playlist_scene_on_event_handlers, - .on_exit_handlers = nfc_playlist_scene_on_exit_handlers, - .scene_num = NfcPlaylistScene_count -}; static bool nfc_playlist_custom_callback(void* context, uint32_t custom_event) { furi_assert(context); @@ -62,7 +15,7 @@ static bool nfc_playlist_back_event_callback(void* context) { static NfcPlaylist* nfc_playlist_alloc() { NfcPlaylist* nfc_playlist = malloc(sizeof(NfcPlaylist)); furi_assert(nfc_playlist); - nfc_playlist->scene_manager = scene_manager_alloc(&nfc_playlist_scene_manager_handlers, nfc_playlist); + nfc_playlist->scene_manager = scene_manager_alloc(&nfc_playlist_scene_handlers, nfc_playlist); nfc_playlist->view_dispatcher = view_dispatcher_alloc(); view_dispatcher_enable_queue(nfc_playlist->view_dispatcher); nfc_playlist->variable_item_list = variable_item_list_alloc(); @@ -161,4 +114,45 @@ int32_t nfc_playlist_main(void* p) { nfc_playlist_free(nfc_playlist); return 0; +} + +NotificationMessage blink_message_normal = { + .type = NotificationMessageTypeLedBlinkStart, + .data.led_blink.color = LightBlue | LightGreen, + .data.led_blink.on_time = 10, + .data.led_blink.period = 100 +}; +const NotificationSequence blink_sequence_normal = { + &blink_message_normal, + &message_do_not_reset, + NULL +}; + +NotificationMessage blink_message_error = { + .type = NotificationMessageTypeLedBlinkStart, + .data.led_blink.color = LightRed, + .data.led_blink.on_time = 10, + .data.led_blink.period = 100 +}; + +const NotificationSequence blink_sequence_error = { + &blink_message_error, + &message_do_not_reset, + NULL +}; + +void start_blink(NfcPlaylist* nfc_playlist, int state) { + if (nfc_playlist->settings.emulate_led_indicator) { + if (state == NfcPlaylistLedState_Normal) { + notification_message_block(nfc_playlist->notification, &blink_sequence_normal); + } else if (state == NfcPlaylistLedState_Error) { + notification_message_block(nfc_playlist->notification, &blink_sequence_error); + } + } +} + +void stop_blink(NfcPlaylist* nfc_playlist) { + if (nfc_playlist->settings.emulate_led_indicator) { + notification_message_block(nfc_playlist->notification, &sequence_blink_stop); + } } \ No newline at end of file diff --git a/nfc_playlist.h b/nfc_playlist.h index 5ccedfdbf7a..8c66aa3060d 100644 --- a/nfc_playlist.h +++ b/nfc_playlist.h @@ -19,7 +19,14 @@ #include -#include +#include + +#include +#include + +#include "lib/worker/nfc_playlist_worker.h" + +#include "scenes/nfc_playlist_scene.h" typedef enum { NfcPlaylistView_Menu, @@ -34,20 +41,6 @@ typedef enum { NfcPlaylistView_NameNewFile } NfcPlayScenesView; -typedef enum { - NfcPlaylistScene_MainMenu, - NfcPlaylistScene_Settings, - NfcPlaylistScene_EmulatingPopup, - NfcPlaylistScene_PlaylistSelect, - NfcPlaylistScene_FileEdit, - NfcPlaylistScene_FileRename, - NfcPlaylistScene_ConfirmDelete, - NfcPlaylistScene_ViewPlaylistContent, - NfcPlaylistScene_NfcSelect, - NfcPlaylistScene_NameNewFile, - NfcPlaylistScene_count -} NfcPlaylistScene; - typedef struct { FuriString* file_path; bool playlist_selected; @@ -81,4 +74,12 @@ static const int default_emulate_delay = 0; static const bool default_emulate_led_indicator = true; #define PLAYLIST_LOCATION "/ext/apps_data/nfc_playlist/" -#define PLAYLIST_DIR "/ext/apps_data/nfc_playlist" \ No newline at end of file +#define PLAYLIST_DIR "/ext/apps_data/nfc_playlist" + +typedef enum NfcPlaylistLedState { + NfcPlaylistLedState_Normal, + NfcPlaylistLedState_Error +} NfcPlaylistLedState; + +void start_blink(NfcPlaylist* nfc_playlist, int state); +void stop_blink(NfcPlaylist* nfc_playlist); \ No newline at end of file diff --git a/nfc_playlist_i.h b/nfc_playlist_i.h deleted file mode 100644 index fbfa9612564..00000000000 --- a/nfc_playlist_i.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once -#include "scenes/main_menu.h" -#include "scenes/settings.h" -#include "scenes/emulation.h" -#include "scenes/playlist_select.h" -#include "scenes/file_edit.h" -#include "scenes/file_rename.h" -#include "scenes/confirm_delete.h" -#include "scenes/view_playlist_content.h" -#include "scenes/nfc_select.h" -#include "scenes/name_new_file.h" \ No newline at end of file diff --git a/scenes/confirm_delete.h b/scenes/confirm_delete.h deleted file mode 100644 index 6a990db97f2..00000000000 --- a/scenes/confirm_delete.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include - -void nfc_playlist_confirm_delete_scene_on_enter(void* context); -bool nfc_playlist_confirm_delete_scene_on_event(void* context, SceneManagerEvent event); -void nfc_playlist_confirm_delete_scene_on_exit(void* context); \ No newline at end of file diff --git a/scenes/emulation.h b/scenes/emulation.h deleted file mode 100644 index 6ec765aac78..00000000000 --- a/scenes/emulation.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void nfc_playlist_emulation_scene_on_enter(void* context); -bool nfc_playlist_emulation_scene_on_event(void* context, SceneManagerEvent event); -void nfc_playlist_emulation_scene_on_exit(void* context); - -typedef enum NfcPlaylistEmulationState { - NfcPlaylistEmulationState_Emulating, - NfcPlaylistEmulationState_Stopped, - NfcPlaylistEmulationState_Canceled -} NfcPlaylistEmulationState; \ No newline at end of file diff --git a/scenes/file_edit.h b/scenes/file_edit.h deleted file mode 100644 index 43578343221..00000000000 --- a/scenes/file_edit.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once -#include -#include -#include -#include - -void nfc_playlist_file_edit_scene_on_enter(void* context); -bool nfc_playlist_file_edit_scene_on_event(void* context, SceneManagerEvent event); -void nfc_playlist_file_edit_scene_on_exit(void* context); - -typedef enum { - NfcPlaylistMenuSelection_CreatePlaylist, - NfcPlaylistMenuSelection_DeletePlaylist, - NfcPlaylistMenuSelection_RenamePlaylist, - NfcPlaylistMenuSelection_ViewPlaylistContent, - NfcPlaylistMenuSelection_AddNfcItem -} NfcPlaylistFileEditMenuSelection; \ No newline at end of file diff --git a/scenes/file_rename.h b/scenes/file_rename.h deleted file mode 100644 index b4ff8aa23e3..00000000000 --- a/scenes/file_rename.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include - -void nfc_playlist_file_rename_scene_on_enter(void* context); -bool nfc_playlist_file_rename_scene_on_event(void* context, SceneManagerEvent event); -void nfc_playlist_file_rename_scene_on_exit(void* context); \ No newline at end of file diff --git a/scenes/main_menu.h b/scenes/main_menu.h deleted file mode 100644 index a74c4c6e769..00000000000 --- a/scenes/main_menu.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once -#include -#include -#include -#include - -void nfc_playlist_main_menu_scene_on_enter(void* context); -bool nfc_playlist_main_menu_scene_on_event(void* context, SceneManagerEvent event); -void nfc_playlist_main_menu_scene_on_exit(void* context); - -typedef enum { - NfcPlaylistEvent_ShowEmulatingPopup, - NfcPlaylistEvent_ShowPlaylistSelect, - NfcPlaylistEvent_ShowFileEdit, - NfcPlaylistEvent_ShowSettings -} NfcPlaylistMainMenuEvent; - -typedef enum { - NfcPlaylistMenuSelection_Start, - NfcPlaylistMenuSelection_PlaylistSelect, - NfcPlaylistMenuSelection_FileEdit, - NfcPlaylistMenuSelection_Settings -} NfcPlaylistMainMenuMenuSelection; \ No newline at end of file diff --git a/scenes/name_new_file.h b/scenes/name_new_file.h deleted file mode 100644 index d0a061a539a..00000000000 --- a/scenes/name_new_file.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include - -void nfc_playlist_name_new_file_scene_on_enter(void* context); -bool nfc_playlist_name_new_file_scene_on_event(void* context, SceneManagerEvent event); -void nfc_playlist_name_new_file_scene_on_exit(void* context); \ No newline at end of file diff --git a/scenes/nfc_playlist_scene.c b/scenes/nfc_playlist_scene.c new file mode 100644 index 00000000000..aed28723565 --- /dev/null +++ b/scenes/nfc_playlist_scene.c @@ -0,0 +1,30 @@ +#include "nfc_playlist_scene.h" + +// Generate scene on_enter handlers definition +#define ADD_SCENE(prefix, name, id) prefix##_##name##_scene_on_enter, +void (*const nfc_playlist_on_enter_handlers[])(void*) = { +#include "nfc_playlist_scene_config.h" +}; +#undef ADD_SCENE + +// Generate scene on_event handlers array +#define ADD_SCENE(prefix, name, id) prefix##_##name##_scene_on_event, +bool (*const nfc_playlist_on_event_handlers[])(void* context, SceneManagerEvent event) = { +#include "nfc_playlist_scene_config.h" +}; +#undef ADD_SCENE + +// Generate scene on_exit handlers array +#define ADD_SCENE(prefix, name, id) prefix##_##name##_scene_on_exit, +void (*const nfc_playlist_on_exit_handlers[])(void* context) = { +#include "nfc_playlist_scene_config.h" +}; +#undef ADD_SCENE + +// Initialize scene handlers configuration structure +const SceneManagerHandlers nfc_playlist_scene_handlers = { + .on_enter_handlers = nfc_playlist_on_enter_handlers, + .on_event_handlers = nfc_playlist_on_event_handlers, + .on_exit_handlers = nfc_playlist_on_exit_handlers, + .scene_num = NfcPlaylistScene_Count, +}; \ No newline at end of file diff --git a/scenes/nfc_playlist_scene.h b/scenes/nfc_playlist_scene.h new file mode 100644 index 00000000000..e2d90753089 --- /dev/null +++ b/scenes/nfc_playlist_scene.h @@ -0,0 +1,29 @@ +#pragma once + +#include + +// Generate scene id and total number +#define ADD_SCENE(prefix, name, id) NfcPlaylistScene_##id, +typedef enum { +#include "nfc_playlist_scene_config.h" + NfcPlaylistScene_Count +} NfcPlaylistScene; +#undef ADD_SCENE + +extern const SceneManagerHandlers nfc_playlist_scene_handlers; + +// Generate scene on_enter handlers declaration +#define ADD_SCENE(prefix, name, id) void prefix##_##name##_scene_on_enter(void*); +#include "nfc_playlist_scene_config.h" +#undef ADD_SCENE + +// Generate scene on_event handlers declaration +#define ADD_SCENE(prefix, name, id) \ + bool prefix##_##name##_scene_on_event(void* context, SceneManagerEvent event); +#include "nfc_playlist_scene_config.h" +#undef ADD_SCENE + +// Generate scene on_exit handlers declaration +#define ADD_SCENE(prefix, name, id) void prefix##_##name##_scene_on_exit(void* context); +#include "nfc_playlist_scene_config.h" +#undef ADD_SCENE \ No newline at end of file diff --git a/scenes/nfc_playlist_scene_config.h b/scenes/nfc_playlist_scene_config.h new file mode 100644 index 00000000000..e77695f0655 --- /dev/null +++ b/scenes/nfc_playlist_scene_config.h @@ -0,0 +1,10 @@ +ADD_SCENE(nfc_playlist, confirm_delete, ConfirmDelete) +ADD_SCENE(nfc_playlist, emulation, EmulatingPopup) +ADD_SCENE(nfc_playlist, file_edit, FileEdit) +ADD_SCENE(nfc_playlist, file_rename, FileRename) +ADD_SCENE(nfc_playlist, main_menu, MainMenu) +ADD_SCENE(nfc_playlist, name_new_file, NameNewFile) +ADD_SCENE(nfc_playlist, nfc_select, NfcSelect) +ADD_SCENE(nfc_playlist, playlist_select, PlaylistSelect) +ADD_SCENE(nfc_playlist, settings, Settings) +ADD_SCENE(nfc_playlist, view_playlist_content, ViewPlaylistContent) \ No newline at end of file diff --git a/scenes/confirm_delete.c b/scenes/nfc_playlist_scene_confirm_delete.c similarity index 97% rename from scenes/confirm_delete.c rename to scenes/nfc_playlist_scene_confirm_delete.c index e01d67c5d5b..2b48e5f3bb9 100644 --- a/scenes/confirm_delete.c +++ b/scenes/nfc_playlist_scene_confirm_delete.c @@ -1,5 +1,4 @@ -#include "nfc_playlist.h" -#include "scenes/confirm_delete.h" +#include "../nfc_playlist.h" void nfc_playlist_confirm_delete_menu_callback(GuiButtonType result, InputType type, void* context) { NfcPlaylist* nfc_playlist = context; diff --git a/scenes/emulation.c b/scenes/nfc_playlist_scene_emulation.c similarity index 97% rename from scenes/emulation.c rename to scenes/nfc_playlist_scene_emulation.c index 978e795339f..4f77796b234 100644 --- a/scenes/emulation.c +++ b/scenes/nfc_playlist_scene_emulation.c @@ -1,5 +1,10 @@ -#include "nfc_playlist.h" -#include "scenes/emulation.h" +#include "../nfc_playlist.h" + +typedef enum NfcPlaylistEmulationState { + NfcPlaylistEmulationState_Emulating, + NfcPlaylistEmulationState_Stopped, + NfcPlaylistEmulationState_Canceled +} NfcPlaylistEmulationState; NfcPlaylistEmulationState EmulationState = NfcPlaylistEmulationState_Stopped; diff --git a/scenes/file_edit.c b/scenes/nfc_playlist_scene_file_edit.c similarity index 91% rename from scenes/file_edit.c rename to scenes/nfc_playlist_scene_file_edit.c index e3d35a2effa..25849ee60f0 100644 --- a/scenes/file_edit.c +++ b/scenes/nfc_playlist_scene_file_edit.c @@ -1,5 +1,12 @@ -#include "nfc_playlist.h" -#include "scenes/file_edit.h" +#include "../nfc_playlist.h" + +typedef enum { + NfcPlaylistMenuSelection_CreatePlaylist, + NfcPlaylistMenuSelection_DeletePlaylist, + NfcPlaylistMenuSelection_RenamePlaylist, + NfcPlaylistMenuSelection_ViewPlaylistContent, + NfcPlaylistMenuSelection_AddNfcItem +} NfcPlaylistFileEditMenuSelection; void nfc_playlist_file_edit_menu_callback(void* context, uint32_t index) { NfcPlaylist* nfc_playlist = context; diff --git a/scenes/file_rename.c b/scenes/nfc_playlist_scene_file_rename.c similarity index 97% rename from scenes/file_rename.c rename to scenes/nfc_playlist_scene_file_rename.c index 3ded301c663..c5f1c53757b 100644 --- a/scenes/file_rename.c +++ b/scenes/nfc_playlist_scene_file_rename.c @@ -1,5 +1,4 @@ -#include "nfc_playlist.h" -#include "scenes/file_rename.h" +#include "../nfc_playlist.h" void nfc_playlist_file_rename_menu_callback(void* context) { NfcPlaylist* nfc_playlist = context; diff --git a/scenes/main_menu.c b/scenes/nfc_playlist_scene_main_menu.c similarity index 87% rename from scenes/main_menu.c rename to scenes/nfc_playlist_scene_main_menu.c index c744937a2ae..d39a6fa880e 100644 --- a/scenes/main_menu.c +++ b/scenes/nfc_playlist_scene_main_menu.c @@ -1,5 +1,18 @@ -#include "nfc_playlist.h" -#include "scenes/main_menu.h" +#include "../nfc_playlist.h" + +typedef enum { + NfcPlaylistEvent_ShowEmulatingPopup, + NfcPlaylistEvent_ShowPlaylistSelect, + NfcPlaylistEvent_ShowFileEdit, + NfcPlaylistEvent_ShowSettings +} NfcPlaylistMainMenuEvent; + +typedef enum { + NfcPlaylistMenuSelection_Start, + NfcPlaylistMenuSelection_PlaylistSelect, + NfcPlaylistMenuSelection_FileEdit, + NfcPlaylistMenuSelection_Settings +} NfcPlaylistMainMenuMenuSelection; void nfc_playlist_main_menu_menu_callback(void* context, uint32_t index) { NfcPlaylist* nfc_playlist = context; diff --git a/scenes/name_new_file.c b/scenes/nfc_playlist_scene_name_new_file.c similarity index 96% rename from scenes/name_new_file.c rename to scenes/nfc_playlist_scene_name_new_file.c index 20c7e592e35..1746dd3c009 100644 --- a/scenes/name_new_file.c +++ b/scenes/nfc_playlist_scene_name_new_file.c @@ -1,5 +1,4 @@ -#include "nfc_playlist.h" -#include "scenes/name_new_file.h" +#include "../nfc_playlist.h" void nfc_playlist_name_new_file_menu_callback(void* context) { NfcPlaylist* nfc_playlist = context; diff --git a/scenes/nfc_select.c b/scenes/nfc_playlist_scene_nfc_select.c similarity index 97% rename from scenes/nfc_select.c rename to scenes/nfc_playlist_scene_nfc_select.c index 3698cc29fa6..59af5374ef2 100644 --- a/scenes/nfc_select.c +++ b/scenes/nfc_playlist_scene_nfc_select.c @@ -1,5 +1,6 @@ -#include "nfc_playlist.h" -#include "scenes/nfc_select.h" +#include "../nfc_playlist.h" + +#define MAX_PLAYLIST_SIZE 1000 void nfc_playlist_nfc_select_menu_callback(void* context) { NfcPlaylist* nfc_playlist = context; diff --git a/scenes/playlist_select.c b/scenes/nfc_playlist_scene_playlist_select.c similarity index 95% rename from scenes/playlist_select.c rename to scenes/nfc_playlist_scene_playlist_select.c index 9b169b608db..5631eb83c6b 100644 --- a/scenes/playlist_select.c +++ b/scenes/nfc_playlist_scene_playlist_select.c @@ -1,5 +1,4 @@ -#include "nfc_playlist.h" -#include "scenes/playlist_select.h" +#include "../nfc_playlist.h" void nfc_playlist_playlist_select_menu_callback(void* context) { NfcPlaylist* nfc_playlist = context; diff --git a/scenes/settings.c b/scenes/nfc_playlist_scene_settings.c similarity index 96% rename from scenes/settings.c rename to scenes/nfc_playlist_scene_settings.c index 27b2dde3791..7ea1bcb7720 100644 --- a/scenes/settings.c +++ b/scenes/nfc_playlist_scene_settings.c @@ -1,5 +1,11 @@ -#include "nfc_playlist.h" -#include "scenes/settings.h" +#include "../nfc_playlist.h" + +typedef enum { + NfcPlaylistSettings_Timeout, + NfcPlaylistSettings_Delay, + NfcPlaylistSettings_LedIndicator, + NfcPlaylistSettings_Reset +} NfcPlaylistSettingsMenuSelection; void nfc_playlist_settings_menu_callback(void* context, uint32_t index) { NfcPlaylist* nfc_playlist = context; diff --git a/scenes/view_playlist_content.c b/scenes/nfc_playlist_scene_view_playlist_content.c similarity index 95% rename from scenes/view_playlist_content.c rename to scenes/nfc_playlist_scene_view_playlist_content.c index 14cba39516c..d30bb5c2e37 100644 --- a/scenes/view_playlist_content.c +++ b/scenes/nfc_playlist_scene_view_playlist_content.c @@ -1,5 +1,6 @@ -#include "nfc_playlist.h" -#include "scenes/view_playlist_content.h" +#include "../nfc_playlist.h" + +#define MAX_PLAYLIST_SIZE 1000 void nfc_playlist_view_playlist_content_scene_on_enter(void* context) { NfcPlaylist* nfc_playlist = context; diff --git a/scenes/nfc_select.h b/scenes/nfc_select.h deleted file mode 100644 index 3c179327633..00000000000 --- a/scenes/nfc_select.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include - -void nfc_playlist_nfc_select_scene_on_enter(void* context); -bool nfc_playlist_nfc_select_scene_on_event(void* context, SceneManagerEvent event); -void nfc_playlist_nfc_select_scene_on_exit(void* context); - -#define MAX_PLAYLIST_SIZE 1000 \ No newline at end of file diff --git a/scenes/playlist_select.h b/scenes/playlist_select.h deleted file mode 100644 index 0d22363a241..00000000000 --- a/scenes/playlist_select.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once -#include -#include -#include -#include - -void nfc_playlist_playlist_select_scene_on_enter(void* context); -bool nfc_playlist_playlist_select_scene_on_event(void* context, SceneManagerEvent event); -void nfc_playlist_playlist_select_scene_on_exit(void* context); \ No newline at end of file diff --git a/scenes/settings.h b/scenes/settings.h deleted file mode 100644 index ecb8a933caf..00000000000 --- a/scenes/settings.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once -#include -#include -#include -#include - -void nfc_playlist_settings_scene_on_enter(void* context); -bool nfc_playlist_settings_scene_on_event(void* context, SceneManagerEvent event); -void nfc_playlist_settings_scene_on_exit(void* context); - -typedef enum { - NfcPlaylistSettings_Timeout, - NfcPlaylistSettings_Delay, - NfcPlaylistSettings_LedIndicator, - NfcPlaylistSettings_Reset -} NfcPlaylistSettingsMenuSelection; \ No newline at end of file diff --git a/scenes/view_playlist_content.h b/scenes/view_playlist_content.h deleted file mode 100644 index 45c28be0ef3..00000000000 --- a/scenes/view_playlist_content.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include - -void nfc_playlist_view_playlist_content_scene_on_enter(void* context); -bool nfc_playlist_view_playlist_content_scene_on_event(void* context, SceneManagerEvent event); -void nfc_playlist_view_playlist_content_scene_on_exit(void* context); - -#define MAX_PLAYLIST_SIZE 1000 \ No newline at end of file