[FL-2230] SubGhz: protocol API refactoring (#969)
* SubGhz: protocols library refactoring * SubGhz: new architecture and refactoring * SubGhz: simplify protocol structure, remove unused types * SubGhz: rename Subghz to SubGhz * SubGhz: add environment concept Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com> Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
void subghz_scene_save_success_popup_callback(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubghzCustomEventSceneSaveSuccess);
|
||||
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventSceneSaveSuccess);
|
||||
}
|
||||
|
||||
void subghz_scene_save_success_on_enter(void* context) {
|
||||
@@ -20,13 +20,13 @@ void subghz_scene_save_success_on_enter(void* context) {
|
||||
popup_set_context(popup, subghz);
|
||||
popup_set_callback(popup, subghz_scene_save_success_popup_callback);
|
||||
popup_enable_timeout(popup);
|
||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewPopup);
|
||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdPopup);
|
||||
}
|
||||
|
||||
bool subghz_scene_save_success_on_event(void* context, SceneManagerEvent event) {
|
||||
SubGhz* subghz = context;
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubghzCustomEventSceneSaveSuccess) {
|
||||
if(event.event == SubGhzCustomEventSceneSaveSuccess) {
|
||||
if(!scene_manager_search_and_switch_to_previous_scene(
|
||||
subghz->scene_manager, SubGhzSceneReceiver)) {
|
||||
subghz->txrx->rx_key_state = SubGhzRxKeyStateRAWSave;
|
||||
|
Reference in New Issue
Block a user