mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 23:14:20 +00:00
[FL-2564]SubGhz: 0.59.0-rc bugfixes (#1292)
This commit is contained in:
parent
40e3df9979
commit
8b54436950
4 changed files with 34 additions and 26 deletions
|
@ -5,6 +5,26 @@ typedef enum {
|
|||
SubGhzCustomEventManagerSet,
|
||||
SubGhzCustomEventManagerSetRAW,
|
||||
|
||||
//SubmenuIndex
|
||||
SubmenuIndexPricenton,
|
||||
SubmenuIndexNiceFlo12bit,
|
||||
SubmenuIndexNiceFlo24bit,
|
||||
SubmenuIndexCAME12bit,
|
||||
SubmenuIndexCAME24bit,
|
||||
SubmenuIndexCAMETwee,
|
||||
SubmenuIndexNeroSketch,
|
||||
SubmenuIndexNeroRadio,
|
||||
SubmenuIndexGateTX,
|
||||
SubmenuIndexDoorHan_315_00,
|
||||
SubmenuIndexDoorHan_433_92,
|
||||
SubmenuIndexLinear_300_00,
|
||||
SubmenuIndexLiftMaster_315_00,
|
||||
SubmenuIndexLiftMaster_390_00,
|
||||
SubmenuIndexSecPlus_v2_310_00,
|
||||
SubmenuIndexSecPlus_v2_315_00,
|
||||
SubmenuIndexSecPlus_v2_390_00,
|
||||
|
||||
//SubGhzCustomEvent
|
||||
SubGhzCustomEventSceneDeleteSuccess = 100,
|
||||
SubGhzCustomEventSceneDelete,
|
||||
SubGhzCustomEventSceneDeleteRAW,
|
||||
|
|
|
@ -26,9 +26,15 @@ bool subghz_scene_delete_success_on_event(void* context, SceneManagerEvent event
|
|||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubGhzCustomEventSceneDeleteSuccess) {
|
||||
if(!scene_manager_search_and_switch_to_previous_scene(
|
||||
subghz->scene_manager, SubGhzSceneSaved)) {
|
||||
if(scene_manager_search_and_switch_to_previous_scene(
|
||||
subghz->scene_manager, SubGhzSceneReadRAW)) {
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneReadRAW);
|
||||
} else if(scene_manager_search_and_switch_to_previous_scene(
|
||||
subghz->scene_manager, SubGhzSceneSaved)) {
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSaved);
|
||||
} else {
|
||||
scene_manager_search_and_switch_to_previous_scene(
|
||||
subghz->scene_manager, SubGhzSceneStart);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -167,11 +167,13 @@ bool subghz_scene_read_raw_on_event(void* context, SceneManagerEvent event) {
|
|||
break;
|
||||
|
||||
case SubGhzCustomEventViewReadRAWErase:
|
||||
subghz->txrx->rx_key_state = SubGhzRxKeyStateIDLE;
|
||||
if(subghz_scene_read_raw_update_filename(subghz)) {
|
||||
string_set(subghz->file_path_tmp, subghz->file_path);
|
||||
subghz_delete_file(subghz);
|
||||
if(subghz->txrx->rx_key_state == SubGhzRxKeyStateAddKey) {
|
||||
if(subghz_scene_read_raw_update_filename(subghz)) {
|
||||
string_set(subghz->file_path_tmp, subghz->file_path);
|
||||
subghz_delete_file(subghz);
|
||||
}
|
||||
}
|
||||
subghz->txrx->rx_key_state = SubGhzRxKeyStateIDLE;
|
||||
notification_message(subghz->notifications, &sequence_reset_rgb);
|
||||
return true;
|
||||
break;
|
||||
|
|
|
@ -10,26 +10,6 @@
|
|||
|
||||
#define TAG "SubGhzSetType"
|
||||
|
||||
enum SubmenuIndex {
|
||||
SubmenuIndexPricenton,
|
||||
SubmenuIndexNiceFlo12bit,
|
||||
SubmenuIndexNiceFlo24bit,
|
||||
SubmenuIndexCAME12bit,
|
||||
SubmenuIndexCAME24bit,
|
||||
SubmenuIndexCAMETwee,
|
||||
SubmenuIndexNeroSketch,
|
||||
SubmenuIndexNeroRadio,
|
||||
SubmenuIndexGateTX,
|
||||
SubmenuIndexDoorHan_315_00,
|
||||
SubmenuIndexDoorHan_433_92,
|
||||
SubmenuIndexLinear_300_00,
|
||||
SubmenuIndexLiftMaster_315_00,
|
||||
SubmenuIndexLiftMaster_390_00,
|
||||
SubmenuIndexSecPlus_v2_310_00,
|
||||
SubmenuIndexSecPlus_v2_315_00,
|
||||
SubmenuIndexSecPlus_v2_390_00,
|
||||
};
|
||||
|
||||
bool subghz_scene_set_type_submenu_gen_data_protocol(
|
||||
void* context,
|
||||
const char* protocol_name,
|
||||
|
|
Loading…
Reference in a new issue