Merge branch 'dev' of https://github.com/ClaraCrazy/Flipper-Xtreme into fix-bad_kb_bt-flipper_app-conflict

This commit is contained in:
Willy-JL
2023-02-26 01:44:44 +00:00
17 changed files with 264 additions and 560 deletions
@@ -26,8 +26,7 @@ void nfc_scene_nfc_data_info_on_enter(void* context) {
NfcProtocol protocol = dev_data->protocol;
uint8_t text_scroll_height = 0;
if((protocol == NfcDeviceProtocolMifareDesfire) || (protocol == NfcDeviceProtocolMifareUl) ||
(protocol == NfcDeviceProtocolNfcV) ||
(protocol == NfcDeviceProtocolMifareClassic)) {
(protocol == NfcDeviceProtocolNfcV) || (protocol == NfcDeviceProtocolMifareClassic)) {
widget_add_button_element(
widget, GuiButtonTypeRight, "More", nfc_scene_nfc_data_info_widget_callback, nfc);
text_scroll_height = 52;
+4 -2
View File
@@ -265,7 +265,8 @@ void subghz_view_receiver_draw(Canvas* canvas, SubGhzViewReceiverModel* model) {
canvas,
0,
0,
furi_hal_subghz_get_radio_type() ? XTREME_ASSETS()->I_Fishing_123x52 : XTREME_ASSETS()->I_Scanning_123x52);
furi_hal_subghz_get_radio_type() ? XTREME_ASSETS()->I_Fishing_123x52 :
XTREME_ASSETS()->I_Scanning_123x52);
canvas_set_font(canvas, FontPrimary);
canvas_draw_str(canvas, 63, 46, "Scanning...");
//canvas_draw_line(canvas, 46, 51, 125, 51);
@@ -275,7 +276,8 @@ void subghz_view_receiver_draw(Canvas* canvas, SubGhzViewReceiverModel* model) {
canvas,
0,
0,
furi_hal_subghz_get_radio_type() ? XTREME_ASSETS()->I_Fishing_123x52 : XTREME_ASSETS()->I_Scanning_123x52);
furi_hal_subghz_get_radio_type() ? XTREME_ASSETS()->I_Fishing_123x52 :
XTREME_ASSETS()->I_Scanning_123x52);
canvas_set_font(canvas, FontPrimary);
canvas_draw_str(canvas, 63, 46, "Decoding...");
canvas_set_font(canvas, FontSecondary);
@@ -9,17 +9,8 @@ static void xtreme_app_scene_dolphin_xp_level_changed(VariableItem* item) {
app->save_level = true;
}
const char* const butthurt_timer_names[] = {
"OFF",
"30 M",
"1 H",
"2 H",
"4 H",
"6 H",
"8 H",
"12 H",
"24 H",
"48 H"};
const char* const butthurt_timer_names[] =
{"OFF", "30 M", "1 H", "2 H", "4 H", "6 H", "8 H", "12 H", "24 H", "48 H"};
const int32_t butthurt_timer_values[COUNT_OF(butthurt_timer_names)] =
{-1, 1800, 3600, 7200, 14400, 21600, 28800, 43200, 86400, 172800};
static void xtreme_app_scene_dolphin_butthurt_timer_changed(VariableItem* item) {
@@ -73,7 +73,8 @@ void xtreme_app_scene_graphics_on_enter(void* context) {
app);
variable_item_set_current_value_index(item, app->asset_pack);
variable_item_set_current_value_text(
item, app->asset_pack == 0 ? "SFW" : *asset_packs_get(app->asset_packs, app->asset_pack - 1));
item,
app->asset_pack == 0 ? "SFW" : *asset_packs_get(app->asset_packs, app->asset_pack - 1));
item = variable_item_list_add(
var_item_list,
@@ -35,9 +35,11 @@ void xtreme_app_scene_misc_on_enter(void* context) {
variable_item_list_add(var_item_list, "Change Device Name", 0, NULL, app);
variable_item_list_set_enter_callback(var_item_list, xtreme_app_scene_misc_var_item_list_callback, app);
variable_item_list_set_enter_callback(
var_item_list, xtreme_app_scene_misc_var_item_list_callback, app);
variable_item_list_set_selected_item(var_item_list, scene_manager_get_scene_state(app->scene_manager, XtremeAppSceneMisc));
variable_item_list_set_selected_item(
var_item_list, scene_manager_get_scene_state(app->scene_manager, XtremeAppSceneMisc));
view_dispatcher_switch_to_view(app->view_dispatcher, XtremeAppViewVarItemList);
}
@@ -50,11 +52,11 @@ bool xtreme_app_scene_misc_on_event(void* context, SceneManagerEvent event) {
scene_manager_set_scene_state(app->scene_manager, XtremeAppSceneMisc, event.event);
consumed = true;
switch(event.event) {
case VarItemListIndexChangeDeviceName:
scene_manager_next_scene(app->scene_manager, XtremeAppSceneMiscRename);
break;
default:
break;
case VarItemListIndexChangeDeviceName:
scene_manager_next_scene(app->scene_manager, XtremeAppSceneMiscRename);
break;
default:
break;
}
}
@@ -9,8 +9,7 @@ static void xtreme_app_scene_misc_rename_text_input_callback(void* context) {
app->save_name = true;
app->require_reboot = true;
view_dispatcher_send_custom_event(
app->view_dispatcher, TextInputIndexResult);
view_dispatcher_send_custom_event(app->view_dispatcher, TextInputIndexResult);
}
void xtreme_app_scene_misc_rename_on_enter(void* context) {
@@ -37,11 +36,11 @@ bool xtreme_app_scene_misc_rename_on_event(void* context, SceneManagerEvent even
if(event.type == SceneManagerEventTypeCustom) {
consumed = true;
switch(event.event) {
case TextInputIndexResult:
scene_manager_previous_scene(app->scene_manager);
break;
default:
break;
case TextInputIndexResult:
scene_manager_previous_scene(app->scene_manager);
break;
default:
break;
}
}
@@ -25,9 +25,11 @@ void xtreme_app_scene_start_on_enter(void* context) {
variable_item_list_add(var_item_list, furi_string_get_cstr(app->version_tag), 0, NULL, app);
variable_item_list_set_enter_callback(var_item_list, xtreme_app_scene_start_var_item_list_callback, app);
variable_item_list_set_enter_callback(
var_item_list, xtreme_app_scene_start_var_item_list_callback, app);
variable_item_list_set_selected_item(var_item_list, scene_manager_get_scene_state(app->scene_manager, XtremeAppSceneStart));
variable_item_list_set_selected_item(
var_item_list, scene_manager_get_scene_state(app->scene_manager, XtremeAppSceneStart));
view_dispatcher_switch_to_view(app->view_dispatcher, XtremeAppViewVarItemList);
}
@@ -40,23 +42,23 @@ bool xtreme_app_scene_start_on_event(void* context, SceneManagerEvent event) {
scene_manager_set_scene_state(app->scene_manager, XtremeAppSceneStart, event.event);
consumed = true;
switch(event.event) {
case VarItemListIndexGraphics:
scene_manager_next_scene(app->scene_manager, XtremeAppSceneGraphics);
break;
case VarItemListIndexStatusbar:
scene_manager_next_scene(app->scene_manager, XtremeAppSceneStatusbar);
break;
case VarItemListIndexProtocols:
scene_manager_next_scene(app->scene_manager, XtremeAppSceneProtocols);
break;
case VarItemListIndexDolphin:
scene_manager_next_scene(app->scene_manager, XtremeAppSceneDolphin);
break;
case VarItemListIndexMisc:
scene_manager_next_scene(app->scene_manager, XtremeAppSceneMisc);
break;
default:
break;
case VarItemListIndexGraphics:
scene_manager_next_scene(app->scene_manager, XtremeAppSceneGraphics);
break;
case VarItemListIndexStatusbar:
scene_manager_next_scene(app->scene_manager, XtremeAppSceneStatusbar);
break;
case VarItemListIndexProtocols:
scene_manager_next_scene(app->scene_manager, XtremeAppSceneProtocols);
break;
case VarItemListIndexDolphin:
scene_manager_next_scene(app->scene_manager, XtremeAppSceneDolphin);
break;
case VarItemListIndexMisc:
scene_manager_next_scene(app->scene_manager, XtremeAppSceneMisc);
break;
default:
break;
}
}
+18 -9
View File
@@ -20,7 +20,8 @@ static bool xtreme_app_back_event_callback(void* context) {
if(app->save_subghz) {
FlipperFormat* subghz_range = flipper_format_file_alloc(storage);
if(flipper_format_file_open_existing(subghz_range, "/ext/subghz/assets/extend_range.txt")) {
if(flipper_format_file_open_existing(
subghz_range, "/ext/subghz/assets/extend_range.txt")) {
flipper_format_insert_or_update_bool(
subghz_range, "use_ext_range_at_own_risk", &app->subghz_extend, 1);
flipper_format_insert_or_update_bool(
@@ -49,9 +50,17 @@ static bool xtreme_app_back_event_callback(void* context) {
if(!flipper_format_write_header_cstr(file, NAMECHANGER_HEADER, 1)) break;
if(!flipper_format_write_comment_cstr(file, "Changing the value below will change your FlipperZero device name.")) break;
if(!flipper_format_write_comment_cstr(file, "Note: This is limited to 8 characters using the following: a-z, A-Z, 0-9, and _")) break;
if(!flipper_format_write_comment_cstr(file, "It cannot contain any other characters.")) break;
if(!flipper_format_write_comment_cstr(
file,
"Changing the value below will change your FlipperZero device name."))
break;
if(!flipper_format_write_comment_cstr(
file,
"Note: This is limited to 8 characters using the following: a-z, A-Z, 0-9, and _"))
break;
if(!flipper_format_write_comment_cstr(
file, "It cannot contain any other characters."))
break;
if(!flipper_format_write_string_cstr(file, "Name", app->device_name)) break;
@@ -108,9 +117,7 @@ XtremeApp* xtreme_app_alloc() {
app->text_input = text_input_alloc();
view_dispatcher_add_view(
app->view_dispatcher,
XtremeAppViewTextInput,
text_input_get_view(app->text_input));
app->view_dispatcher, XtremeAppViewTextInput, text_input_get_view(app->text_input));
app->popup = popup_alloc();
view_dispatcher_add_view(app->view_dispatcher, XtremeAppViewPopup, popup_get_view(app->popup));
@@ -124,7 +131,8 @@ XtremeApp* xtreme_app_alloc() {
app->subghz_extend = false;
app->subghz_bypass = false;
if(flipper_format_file_open_existing(subghz_range, "/ext/subghz/assets/extend_range.txt")) {
flipper_format_read_bool(subghz_range, "use_ext_range_at_own_risk", &app->subghz_extend, 1);
flipper_format_read_bool(
subghz_range, "use_ext_range_at_own_risk", &app->subghz_extend, 1);
flipper_format_read_bool(subghz_range, "ignore_default_tx_region", &app->subghz_bypass, 1);
}
flipper_format_free(subghz_range);
@@ -168,7 +176,8 @@ XtremeApp* xtreme_app_alloc() {
storage_file_free(folder);
furi_record_close(RECORD_STORAGE);
app->version_tag = furi_string_alloc_printf("%s %s", version_get_gitbranchnum(NULL), version_get_builddate(NULL));
app->version_tag = furi_string_alloc_printf(
"%s %s", version_get_gitbranchnum(NULL), version_get_builddate(NULL));
return app;
}
@@ -8,7 +8,6 @@
#include <dialogs/dialogs.h>
#include <m-string.h>
#include "assets.h"
#define PLAYFIELD_WIDTH 16
+105 -417
View File
@@ -1,420 +1,108 @@
#define NUM_VERTICES 136
float vertexCoords[NUM_VERTICES][3] = {
{1.000000, 1.000000, 0.152153},
{-1.000000, 1.000000, 0.152153},
{-1.000000, -1.000000, 0.152153},
{1.000000, -1.000000, 0.152153},
{1.000000, -1.000000, -0.185787},
{-1.000000, -1.000000, -0.185787},
{-1.000000, 1.000000, -0.185787},
{1.000000, 1.000000, -0.185787},
{-1.000043, -0.785071, -0.015780},
{-1.155724, -0.785071, -0.015780},
{-1.155724, -0.918718, -0.015780},
{-1.000043, -0.918718, -0.015780},
{-1.155724, -0.785071, 0.127052},
{-1.000043, -0.785071, 0.127052},
{-1.000043, -0.918718, 0.127052},
{-1.155724, -0.918718, 0.127052},
{-1.234192, -0.918846, -0.087021},
{-1.234397, -0.785201, -0.086336},
{-1.235319, -0.784943, -0.229143},
{-1.235114, -0.918588, -0.229828},
{-1.388133, -0.919573, -0.078673},
{-1.389056, -0.919314, -0.221479},
{-1.389261, -0.785669, -0.220795},
{-1.388338, -0.785927, -0.077988},
{-1.000043, -0.219627, -0.015780},
{-1.155724, -0.219627, -0.015780},
{-1.155724, -0.353273, -0.015780},
{-1.000043, -0.353273, -0.015780},
{-1.155724, -0.219627, 0.127052},
{-1.000043, -0.219627, 0.127052},
{-1.000043, -0.353273, 0.127052},
{-1.155724, -0.353273, 0.127052},
{-1.234192, -0.353402, -0.087021},
{-1.234397, -0.219756, -0.086336},
{-1.235319, -0.219498, -0.229143},
{-1.235114, -0.353143, -0.229828},
{-1.388133, -0.354128, -0.078673},
{-1.389056, -0.353870, -0.221479},
{-1.389261, -0.220224, -0.220795},
{-1.388338, -0.220482, -0.077988},
{-1.000043, 0.345818, -0.015780},
{-1.155724, 0.345818, -0.015780},
{-1.155724, 0.212172, -0.015780},
{-1.000043, 0.212172, -0.015780},
{-1.155724, 0.345818, 0.127052},
{-1.000043, 0.345818, 0.127052},
{-1.000043, 0.212172, 0.127052},
{-1.155724, 0.212172, 0.127052},
{-1.234192, 0.212043, -0.087021},
{-1.234397, 0.345689, -0.086336},
{-1.235319, 0.345947, -0.229143},
{-1.235114, 0.212301, -0.229828},
{-1.388133, 0.211317, -0.078673},
{-1.389056, 0.211575, -0.221479},
{-1.389261, 0.345221, -0.220795},
{-1.388338, 0.344962, -0.077988},
{-1.000043, 0.911263, -0.015780},
{-1.155724, 0.911263, -0.015780},
{-1.155724, 0.777617, -0.015780},
{-1.000043, 0.777617, -0.015780},
{-1.155724, 0.911263, 0.127052},
{-1.000043, 0.911263, 0.127052},
{-1.000043, 0.777617, 0.127052},
{-1.155724, 0.777617, 0.127052},
{-1.234192, 0.777488, -0.087021},
{-1.234397, 0.911133, -0.086336},
{-1.235319, 0.911392, -0.229143},
{-1.235114, 0.777746, -0.229828},
{-1.388133, 0.776762, -0.078673},
{-1.389056, 0.777020, -0.221479},
{-1.389261, 0.910665, -0.220795},
{-1.388338, 0.910407, -0.077988},
{1.000043, -0.785071, -0.015780},
{1.000043, -0.918718, -0.015780},
{1.155723, -0.918718, -0.015780},
{1.155723, -0.785071, -0.015780},
{1.155723, -0.785071, 0.127052},
{1.155723, -0.918718, 0.127052},
{1.000043, -0.918718, 0.127052},
{1.000043, -0.785071, 0.127052},
{1.234397, -0.785201, -0.086336},
{1.234192, -0.918846, -0.087021},
{1.235114, -0.918588, -0.229828},
{1.235319, -0.784943, -0.229143},
{1.388133, -0.919573, -0.078673},
{1.388338, -0.785927, -0.077988},
{1.389260, -0.785669, -0.220795},
{1.389056, -0.919314, -0.221479},
{1.000043, -0.219627, -0.015780},
{1.000043, -0.353273, -0.015780},
{1.155723, -0.353273, -0.015780},
{1.155723, -0.219627, -0.015780},
{1.155723, -0.219627, 0.127052},
{1.155723, -0.353273, 0.127052},
{1.000043, -0.353273, 0.127052},
{1.000043, -0.219627, 0.127052},
{1.234397, -0.219756, -0.086336},
{1.234192, -0.353402, -0.087021},
{1.235114, -0.353143, -0.229828},
{1.235319, -0.219498, -0.229143},
{1.388133, -0.354128, -0.078673},
{1.388338, -0.220482, -0.077988},
{1.389260, -0.220224, -0.220795},
{1.389056, -0.353870, -0.221479},
{1.000043, 0.345818, -0.015780},
{1.000043, 0.212172, -0.015780},
{1.155723, 0.212172, -0.015780},
{1.155723, 0.345818, -0.015780},
{1.155723, 0.345818, 0.127052},
{1.155723, 0.212172, 0.127052},
{1.000043, 0.212172, 0.127052},
{1.000043, 0.345818, 0.127052},
{1.234397, 0.345689, -0.086336},
{1.234192, 0.212043, -0.087021},
{1.235114, 0.212301, -0.229828},
{1.235319, 0.345947, -0.229143},
{1.388133, 0.211317, -0.078673},
{1.388338, 0.344962, -0.077988},
{1.389260, 0.345221, -0.220795},
{1.389056, 0.211575, -0.221479},
{1.000043, 0.911263, -0.015780},
{1.000043, 0.777616, -0.015780},
{1.155723, 0.777616, -0.015780},
{1.155723, 0.911263, -0.015780},
{1.155723, 0.911263, 0.127052},
{1.155723, 0.777616, 0.127052},
{1.000043, 0.777616, 0.127052},
{1.000043, 0.911263, 0.127052},
{1.234397, 0.911133, -0.086336},
{1.234192, 0.777488, -0.087021},
{1.235114, 0.777746, -0.229828},
{1.235319, 0.911392, -0.229143},
{1.388133, 0.776762, -0.078673},
{1.388338, 0.910407, -0.077988},
{1.389260, 0.910665, -0.220795},
{1.389056, 0.777020, -0.221479},
};int edgeIndices[][3] = {
{0, 1},
{1, 2},
{2, 3},
{3, 0},
{4, 3},
{3, 2},
{2, 5},
{5, 4},
{5, 2},
{2, 1},
{1, 6},
{6, 5},
{6, 7},
{7, 4},
{4, 5},
{5, 6},
{7, 0},
{0, 3},
{3, 4},
{4, 7},
{6, 1},
{1, 0},
{0, 7},
{7, 6},
{8, 9},
{9, 10},
{10, 11},
{11, 8},
{12, 13},
{13, 14},
{14, 15},
{15, 12},
{13, 8},
{8, 11},
{11, 14},
{14, 13},
{12, 15},
{15, 16},
{16, 17},
{17, 12},
{10, 9},
{9, 18},
{18, 19},
{19, 10},
{20, 21},
{21, 22},
{22, 23},
{23, 20},
{17, 16},
{16, 20},
{20, 23},
{23, 17},
{19, 18},
{18, 22},
{22, 21},
{21, 19},
{24, 25},
{25, 26},
{26, 27},
{27, 24},
{28, 29},
{29, 30},
{30, 31},
{31, 28},
{29, 24},
{24, 27},
{27, 30},
{30, 29},
{28, 31},
{31, 32},
{32, 33},
{33, 28},
{26, 25},
{25, 34},
{34, 35},
{35, 26},
{36, 37},
{37, 38},
{38, 39},
{39, 36},
{33, 32},
{32, 36},
{36, 39},
{39, 33},
{35, 34},
{34, 38},
{38, 37},
{37, 35},
{40, 41},
{41, 42},
{42, 43},
{43, 40},
{44, 45},
{45, 46},
{46, 47},
{47, 44},
{45, 40},
{40, 43},
{43, 46},
{46, 45},
{44, 47},
{47, 48},
{48, 49},
{49, 44},
{42, 41},
{41, 50},
{50, 51},
{51, 42},
{52, 53},
{53, 54},
{54, 55},
{55, 52},
{49, 48},
{48, 52},
{52, 55},
{55, 49},
{51, 50},
{50, 54},
{54, 53},
{53, 51},
{56, 57},
{57, 58},
{58, 59},
{59, 56},
{60, 61},
{61, 62},
{62, 63},
{63, 60},
{61, 56},
{56, 59},
{59, 62},
{62, 61},
{60, 63},
{63, 64},
{64, 65},
{65, 60},
{58, 57},
{57, 66},
{66, 67},
{67, 58},
{68, 69},
{69, 70},
{70, 71},
{71, 68},
{65, 64},
{64, 68},
{68, 71},
{71, 65},
{67, 66},
{66, 70},
{70, 69},
{69, 67},
{72, 73},
{73, 74},
{74, 75},
{75, 72},
{76, 77},
{77, 78},
{78, 79},
{79, 76},
{79, 78},
{78, 73},
{73, 72},
{72, 79},
{76, 80},
{80, 81},
{81, 77},
{77, 76},
{74, 82},
{82, 83},
{83, 75},
{75, 74},
{84, 85},
{85, 86},
{86, 87},
{87, 84},
{80, 85},
{85, 84},
{84, 81},
{81, 80},
{82, 87},
{87, 86},
{86, 83},
{83, 82},
{88, 89},
{89, 90},
{90, 91},
{91, 88},
{92, 93},
{93, 94},
{94, 95},
{95, 92},
{95, 94},
{94, 89},
{89, 88},
{88, 95},
{92, 96},
{96, 97},
{97, 93},
{93, 92},
{90, 98},
{98, 99},
{99, 91},
{91, 90},
{100, 101},
{101, 102},
{102, 103},
{103, 100},
{96, 101},
{101, 100},
{100, 97},
{97, 96},
{98, 103},
{103, 102},
{102, 99},
{99, 98},
{104, 105},
{105, 106},
{106, 107},
{107, 104},
{108, 109},
{109, 110},
{110, 111},
{111, 108},
{111, 110},
{110, 105},
{105, 104},
{104, 111},
{108, 112},
{112, 113},
{113, 109},
{109, 108},
{106, 114},
{114, 115},
{115, 107},
{107, 106},
{116, 117},
{117, 118},
{118, 119},
{119, 116},
{112, 117},
{117, 116},
{116, 113},
{113, 112},
{114, 119},
{119, 118},
{118, 115},
{115, 114},
{120, 121},
{121, 122},
{122, 123},
{123, 120},
{124, 125},
{125, 126},
{126, 127},
{127, 124},
{127, 126},
{126, 121},
{121, 120},
{120, 127},
{124, 128},
{128, 129},
{129, 125},
{125, 124},
{122, 130},
{130, 131},
{131, 123},
{123, 122},
{132, 133},
{133, 134},
{134, 135},
{135, 132},
{128, 133},
{133, 132},
{132, 129},
{129, 128},
{130, 135},
{135, 134},
{134, 131},
{131, 130},
{1.000000, 1.000000, 0.152153}, {-1.000000, 1.000000, 0.152153},
{-1.000000, -1.000000, 0.152153}, {1.000000, -1.000000, 0.152153},
{1.000000, -1.000000, -0.185787}, {-1.000000, -1.000000, -0.185787},
{-1.000000, 1.000000, -0.185787}, {1.000000, 1.000000, -0.185787},
{-1.000043, -0.785071, -0.015780}, {-1.155724, -0.785071, -0.015780},
{-1.155724, -0.918718, -0.015780}, {-1.000043, -0.918718, -0.015780},
{-1.155724, -0.785071, 0.127052}, {-1.000043, -0.785071, 0.127052},
{-1.000043, -0.918718, 0.127052}, {-1.155724, -0.918718, 0.127052},
{-1.234192, -0.918846, -0.087021}, {-1.234397, -0.785201, -0.086336},
{-1.235319, -0.784943, -0.229143}, {-1.235114, -0.918588, -0.229828},
{-1.388133, -0.919573, -0.078673}, {-1.389056, -0.919314, -0.221479},
{-1.389261, -0.785669, -0.220795}, {-1.388338, -0.785927, -0.077988},
{-1.000043, -0.219627, -0.015780}, {-1.155724, -0.219627, -0.015780},
{-1.155724, -0.353273, -0.015780}, {-1.000043, -0.353273, -0.015780},
{-1.155724, -0.219627, 0.127052}, {-1.000043, -0.219627, 0.127052},
{-1.000043, -0.353273, 0.127052}, {-1.155724, -0.353273, 0.127052},
{-1.234192, -0.353402, -0.087021}, {-1.234397, -0.219756, -0.086336},
{-1.235319, -0.219498, -0.229143}, {-1.235114, -0.353143, -0.229828},
{-1.388133, -0.354128, -0.078673}, {-1.389056, -0.353870, -0.221479},
{-1.389261, -0.220224, -0.220795}, {-1.388338, -0.220482, -0.077988},
{-1.000043, 0.345818, -0.015780}, {-1.155724, 0.345818, -0.015780},
{-1.155724, 0.212172, -0.015780}, {-1.000043, 0.212172, -0.015780},
{-1.155724, 0.345818, 0.127052}, {-1.000043, 0.345818, 0.127052},
{-1.000043, 0.212172, 0.127052}, {-1.155724, 0.212172, 0.127052},
{-1.234192, 0.212043, -0.087021}, {-1.234397, 0.345689, -0.086336},
{-1.235319, 0.345947, -0.229143}, {-1.235114, 0.212301, -0.229828},
{-1.388133, 0.211317, -0.078673}, {-1.389056, 0.211575, -0.221479},
{-1.389261, 0.345221, -0.220795}, {-1.388338, 0.344962, -0.077988},
{-1.000043, 0.911263, -0.015780}, {-1.155724, 0.911263, -0.015780},
{-1.155724, 0.777617, -0.015780}, {-1.000043, 0.777617, -0.015780},
{-1.155724, 0.911263, 0.127052}, {-1.000043, 0.911263, 0.127052},
{-1.000043, 0.777617, 0.127052}, {-1.155724, 0.777617, 0.127052},
{-1.234192, 0.777488, -0.087021}, {-1.234397, 0.911133, -0.086336},
{-1.235319, 0.911392, -0.229143}, {-1.235114, 0.777746, -0.229828},
{-1.388133, 0.776762, -0.078673}, {-1.389056, 0.777020, -0.221479},
{-1.389261, 0.910665, -0.220795}, {-1.388338, 0.910407, -0.077988},
{1.000043, -0.785071, -0.015780}, {1.000043, -0.918718, -0.015780},
{1.155723, -0.918718, -0.015780}, {1.155723, -0.785071, -0.015780},
{1.155723, -0.785071, 0.127052}, {1.155723, -0.918718, 0.127052},
{1.000043, -0.918718, 0.127052}, {1.000043, -0.785071, 0.127052},
{1.234397, -0.785201, -0.086336}, {1.234192, -0.918846, -0.087021},
{1.235114, -0.918588, -0.229828}, {1.235319, -0.784943, -0.229143},
{1.388133, -0.919573, -0.078673}, {1.388338, -0.785927, -0.077988},
{1.389260, -0.785669, -0.220795}, {1.389056, -0.919314, -0.221479},
{1.000043, -0.219627, -0.015780}, {1.000043, -0.353273, -0.015780},
{1.155723, -0.353273, -0.015780}, {1.155723, -0.219627, -0.015780},
{1.155723, -0.219627, 0.127052}, {1.155723, -0.353273, 0.127052},
{1.000043, -0.353273, 0.127052}, {1.000043, -0.219627, 0.127052},
{1.234397, -0.219756, -0.086336}, {1.234192, -0.353402, -0.087021},
{1.235114, -0.353143, -0.229828}, {1.235319, -0.219498, -0.229143},
{1.388133, -0.354128, -0.078673}, {1.388338, -0.220482, -0.077988},
{1.389260, -0.220224, -0.220795}, {1.389056, -0.353870, -0.221479},
{1.000043, 0.345818, -0.015780}, {1.000043, 0.212172, -0.015780},
{1.155723, 0.212172, -0.015780}, {1.155723, 0.345818, -0.015780},
{1.155723, 0.345818, 0.127052}, {1.155723, 0.212172, 0.127052},
{1.000043, 0.212172, 0.127052}, {1.000043, 0.345818, 0.127052},
{1.234397, 0.345689, -0.086336}, {1.234192, 0.212043, -0.087021},
{1.235114, 0.212301, -0.229828}, {1.235319, 0.345947, -0.229143},
{1.388133, 0.211317, -0.078673}, {1.388338, 0.344962, -0.077988},
{1.389260, 0.345221, -0.220795}, {1.389056, 0.211575, -0.221479},
{1.000043, 0.911263, -0.015780}, {1.000043, 0.777616, -0.015780},
{1.155723, 0.777616, -0.015780}, {1.155723, 0.911263, -0.015780},
{1.155723, 0.911263, 0.127052}, {1.155723, 0.777616, 0.127052},
{1.000043, 0.777616, 0.127052}, {1.000043, 0.911263, 0.127052},
{1.234397, 0.911133, -0.086336}, {1.234192, 0.777488, -0.087021},
{1.235114, 0.777746, -0.229828}, {1.235319, 0.911392, -0.229143},
{1.388133, 0.776762, -0.078673}, {1.388338, 0.910407, -0.077988},
{1.389260, 0.910665, -0.220795}, {1.389056, 0.777020, -0.221479},
};
int edgeIndices[][3] = {
{0, 1}, {1, 2}, {2, 3}, {3, 0}, {4, 3}, {3, 2}, {2, 5}, {5, 4},
{5, 2}, {2, 1}, {1, 6}, {6, 5}, {6, 7}, {7, 4}, {4, 5}, {5, 6},
{7, 0}, {0, 3}, {3, 4}, {4, 7}, {6, 1}, {1, 0}, {0, 7}, {7, 6},
{8, 9}, {9, 10}, {10, 11}, {11, 8}, {12, 13}, {13, 14}, {14, 15}, {15, 12},
{13, 8}, {8, 11}, {11, 14}, {14, 13}, {12, 15}, {15, 16}, {16, 17}, {17, 12},
{10, 9}, {9, 18}, {18, 19}, {19, 10}, {20, 21}, {21, 22}, {22, 23}, {23, 20},
{17, 16}, {16, 20}, {20, 23}, {23, 17}, {19, 18}, {18, 22}, {22, 21}, {21, 19},
{24, 25}, {25, 26}, {26, 27}, {27, 24}, {28, 29}, {29, 30}, {30, 31}, {31, 28},
{29, 24}, {24, 27}, {27, 30}, {30, 29}, {28, 31}, {31, 32}, {32, 33}, {33, 28},
{26, 25}, {25, 34}, {34, 35}, {35, 26}, {36, 37}, {37, 38}, {38, 39}, {39, 36},
{33, 32}, {32, 36}, {36, 39}, {39, 33}, {35, 34}, {34, 38}, {38, 37}, {37, 35},
{40, 41}, {41, 42}, {42, 43}, {43, 40}, {44, 45}, {45, 46}, {46, 47}, {47, 44},
{45, 40}, {40, 43}, {43, 46}, {46, 45}, {44, 47}, {47, 48}, {48, 49}, {49, 44},
{42, 41}, {41, 50}, {50, 51}, {51, 42}, {52, 53}, {53, 54}, {54, 55}, {55, 52},
{49, 48}, {48, 52}, {52, 55}, {55, 49}, {51, 50}, {50, 54}, {54, 53}, {53, 51},
{56, 57}, {57, 58}, {58, 59}, {59, 56}, {60, 61}, {61, 62}, {62, 63}, {63, 60},
{61, 56}, {56, 59}, {59, 62}, {62, 61}, {60, 63}, {63, 64}, {64, 65}, {65, 60},
{58, 57}, {57, 66}, {66, 67}, {67, 58}, {68, 69}, {69, 70}, {70, 71}, {71, 68},
{65, 64}, {64, 68}, {68, 71}, {71, 65}, {67, 66}, {66, 70}, {70, 69}, {69, 67},
{72, 73}, {73, 74}, {74, 75}, {75, 72}, {76, 77}, {77, 78}, {78, 79}, {79, 76},
{79, 78}, {78, 73}, {73, 72}, {72, 79}, {76, 80}, {80, 81}, {81, 77}, {77, 76},
{74, 82}, {82, 83}, {83, 75}, {75, 74}, {84, 85}, {85, 86}, {86, 87}, {87, 84},
{80, 85}, {85, 84}, {84, 81}, {81, 80}, {82, 87}, {87, 86}, {86, 83}, {83, 82},
{88, 89}, {89, 90}, {90, 91}, {91, 88}, {92, 93}, {93, 94}, {94, 95}, {95, 92},
{95, 94}, {94, 89}, {89, 88}, {88, 95}, {92, 96}, {96, 97}, {97, 93}, {93, 92},
{90, 98}, {98, 99}, {99, 91}, {91, 90}, {100, 101}, {101, 102}, {102, 103}, {103, 100},
{96, 101}, {101, 100}, {100, 97}, {97, 96}, {98, 103}, {103, 102}, {102, 99}, {99, 98},
{104, 105}, {105, 106}, {106, 107}, {107, 104}, {108, 109}, {109, 110}, {110, 111}, {111, 108},
{111, 110}, {110, 105}, {105, 104}, {104, 111}, {108, 112}, {112, 113}, {113, 109}, {109, 108},
{106, 114}, {114, 115}, {115, 107}, {107, 106}, {116, 117}, {117, 118}, {118, 119}, {119, 116},
{112, 117}, {117, 116}, {116, 113}, {113, 112}, {114, 119}, {119, 118}, {118, 115}, {115, 114},
{120, 121}, {121, 122}, {122, 123}, {123, 120}, {124, 125}, {125, 126}, {126, 127}, {127, 124},
{127, 126}, {126, 121}, {121, 120}, {120, 127}, {124, 128}, {128, 129}, {129, 125}, {125, 124},
{122, 130}, {130, 131}, {131, 123}, {123, 122}, {132, 133}, {133, 134}, {134, 135}, {135, 132},
{128, 133}, {133, 132}, {132, 129}, {129, 128}, {130, 135}, {135, 134}, {134, 131}, {131, 130},
};
+5 -1
View File
@@ -95,7 +95,11 @@ Dolphin* dolphin_alloc() {
dolphin->pubsub = furi_pubsub_alloc();
int32_t butthurt = XTREME_SETTINGS()->butthurt_timer;
dolphin->butthurt_timer = xTimerCreate(
NULL, (butthurt > 0) ? (butthurt * 1000) : -1, pdTRUE, dolphin, dolphin_butthurt_timer_callback);
NULL,
(butthurt > 0) ? (butthurt * 1000) : -1,
pdTRUE,
dolphin,
dolphin_butthurt_timer_callback);
dolphin->flush_timer =
xTimerCreate(NULL, 30 * 1000, pdFALSE, dolphin, dolphin_flush_timer_callback);
dolphin->clear_limits_timer = xTimerCreate(
+5 -1
View File
@@ -99,7 +99,11 @@ static void gui_redraw_status_bar(Gui* gui, bool need_attention) {
if(xtreme_settings->bar_borders) {
canvas_set_color(gui->canvas, ColorWhite);
canvas_draw_box(
gui->canvas, -1, 0, canvas_width(gui->canvas) + 1, canvas_height(gui->canvas));
gui->canvas,
-1,
0,
canvas_width(gui->canvas) + 1,
canvas_height(gui->canvas));
}
canvas_set_color(gui->canvas, ColorBlack);
// ViewPort draw
+47 -43
View File
@@ -43,7 +43,6 @@ static const uint8_t keyboard_origin_y = 29;
static const uint8_t keyboard_row_count = 3;
static const uint8_t keyboard_count = 2;
#define ENTER_KEY '\r'
#define BACKSPACE_KEY '\b'
#define SWITCH_KEYBOARD_KEY 0xfe
@@ -134,7 +133,7 @@ static const TextInputKey symbol_keyboard_keys_row_3[] = {
{SWITCH_KEYBOARD_KEY, 1, 23},
{'+', 13, 32},
{'`', 21, 32},
{'\'',28, 32},
{'\'', 28, 32},
{'^', 36, 32},
{'*', 44, 32},
{',', 52, 32},
@@ -146,33 +145,32 @@ static const TextInputKey symbol_keyboard_keys_row_3[] = {
{'9', 120, 32},
};
static const Keyboard keyboard = {
.rows = {
keyboard_keys_row_1,
keyboard_keys_row_2,
keyboard_keys_row_3,
},
.rows =
{
keyboard_keys_row_1,
keyboard_keys_row_2,
keyboard_keys_row_3,
},
.keyboard_index = 0,
};
static const Keyboard symbol_keyboard = {
.rows = {
symbol_keyboard_keys_row_1,
symbol_keyboard_keys_row_2,
symbol_keyboard_keys_row_3,
},
.rows =
{
symbol_keyboard_keys_row_1,
symbol_keyboard_keys_row_2,
symbol_keyboard_keys_row_3,
},
.keyboard_index = 1,
};
static const Keyboard* keyboards[] = {
&keyboard,
&symbol_keyboard,
};
static void switch_keyboard(TextInputModel* model)
{
static void switch_keyboard(TextInputModel* model) {
model->selected_keyboard = (model->selected_keyboard + 1) % keyboard_count;
}
@@ -180,31 +178,31 @@ static uint8_t get_row_size(const Keyboard* keyboard, uint8_t row_index) {
uint8_t row_size = 0;
if(keyboard == &symbol_keyboard) {
switch(row_index + 1) {
case 1:
row_size = COUNT_OF(symbol_keyboard_keys_row_1);
break;
case 2:
row_size = COUNT_OF(symbol_keyboard_keys_row_2);
break;
case 3:
row_size = COUNT_OF(symbol_keyboard_keys_row_3);
break;
default:
furi_crash(NULL);
case 1:
row_size = COUNT_OF(symbol_keyboard_keys_row_1);
break;
case 2:
row_size = COUNT_OF(symbol_keyboard_keys_row_2);
break;
case 3:
row_size = COUNT_OF(symbol_keyboard_keys_row_3);
break;
default:
furi_crash(NULL);
}
} else {
switch(row_index + 1) {
case 1:
row_size = COUNT_OF(keyboard_keys_row_1);
break;
case 2:
row_size = COUNT_OF(keyboard_keys_row_2);
break;
case 3:
row_size = COUNT_OF(keyboard_keys_row_3);
break;
default:
furi_crash(NULL);
case 1:
row_size = COUNT_OF(keyboard_keys_row_1);
break;
case 2:
row_size = COUNT_OF(keyboard_keys_row_2);
break;
case 3:
row_size = COUNT_OF(keyboard_keys_row_3);
break;
default:
furi_crash(NULL);
}
}
@@ -223,7 +221,9 @@ static const TextInputKey* get_row(const Keyboard* keyboard, uint8_t row_index)
}
static char get_selected_char(TextInputModel* model) {
return get_row(keyboards[model->selected_keyboard], model->selected_row)[model->selected_column].text;
return get_row(
keyboards[model->selected_keyboard], model->selected_row)[model->selected_column]
.text;
}
static bool char_is_lowercase(char letter) {
@@ -380,7 +380,8 @@ static void text_input_handle_up(TextInput* text_input, TextInputModel* model) {
UNUSED(text_input);
if(model->selected_row > 0) {
model->selected_row--;
if(model->selected_column > get_row_size(keyboards[model->selected_keyboard], model->selected_row) - 6) {
if(model->selected_column >
get_row_size(keyboards[model->selected_keyboard], model->selected_row) - 6) {
model->selected_column = model->selected_column + 1;
}
}
@@ -390,7 +391,8 @@ static void text_input_handle_down(TextInput* text_input, TextInputModel* model)
UNUSED(text_input);
if(model->selected_row < keyboard_row_count - 1) {
model->selected_row++;
if(model->selected_column > get_row_size(keyboards[model->selected_keyboard], model->selected_row) - 4) {
if(model->selected_column >
get_row_size(keyboards[model->selected_keyboard], model->selected_row) - 4) {
model->selected_column = model->selected_column - 1;
}
}
@@ -401,13 +403,15 @@ static void text_input_handle_left(TextInput* text_input, TextInputModel* model)
if(model->selected_column > 0) {
model->selected_column--;
} else {
model->selected_column = get_row_size(keyboards[model->selected_keyboard], model->selected_row) - 1;
model->selected_column =
get_row_size(keyboards[model->selected_keyboard], model->selected_row) - 1;
}
}
static void text_input_handle_right(TextInput* text_input, TextInputModel* model) {
UNUSED(text_input);
if(model->selected_column < get_row_size(keyboards[model->selected_keyboard], model->selected_row) - 1) {
if(model->selected_column <
get_row_size(keyboards[model->selected_keyboard], model->selected_row) - 1) {
model->selected_column++;
} else {
model->selected_column = 0;
@@ -13,7 +13,6 @@ void namechanger_on_system_start() {
FuriString* NAMEHEADER;
NAMEHEADER = furi_string_alloc_set("Flipper Name File");
bool result = false;
FuriString* data;
-1
View File
@@ -13,7 +13,6 @@ XtremeSettings* XTREME_SETTINGS() {
void XTREME_SETTINGS_LOAD() {
if(xtreme_settings == NULL) {
xtreme_settings = malloc(sizeof(XtremeSettings));
bool loaded;
@@ -96,12 +96,14 @@ bool desktop_settings_scene_start_on_event(void* context, SceneManagerEvent sme)
if(sme.type == SceneManagerEventTypeCustom) {
switch(sme.event) {
case SCENE_EVENT_SELECT_FAVORITE_PRIMARY:
scene_manager_set_scene_state(app->scene_manager, DesktopSettingsAppSceneFavorite, true);
scene_manager_set_scene_state(
app->scene_manager, DesktopSettingsAppSceneFavorite, true);
scene_manager_next_scene(app->scene_manager, DesktopSettingsAppSceneFavorite);
consumed = true;
break;
case SCENE_EVENT_SELECT_FAVORITE_SECONDARY:
scene_manager_set_scene_state(app->scene_manager, DesktopSettingsAppSceneFavorite, false);
scene_manager_set_scene_state(
app->scene_manager, DesktopSettingsAppSceneFavorite, false);
scene_manager_next_scene(app->scene_manager, DesktopSettingsAppSceneFavorite);
consumed = true;
break;
+35 -35
View File
@@ -427,42 +427,42 @@ bool furi_hal_subghz_is_tx_allowed(uint32_t value) {
furi_record_close(RECORD_STORAGE);
switch(furi_hal_version_get_hw_region_otp()) {
case FuriHalVersionRegionEuRu:
//433,05..434,79; 868,15..868,55
if(!(value >= 433050000 && value <= 434790000) &&
!(value >= 868150000 && value <= 868550000)) {
} else {
is_allowed = true;
}
break;
case FuriHalVersionRegionUsCaAu:
//304,10..321,95; 433,05..434,79; 915,00..928,00
if(!(value >= 304100000 && value <= 321950000) &&
!(value >= 433050000 && value <= 434790000) &&
!(value >= 915000000 && value <= 928000000)) {
} else {
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) {
if(value <= 321950000 &&
((furi_hal_subghz.preset == FuriHalSubGhzPresetOok270Async) ||
(furi_hal_subghz.preset == FuriHalSubGhzPresetOok650Async))) {
furi_hal_subghz_load_patable(furi_hal_subghz_preset_ook_async_patable_au);
}
}
is_allowed = true;
}
break;
case FuriHalVersionRegionJp:
//312,00..315,25; 920,50..923,50
if(!(value >= 312000000 && value <= 315250000) &&
!(value >= 920500000 && value <= 923500000)) {
} else {
is_allowed = true;
}
break;
default:
case FuriHalVersionRegionEuRu:
//433,05..434,79; 868,15..868,55
if(!(value >= 433050000 && value <= 434790000) &&
!(value >= 868150000 && value <= 868550000)) {
} else {
is_allowed = true;
break;
}
break;
case FuriHalVersionRegionUsCaAu:
//304,10..321,95; 433,05..434,79; 915,00..928,00
if(!(value >= 304100000 && value <= 321950000) &&
!(value >= 433050000 && value <= 434790000) &&
!(value >= 915000000 && value <= 928000000)) {
} else {
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) {
if(value <= 321950000 &&
((furi_hal_subghz.preset == FuriHalSubGhzPresetOok270Async) ||
(furi_hal_subghz.preset == FuriHalSubGhzPresetOok650Async))) {
furi_hal_subghz_load_patable(furi_hal_subghz_preset_ook_async_patable_au);
}
}
is_allowed = true;
}
break;
case FuriHalVersionRegionJp:
//312,00..315,25; 920,50..923,50
if(!(value >= 312000000 && value <= 315250000) &&
!(value >= 920500000 && value <= 923500000)) {
} else {
is_allowed = true;
}
break;
default:
is_allowed = true;
break;
}
// No flag - test original range, flag set, test extended range
if(!(value >= 299999755 && value <= 350000335) && // was increased from 348 to 350