e17336498d
* Gui: move rotation logic to ViewPort, replace delayed View switch in ViewDispatcher with event filtering and redirection to previous view. * SubGhz: add function description * Gui, Input: add event id to input events. * SubGhz: fix "crashing on ?" * SubGhz: add icon scanning * SubGhz: updated interface read scene, updated interface config scene * Assets: update subghz assets * SubGhz: replaced the picture in the read scene, changed the paths to additional files * SubGhz: fix deadlock in timer callback * SubGhz: fix icon read scene * SubGhz: fix icon read scene * SubGhz: fix duble text transmitter scene * SubGhz: correct spelling. Gui: bigger queue for ViewDispatcher. * SubGhz: fix creation and transmission of dynamic code without the presence of a manufactory key * SubGhz: fix keelog, setting a name in the absence of a manufactory key * SubGhz: fix load bad keelog key * Format sources * Furi: remove garbage from core. GpioTester: fix memory leak and cleanup * Accessor: remove obsolete notification code * MusicPlayer: remove input event injection * Input: rename id to sequence Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
49 lines
1.6 KiB
C
49 lines
1.6 KiB
C
#include "../subghz_i.h"
|
|
|
|
#define SCENE_NO_MAN_CUSTOM_EVENT (11UL)
|
|
|
|
void subghz_scene_no_man_popup_callback(void* context) {
|
|
SubGhz* subghz = context;
|
|
view_dispatcher_send_custom_event(subghz->view_dispatcher, SCENE_NO_MAN_CUSTOM_EVENT);
|
|
}
|
|
|
|
const void subghz_scene_no_man_on_enter(void* context) {
|
|
SubGhz* subghz = context;
|
|
|
|
// Setup view
|
|
Popup* popup = subghz->popup;
|
|
popup_set_icon(popup, 32, 12, &I_DolphinFirstStart7_61x51);
|
|
popup_set_header(popup, "No manufactory key", 13, 8, AlignLeft, AlignBottom);
|
|
popup_set_timeout(popup, 1500);
|
|
popup_set_context(popup, subghz);
|
|
popup_set_callback(popup, subghz_scene_no_man_popup_callback);
|
|
popup_enable_timeout(popup);
|
|
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewPopup);
|
|
}
|
|
|
|
const bool subghz_scene_no_man_on_event(void* context, SceneManagerEvent event) {
|
|
SubGhz* subghz = context;
|
|
if(event.type == SceneManagerEventTypeCustom) {
|
|
if(event.event == SCENE_NO_MAN_CUSTOM_EVENT) {
|
|
scene_manager_search_and_switch_to_previous_scene(
|
|
subghz->scene_manager, SubGhzSceneStart);
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
const void subghz_scene_no_man_on_exit(void* context) {
|
|
SubGhz* subghz = context;
|
|
|
|
// Clear view
|
|
Popup* popup = subghz->popup;
|
|
popup_set_header(popup, NULL, 0, 0, AlignCenter, AlignBottom);
|
|
popup_set_text(popup, NULL, 0, 0, AlignCenter, AlignTop);
|
|
popup_set_icon(popup, 0, 0, NULL);
|
|
popup_set_callback(popup, NULL);
|
|
popup_set_context(popup, NULL);
|
|
popup_set_timeout(popup, 0);
|
|
popup_disable_timeout(popup);
|
|
}
|