mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 06:38:35 -07:00
Format
This commit is contained in:
@@ -55,11 +55,7 @@ void xtreme_app_scene_protocols_on_enter(void* context) {
|
|||||||
variable_item_set_current_value_text(item, xtreme_settings->bad_bt ? "BT" : "USB");
|
variable_item_set_current_value_text(item, xtreme_settings->bad_bt ? "BT" : "USB");
|
||||||
|
|
||||||
item = variable_item_list_add(
|
item = variable_item_list_add(
|
||||||
var_item_list,
|
var_item_list, "BadBT Rmembr", 2, xtreme_app_scene_protocols_badbt_remember_changed, app);
|
||||||
"BadBT Rmembr",
|
|
||||||
2,
|
|
||||||
xtreme_app_scene_protocols_badbt_remember_changed,
|
|
||||||
app);
|
|
||||||
variable_item_set_current_value_index(item, xtreme_settings->bad_bt_remember);
|
variable_item_set_current_value_index(item, xtreme_settings->bad_bt_remember);
|
||||||
variable_item_set_current_value_text(item, xtreme_settings->bad_bt_remember ? "ON" : "OFF");
|
variable_item_set_current_value_text(item, xtreme_settings->bad_bt_remember ? "ON" : "OFF");
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,11 @@ void xtreme_app_scene_protocols_frequencies_on_enter(void* context) {
|
|||||||
VariableItem* item;
|
VariableItem* item;
|
||||||
|
|
||||||
item = variable_item_list_add(
|
item = variable_item_list_add(
|
||||||
var_item_list, "Use Defaults", 2, xtreme_app_scene_protocols_frequencies_use_defaults_changed, app);
|
var_item_list,
|
||||||
|
"Use Defaults",
|
||||||
|
2,
|
||||||
|
xtreme_app_scene_protocols_frequencies_use_defaults_changed,
|
||||||
|
app);
|
||||||
variable_item_set_current_value_index(item, app->subghz_use_defaults);
|
variable_item_set_current_value_index(item, app->subghz_use_defaults);
|
||||||
variable_item_set_current_value_text(item, app->subghz_use_defaults ? "ON" : "OFF");
|
variable_item_set_current_value_text(item, app->subghz_use_defaults ? "ON" : "OFF");
|
||||||
|
|
||||||
@@ -37,7 +41,8 @@ void xtreme_app_scene_protocols_frequencies_on_enter(void* context) {
|
|||||||
var_item_list, xtreme_app_scene_protocols_frequencies_var_item_list_callback, app);
|
var_item_list, xtreme_app_scene_protocols_frequencies_var_item_list_callback, app);
|
||||||
|
|
||||||
variable_item_list_set_selected_item(
|
variable_item_list_set_selected_item(
|
||||||
var_item_list, scene_manager_get_scene_state(app->scene_manager, XtremeAppSceneProtocolsFrequencies));
|
var_item_list,
|
||||||
|
scene_manager_get_scene_state(app->scene_manager, XtremeAppSceneProtocolsFrequencies));
|
||||||
|
|
||||||
view_dispatcher_switch_to_view(app->view_dispatcher, XtremeAppViewVarItemList);
|
view_dispatcher_switch_to_view(app->view_dispatcher, XtremeAppViewVarItemList);
|
||||||
}
|
}
|
||||||
@@ -47,7 +52,8 @@ bool xtreme_app_scene_protocols_frequencies_on_event(void* context, SceneManager
|
|||||||
bool consumed = false;
|
bool consumed = false;
|
||||||
|
|
||||||
if(event.type == SceneManagerEventTypeCustom) {
|
if(event.type == SceneManagerEventTypeCustom) {
|
||||||
scene_manager_set_scene_state(app->scene_manager, XtremeAppSceneProtocolsFrequencies, event.event);
|
scene_manager_set_scene_state(
|
||||||
|
app->scene_manager, XtremeAppSceneProtocolsFrequencies, event.event);
|
||||||
consumed = true;
|
consumed = true;
|
||||||
switch(event.event) {
|
switch(event.event) {
|
||||||
case VarItemListIndexStaticFrequencies:
|
case VarItemListIndexStaticFrequencies:
|
||||||
|
|||||||
@@ -8,13 +8,14 @@ enum TextInputResult {
|
|||||||
static void xtreme_app_scene_protocols_frequencies_add_text_input_callback(void* context) {
|
static void xtreme_app_scene_protocols_frequencies_add_text_input_callback(void* context) {
|
||||||
XtremeApp* app = context;
|
XtremeApp* app = context;
|
||||||
|
|
||||||
char *end;
|
char* end;
|
||||||
uint32_t value = strtol(app->subghz_freq_buffer, &end, 0) * 10000;
|
uint32_t value = strtol(app->subghz_freq_buffer, &end, 0) * 10000;
|
||||||
if(*end || !furi_hal_subghz_is_frequency_valid(value)) {
|
if(*end || !furi_hal_subghz_is_frequency_valid(value)) {
|
||||||
view_dispatcher_send_custom_event(app->view_dispatcher, TextInputResultError);
|
view_dispatcher_send_custom_event(app->view_dispatcher, TextInputResultError);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool is_hopper = scene_manager_get_scene_state(app->scene_manager, XtremeAppSceneProtocolsFrequenciesAdd);
|
bool is_hopper =
|
||||||
|
scene_manager_get_scene_state(app->scene_manager, XtremeAppSceneProtocolsFrequenciesAdd);
|
||||||
if(is_hopper) {
|
if(is_hopper) {
|
||||||
FrequencyList_push_back(app->subghz_hopper_frequencies, value);
|
FrequencyList_push_back(app->subghz_hopper_frequencies, value);
|
||||||
} else {
|
} else {
|
||||||
@@ -60,7 +61,8 @@ bool xtreme_app_scene_protocols_frequencies_add_on_event(void* context, SceneMan
|
|||||||
break;
|
break;
|
||||||
case TextInputResultError:
|
case TextInputResultError:
|
||||||
popup_set_header(app->popup, "Invalid value!", 64, 26, AlignCenter, AlignCenter);
|
popup_set_header(app->popup, "Invalid value!", 64, 26, AlignCenter, AlignCenter);
|
||||||
popup_set_text(app->popup, "Frequency was not added...", 64, 40, AlignCenter, AlignCenter);
|
popup_set_text(
|
||||||
|
app->popup, "Frequency was not added...", 64, 40, AlignCenter, AlignCenter);
|
||||||
popup_set_callback(app->popup, callback_return);
|
popup_set_callback(app->popup, callback_return);
|
||||||
popup_set_context(app->popup, app);
|
popup_set_context(app->popup, app);
|
||||||
popup_set_timeout(app->popup, 1000);
|
popup_set_timeout(app->popup, 1000);
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ enum VarItemListIndex {
|
|||||||
VarItemListIndexAddHopperFreq,
|
VarItemListIndexAddHopperFreq,
|
||||||
};
|
};
|
||||||
|
|
||||||
void xtreme_app_scene_protocols_frequencies_hopper_var_item_list_callback(void* context, uint32_t index) {
|
void xtreme_app_scene_protocols_frequencies_hopper_var_item_list_callback(
|
||||||
|
void* context,
|
||||||
|
uint32_t index) {
|
||||||
XtremeApp* app = context;
|
XtremeApp* app = context;
|
||||||
view_dispatcher_send_custom_event(app->view_dispatcher, index);
|
view_dispatcher_send_custom_event(app->view_dispatcher, index);
|
||||||
}
|
}
|
||||||
@@ -25,11 +27,17 @@ void xtreme_app_scene_protocols_frequencies_hopper_on_enter(void* context) {
|
|||||||
VariableItemList* var_item_list = app->var_item_list;
|
VariableItemList* var_item_list = app->var_item_list;
|
||||||
VariableItem* item;
|
VariableItem* item;
|
||||||
|
|
||||||
item = variable_item_list_add(var_item_list, "Hopper Freq", FrequencyList_size(app->subghz_hopper_frequencies), xtreme_app_scene_protocols_frequencies_hopper_frequency_changed, app);
|
item = variable_item_list_add(
|
||||||
|
var_item_list,
|
||||||
|
"Hopper Freq",
|
||||||
|
FrequencyList_size(app->subghz_hopper_frequencies),
|
||||||
|
xtreme_app_scene_protocols_frequencies_hopper_frequency_changed,
|
||||||
|
app);
|
||||||
app->subghz_hopper_index = 0;
|
app->subghz_hopper_index = 0;
|
||||||
variable_item_set_current_value_index(item, app->subghz_hopper_index);
|
variable_item_set_current_value_index(item, app->subghz_hopper_index);
|
||||||
if(FrequencyList_size(app->subghz_hopper_frequencies)) {
|
if(FrequencyList_size(app->subghz_hopper_frequencies)) {
|
||||||
uint32_t value = *FrequencyList_get(app->subghz_hopper_frequencies, app->subghz_hopper_index);
|
uint32_t value =
|
||||||
|
*FrequencyList_get(app->subghz_hopper_frequencies, app->subghz_hopper_index);
|
||||||
char text[10] = {0};
|
char text[10] = {0};
|
||||||
snprintf(text, sizeof(text), "%lu.%02lu", value / 1000000, (value % 1000000) / 10000);
|
snprintf(text, sizeof(text), "%lu.%02lu", value / 1000000, (value % 1000000) / 10000);
|
||||||
variable_item_set_current_value_text(item, text);
|
variable_item_set_current_value_text(item, text);
|
||||||
@@ -45,7 +53,9 @@ void xtreme_app_scene_protocols_frequencies_hopper_on_enter(void* context) {
|
|||||||
var_item_list, xtreme_app_scene_protocols_frequencies_hopper_var_item_list_callback, app);
|
var_item_list, xtreme_app_scene_protocols_frequencies_hopper_var_item_list_callback, app);
|
||||||
|
|
||||||
variable_item_list_set_selected_item(
|
variable_item_list_set_selected_item(
|
||||||
var_item_list, scene_manager_get_scene_state(app->scene_manager, XtremeAppSceneProtocolsFrequenciesHopper));
|
var_item_list,
|
||||||
|
scene_manager_get_scene_state(
|
||||||
|
app->scene_manager, XtremeAppSceneProtocolsFrequenciesHopper));
|
||||||
|
|
||||||
view_dispatcher_switch_to_view(app->view_dispatcher, XtremeAppViewVarItemList);
|
view_dispatcher_switch_to_view(app->view_dispatcher, XtremeAppViewVarItemList);
|
||||||
}
|
}
|
||||||
@@ -55,12 +65,14 @@ bool xtreme_app_scene_protocols_frequencies_hopper_on_event(void* context, Scene
|
|||||||
bool consumed = false;
|
bool consumed = false;
|
||||||
|
|
||||||
if(event.type == SceneManagerEventTypeCustom) {
|
if(event.type == SceneManagerEventTypeCustom) {
|
||||||
scene_manager_set_scene_state(app->scene_manager, XtremeAppSceneProtocolsFrequenciesHopper, event.event);
|
scene_manager_set_scene_state(
|
||||||
|
app->scene_manager, XtremeAppSceneProtocolsFrequenciesHopper, event.event);
|
||||||
consumed = true;
|
consumed = true;
|
||||||
switch(event.event) {
|
switch(event.event) {
|
||||||
case VarItemListIndexDeleteHopperFreq:
|
case VarItemListIndexDeleteHopperFreq:
|
||||||
if(!FrequencyList_size(app->subghz_hopper_frequencies)) break;
|
if(!FrequencyList_size(app->subghz_hopper_frequencies)) break;
|
||||||
uint32_t value = *FrequencyList_get(app->subghz_hopper_frequencies, app->subghz_hopper_index);
|
uint32_t value =
|
||||||
|
*FrequencyList_get(app->subghz_hopper_frequencies, app->subghz_hopper_index);
|
||||||
FrequencyList_it_t it;
|
FrequencyList_it_t it;
|
||||||
FrequencyList_it(it, app->subghz_hopper_frequencies);
|
FrequencyList_it(it, app->subghz_hopper_frequencies);
|
||||||
while(!FrequencyList_end_p(it)) {
|
while(!FrequencyList_end_p(it)) {
|
||||||
@@ -75,7 +87,8 @@ bool xtreme_app_scene_protocols_frequencies_hopper_on_event(void* context, Scene
|
|||||||
scene_manager_next_scene(app->scene_manager, XtremeAppSceneProtocolsFrequenciesHopper);
|
scene_manager_next_scene(app->scene_manager, XtremeAppSceneProtocolsFrequenciesHopper);
|
||||||
break;
|
break;
|
||||||
case VarItemListIndexAddHopperFreq:
|
case VarItemListIndexAddHopperFreq:
|
||||||
scene_manager_set_scene_state(app->scene_manager, XtremeAppSceneProtocolsFrequenciesAdd, true);
|
scene_manager_set_scene_state(
|
||||||
|
app->scene_manager, XtremeAppSceneProtocolsFrequenciesAdd, true);
|
||||||
scene_manager_next_scene(app->scene_manager, XtremeAppSceneProtocolsFrequenciesAdd);
|
scene_manager_next_scene(app->scene_manager, XtremeAppSceneProtocolsFrequenciesAdd);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ enum VarItemListIndex {
|
|||||||
VarItemListIndexAddStaticFreq,
|
VarItemListIndexAddStaticFreq,
|
||||||
};
|
};
|
||||||
|
|
||||||
void xtreme_app_scene_protocols_frequencies_static_var_item_list_callback(void* context, uint32_t index) {
|
void xtreme_app_scene_protocols_frequencies_static_var_item_list_callback(
|
||||||
|
void* context,
|
||||||
|
uint32_t index) {
|
||||||
XtremeApp* app = context;
|
XtremeApp* app = context;
|
||||||
view_dispatcher_send_custom_event(app->view_dispatcher, index);
|
view_dispatcher_send_custom_event(app->view_dispatcher, index);
|
||||||
}
|
}
|
||||||
@@ -25,11 +27,17 @@ void xtreme_app_scene_protocols_frequencies_static_on_enter(void* context) {
|
|||||||
VariableItemList* var_item_list = app->var_item_list;
|
VariableItemList* var_item_list = app->var_item_list;
|
||||||
VariableItem* item;
|
VariableItem* item;
|
||||||
|
|
||||||
item = variable_item_list_add(var_item_list, "Static Freq", FrequencyList_size(app->subghz_static_frequencies), xtreme_app_scene_protocols_frequencies_static_frequency_changed, app);
|
item = variable_item_list_add(
|
||||||
|
var_item_list,
|
||||||
|
"Static Freq",
|
||||||
|
FrequencyList_size(app->subghz_static_frequencies),
|
||||||
|
xtreme_app_scene_protocols_frequencies_static_frequency_changed,
|
||||||
|
app);
|
||||||
app->subghz_static_index = 0;
|
app->subghz_static_index = 0;
|
||||||
variable_item_set_current_value_index(item, app->subghz_static_index);
|
variable_item_set_current_value_index(item, app->subghz_static_index);
|
||||||
if(FrequencyList_size(app->subghz_static_frequencies)) {
|
if(FrequencyList_size(app->subghz_static_frequencies)) {
|
||||||
uint32_t value = *FrequencyList_get(app->subghz_static_frequencies, app->subghz_static_index);
|
uint32_t value =
|
||||||
|
*FrequencyList_get(app->subghz_static_frequencies, app->subghz_static_index);
|
||||||
char text[10] = {0};
|
char text[10] = {0};
|
||||||
snprintf(text, sizeof(text), "%lu.%02lu", value / 1000000, (value % 1000000) / 10000);
|
snprintf(text, sizeof(text), "%lu.%02lu", value / 1000000, (value % 1000000) / 10000);
|
||||||
variable_item_set_current_value_text(item, text);
|
variable_item_set_current_value_text(item, text);
|
||||||
@@ -45,7 +53,9 @@ void xtreme_app_scene_protocols_frequencies_static_on_enter(void* context) {
|
|||||||
var_item_list, xtreme_app_scene_protocols_frequencies_static_var_item_list_callback, app);
|
var_item_list, xtreme_app_scene_protocols_frequencies_static_var_item_list_callback, app);
|
||||||
|
|
||||||
variable_item_list_set_selected_item(
|
variable_item_list_set_selected_item(
|
||||||
var_item_list, scene_manager_get_scene_state(app->scene_manager, XtremeAppSceneProtocolsFrequenciesStatic));
|
var_item_list,
|
||||||
|
scene_manager_get_scene_state(
|
||||||
|
app->scene_manager, XtremeAppSceneProtocolsFrequenciesStatic));
|
||||||
|
|
||||||
view_dispatcher_switch_to_view(app->view_dispatcher, XtremeAppViewVarItemList);
|
view_dispatcher_switch_to_view(app->view_dispatcher, XtremeAppViewVarItemList);
|
||||||
}
|
}
|
||||||
@@ -55,12 +65,14 @@ bool xtreme_app_scene_protocols_frequencies_static_on_event(void* context, Scene
|
|||||||
bool consumed = false;
|
bool consumed = false;
|
||||||
|
|
||||||
if(event.type == SceneManagerEventTypeCustom) {
|
if(event.type == SceneManagerEventTypeCustom) {
|
||||||
scene_manager_set_scene_state(app->scene_manager, XtremeAppSceneProtocolsFrequenciesStatic, event.event);
|
scene_manager_set_scene_state(
|
||||||
|
app->scene_manager, XtremeAppSceneProtocolsFrequenciesStatic, event.event);
|
||||||
consumed = true;
|
consumed = true;
|
||||||
switch(event.event) {
|
switch(event.event) {
|
||||||
case VarItemListIndexDeleteStaticFreq:
|
case VarItemListIndexDeleteStaticFreq:
|
||||||
if(!FrequencyList_size(app->subghz_static_frequencies)) break;
|
if(!FrequencyList_size(app->subghz_static_frequencies)) break;
|
||||||
uint32_t value = *FrequencyList_get(app->subghz_static_frequencies, app->subghz_static_index);
|
uint32_t value =
|
||||||
|
*FrequencyList_get(app->subghz_static_frequencies, app->subghz_static_index);
|
||||||
FrequencyList_it_t it;
|
FrequencyList_it_t it;
|
||||||
FrequencyList_it(it, app->subghz_static_frequencies);
|
FrequencyList_it(it, app->subghz_static_frequencies);
|
||||||
while(!FrequencyList_end_p(it)) {
|
while(!FrequencyList_end_p(it)) {
|
||||||
@@ -75,7 +87,8 @@ bool xtreme_app_scene_protocols_frequencies_static_on_event(void* context, Scene
|
|||||||
scene_manager_next_scene(app->scene_manager, XtremeAppSceneProtocolsFrequenciesStatic);
|
scene_manager_next_scene(app->scene_manager, XtremeAppSceneProtocolsFrequenciesStatic);
|
||||||
break;
|
break;
|
||||||
case VarItemListIndexAddStaticFreq:
|
case VarItemListIndexAddStaticFreq:
|
||||||
scene_manager_set_scene_state(app->scene_manager, XtremeAppSceneProtocolsFrequenciesAdd, false);
|
scene_manager_set_scene_state(
|
||||||
|
app->scene_manager, XtremeAppSceneProtocolsFrequenciesAdd, false);
|
||||||
scene_manager_next_scene(app->scene_manager, XtremeAppSceneProtocolsFrequenciesAdd);
|
scene_manager_next_scene(app->scene_manager, XtremeAppSceneProtocolsFrequenciesAdd);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -26,24 +26,36 @@ static bool xtreme_app_back_event_callback(void* context) {
|
|||||||
FlipperFormat* file = flipper_format_file_alloc(storage);
|
FlipperFormat* file = flipper_format_file_alloc(storage);
|
||||||
do {
|
do {
|
||||||
FrequencyList_it_t it;
|
FrequencyList_it_t it;
|
||||||
if(!flipper_format_file_open_always(file, EXT_PATH("subghz/assets/setting_user"))) break;
|
if(!flipper_format_file_open_always(file, EXT_PATH("subghz/assets/setting_user")))
|
||||||
|
break;
|
||||||
|
|
||||||
if(!flipper_format_write_header_cstr(file, SUBGHZ_SETTING_FILE_TYPE, SUBGHZ_SETTING_FILE_VERSION)) break;
|
if(!flipper_format_write_header_cstr(
|
||||||
|
file, SUBGHZ_SETTING_FILE_TYPE, SUBGHZ_SETTING_FILE_VERSION))
|
||||||
|
break;
|
||||||
|
|
||||||
while(flipper_format_delete_key(file, "Add_standard_frequencies"));
|
while(flipper_format_delete_key(file, "Add_standard_frequencies"))
|
||||||
flipper_format_write_bool(file, "Add_standard_frequencies", &app->subghz_use_defaults, 1);
|
;
|
||||||
|
flipper_format_write_bool(
|
||||||
|
file, "Add_standard_frequencies", &app->subghz_use_defaults, 1);
|
||||||
|
|
||||||
if(!flipper_format_rewind(file)) break;
|
if(!flipper_format_rewind(file)) break;
|
||||||
while(flipper_format_delete_key(file, "Frequency"));
|
while(flipper_format_delete_key(file, "Frequency"))
|
||||||
|
;
|
||||||
FrequencyList_it(it, app->subghz_static_frequencies);
|
FrequencyList_it(it, app->subghz_static_frequencies);
|
||||||
for(uint i = 0; i < FrequencyList_size(app->subghz_static_frequencies); i++) {
|
for(uint i = 0; i < FrequencyList_size(app->subghz_static_frequencies); i++) {
|
||||||
flipper_format_write_uint32(file, "Frequency", FrequencyList_get(app->subghz_static_frequencies, i), 1);
|
flipper_format_write_uint32(
|
||||||
|
file, "Frequency", FrequencyList_get(app->subghz_static_frequencies, i), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!flipper_format_rewind(file)) break;
|
if(!flipper_format_rewind(file)) break;
|
||||||
while(flipper_format_delete_key(file, "Hopper_frequency"));
|
while(flipper_format_delete_key(file, "Hopper_frequency"))
|
||||||
|
;
|
||||||
for(uint i = 0; i < FrequencyList_size(app->subghz_hopper_frequencies); i++) {
|
for(uint i = 0; i < FrequencyList_size(app->subghz_hopper_frequencies); i++) {
|
||||||
flipper_format_write_uint32(file, "Hopper_frequency", FrequencyList_get(app->subghz_hopper_frequencies, i), 1);
|
flipper_format_write_uint32(
|
||||||
|
file,
|
||||||
|
"Hopper_frequency",
|
||||||
|
FrequencyList_get(app->subghz_hopper_frequencies, i),
|
||||||
|
1);
|
||||||
}
|
}
|
||||||
} while(false);
|
} while(false);
|
||||||
flipper_format_free(file);
|
flipper_format_free(file);
|
||||||
|
|||||||
@@ -98,7 +98,8 @@ bool desktop_scene_lock_menu_on_event(void* context, SceneManagerEvent event) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case DesktopLockMenuEventXtremeSettings:
|
case DesktopLockMenuEventXtremeSettings:
|
||||||
loader_start(desktop->loader, FAP_LOADER_APP_NAME, EXT_PATH("apps/.Main/xtreme_app.fap"));
|
loader_start(
|
||||||
|
desktop->loader, FAP_LOADER_APP_NAME, EXT_PATH("apps/.Main/xtreme_app.fap"));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ static const InputKey view_port_input_mapping[ViewPortOrientationMAX][InputKeyMA
|
|||||||
// Remaps directional pad buttons on Flipper based on ViewPort orientation
|
// Remaps directional pad buttons on Flipper based on ViewPort orientation
|
||||||
static void view_port_map_input(InputEvent* event, ViewPortOrientation orientation) {
|
static void view_port_map_input(InputEvent* event, ViewPortOrientation orientation) {
|
||||||
furi_assert(orientation < ViewPortOrientationMAX && event->key < InputKeyMAX);
|
furi_assert(orientation < ViewPortOrientationMAX && event->key < InputKeyMAX);
|
||||||
if(orientation == ViewPortOrientationHorizontal || orientation == ViewPortOrientationHorizontalFlip) {
|
if(orientation == ViewPortOrientationHorizontal ||
|
||||||
|
orientation == ViewPortOrientationHorizontalFlip) {
|
||||||
if(XTREME_SETTINGS()->left_handed) {
|
if(XTREME_SETTINGS()->left_handed) {
|
||||||
switch(event->key) {
|
switch(event->key) {
|
||||||
case InputKeyUp:
|
case InputKeyUp:
|
||||||
|
|||||||
@@ -101,7 +101,8 @@ static void loader_menu_callback(void* _ctx, uint32_t index) {
|
|||||||
static void loader_main_callback(void* _ctx, uint32_t index) {
|
static void loader_main_callback(void* _ctx, uint32_t index) {
|
||||||
UNUSED(index);
|
UNUSED(index);
|
||||||
const char* path = _ctx;
|
const char* path = _ctx;
|
||||||
const FlipperApplication* app = loader_find_application_by_name_in_list(FAP_LOADER_APP_NAME, FLIPPER_APPS, FLIPPER_APPS_COUNT);
|
const FlipperApplication* app = loader_find_application_by_name_in_list(
|
||||||
|
FAP_LOADER_APP_NAME, FLIPPER_APPS, FLIPPER_APPS_COUNT);
|
||||||
|
|
||||||
furi_assert(path);
|
furi_assert(path);
|
||||||
|
|
||||||
|
|||||||
@@ -448,9 +448,13 @@ void furi_hal_subghz_set_extend_settings(bool extend, bool bypass) {
|
|||||||
do {
|
do {
|
||||||
if(!flipper_format_file_open_always(file, "/ext/subghz/assets/extend_range.txt")) break;
|
if(!flipper_format_file_open_always(file, "/ext/subghz/assets/extend_range.txt")) break;
|
||||||
if(!flipper_format_write_header_cstr(file, "Flipper SubGhz Setting File", 1)) break;
|
if(!flipper_format_write_header_cstr(file, "Flipper SubGhz Setting File", 1)) break;
|
||||||
if(!flipper_format_write_comment_cstr(file, "Whether to allow extended ranges that can break your flipper")) break;
|
if(!flipper_format_write_comment_cstr(
|
||||||
|
file, "Whether to allow extended ranges that can break your flipper"))
|
||||||
|
break;
|
||||||
if(!flipper_format_write_bool(file, "use_ext_range_at_own_risk", &extend, 1)) break;
|
if(!flipper_format_write_bool(file, "use_ext_range_at_own_risk", &extend, 1)) break;
|
||||||
if(!flipper_format_write_comment_cstr(file, "Whether to ignore the default TX region settings")) break;
|
if(!flipper_format_write_comment_cstr(
|
||||||
|
file, "Whether to ignore the default TX region settings"))
|
||||||
|
break;
|
||||||
if(!flipper_format_write_bool(file, "ignore_default_tx_region", &bypass, 1)) break;
|
if(!flipper_format_write_bool(file, "ignore_default_tx_region", &bypass, 1)) break;
|
||||||
} while(0);
|
} while(0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user