mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-18 19:01:47 +03:00
Fix issue with external module settings
It was possible to set it to external module without module connected, and as it saves its state in memory, all other plugins that uses subghz will not work, now we checking for module when you changing that setting
This commit is contained in:
parent
edddfbcb2c
commit
8c50225da4
@ -44,11 +44,20 @@ bool subghz_scene_ext_module_settings_on_event(void* context, SceneManagerEvent
|
||||
UNUSED(subghz);
|
||||
UNUSED(event);
|
||||
|
||||
furi_hal_subghz_set_radio_type(value_index);
|
||||
|
||||
if(!furi_hal_subghz_check_radio()) {
|
||||
value_index = 0;
|
||||
furi_hal_subghz_set_radio_type(value_index);
|
||||
furi_string_set(subghz->error_str, "Please connect\nexternal radio");
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowErrorSub);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void subghz_scene_ext_module_settings_on_exit(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
variable_item_list_reset(subghz->variable_item_list);
|
||||
furi_hal_subghz_set_radio_type(value_index);
|
||||
//furi_hal_subghz_set_radio_type(value_index);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user