[FL-2564]SubGhz: 0.59.0-rc bugfixes (#1292)

This commit is contained in:
Skorpionm 2022-06-03 11:46:25 +04:00 committed by GitHub
parent 40e3df9979
commit 8b54436950
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 26 deletions

View File

@ -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,

View File

@ -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;
}

View File

@ -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;

View File

@ -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,