mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-16 04:24:45 -07:00
Format
This commit is contained in:
@@ -176,8 +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_version(NULL), version_get_builddate(NULL));
|
||||
app->version_tag =
|
||||
furi_string_alloc_printf("%s %s", version_get_version(NULL), version_get_builddate(NULL));
|
||||
|
||||
return app;
|
||||
}
|
||||
|
||||
@@ -328,20 +328,20 @@ static void gui_input(Gui* gui, InputEvent* input_event) {
|
||||
|
||||
if(XTREME_SETTINGS()->left_handed) {
|
||||
switch(input_event->key) {
|
||||
case InputKeyUp:
|
||||
input_event->key = InputKeyDown;
|
||||
break;
|
||||
case InputKeyDown:
|
||||
input_event->key = InputKeyUp;
|
||||
break;
|
||||
case InputKeyLeft:
|
||||
input_event->key = InputKeyRight;
|
||||
break;
|
||||
case InputKeyRight:
|
||||
input_event->key = InputKeyLeft;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case InputKeyUp:
|
||||
input_event->key = InputKeyDown;
|
||||
break;
|
||||
case InputKeyDown:
|
||||
input_event->key = InputKeyUp;
|
||||
break;
|
||||
case InputKeyLeft:
|
||||
input_event->key = InputKeyRight;
|
||||
break;
|
||||
case InputKeyRight:
|
||||
input_event->key = InputKeyLeft;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,50 +22,12 @@ static const NotificationSequence sequence_note_c = {
|
||||
|
||||
#define BACKLIGHT_COUNT 21
|
||||
const char* const backlight_text[BACKLIGHT_COUNT] = {
|
||||
"0%",
|
||||
"5%",
|
||||
"10%",
|
||||
"15%",
|
||||
"20%",
|
||||
"25%",
|
||||
"30%",
|
||||
"35%",
|
||||
"40%",
|
||||
"45%",
|
||||
"50%",
|
||||
"55%",
|
||||
"60%",
|
||||
"65%",
|
||||
"70%",
|
||||
"75%",
|
||||
"80%",
|
||||
"85%",
|
||||
"90%",
|
||||
"95%",
|
||||
"100%",
|
||||
"0%", "5%", "10%", "15%", "20%", "25%", "30%", "35%", "40%", "45%", "50%",
|
||||
"55%", "60%", "65%", "70%", "75%", "80%", "85%", "90%", "95%", "100%",
|
||||
};
|
||||
const float backlight_value[BACKLIGHT_COUNT] = {
|
||||
0.00f,
|
||||
0.05f,
|
||||
0.10f,
|
||||
0.15f,
|
||||
0.20f,
|
||||
0.25f,
|
||||
0.30f,
|
||||
0.35f,
|
||||
0.40f,
|
||||
0.45f,
|
||||
0.50f,
|
||||
0.55f,
|
||||
0.60f,
|
||||
0.65f,
|
||||
0.70f,
|
||||
0.75f,
|
||||
0.80f,
|
||||
0.85f,
|
||||
0.90f,
|
||||
0.95f,
|
||||
1.00f,
|
||||
0.00f, 0.05f, 0.10f, 0.15f, 0.20f, 0.25f, 0.30f, 0.35f, 0.40f, 0.45f, 0.50f,
|
||||
0.55f, 0.60f, 0.65f, 0.70f, 0.75f, 0.80f, 0.85f, 0.90f, 0.95f, 1.00f,
|
||||
};
|
||||
|
||||
#define VOLUME_COUNT 5
|
||||
|
||||
@@ -14,9 +14,15 @@ env.Append(
|
||||
"USE_FULL_LL_DRIVER",
|
||||
],
|
||||
SDK_HEADERS=[
|
||||
*env.GlobRecursive("*_ll_*.h", "#/lib/STM32CubeWB/Drivers/STM32WBxx_HAL_Driver/Inc/", exclude="*usb.h"),
|
||||
*env.GlobRecursive(
|
||||
"*_ll_*.h",
|
||||
"#/lib/STM32CubeWB/Drivers/STM32WBxx_HAL_Driver/Inc/",
|
||||
exclude="*usb.h",
|
||||
),
|
||||
File("STM32CubeWB/Middlewares/Third_Party/FreeRTOS/Source/include/FreeRTOS.h"),
|
||||
File("STM32CubeWB/Middlewares/Third_Party/FreeRTOS/Source/include/stream_buffer.h"),
|
||||
File(
|
||||
"STM32CubeWB/Middlewares/Third_Party/FreeRTOS/Source/include/stream_buffer.h"
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -166,11 +166,13 @@ class Main(App):
|
||||
)
|
||||
)
|
||||
bundle_args.extend(self.other_args)
|
||||
log_custom_fz_name = (
|
||||
environ.get("CUSTOM_FLIPPER_NAME", None)
|
||||
or ""
|
||||
)
|
||||
if (log_custom_fz_name != "") and (len(log_custom_fz_name) <= 8) and (log_custom_fz_name.isalnum()) and (log_custom_fz_name.isascii()):
|
||||
log_custom_fz_name = environ.get("CUSTOM_FLIPPER_NAME", None) or ""
|
||||
if (
|
||||
(log_custom_fz_name != "")
|
||||
and (len(log_custom_fz_name) <= 8)
|
||||
and (log_custom_fz_name.isalnum())
|
||||
and (log_custom_fz_name.isascii())
|
||||
):
|
||||
self.logger.info(
|
||||
f"Flipper Custom Name is set:\n\tName: {log_custom_fz_name} : length - {len(log_custom_fz_name)} chars"
|
||||
)
|
||||
|
||||
@@ -34,25 +34,20 @@ class GitVersion:
|
||||
|
||||
branch_num = self._exec_git("rev-list --count HEAD") or "n/a"
|
||||
|
||||
version = (
|
||||
os.environ.get("DIST_SUFFIX", None)
|
||||
or VERSION
|
||||
or "unknown"
|
||||
)
|
||||
version = os.environ.get("DIST_SUFFIX", None) or VERSION or "unknown"
|
||||
|
||||
custom_fz_name = (
|
||||
os.environ.get("CUSTOM_FLIPPER_NAME", None)
|
||||
or ""
|
||||
)
|
||||
custom_fz_name = os.environ.get("CUSTOM_FLIPPER_NAME", None) or ""
|
||||
|
||||
force_no_dirty = (
|
||||
os.environ.get("FORCE_NO_DIRTY", None)
|
||||
or ""
|
||||
)
|
||||
if (force_no_dirty != ""):
|
||||
force_no_dirty = os.environ.get("FORCE_NO_DIRTY", None) or ""
|
||||
if force_no_dirty != "":
|
||||
dirty = False
|
||||
|
||||
if (custom_fz_name != "") and (len(custom_fz_name) <= 8) and (custom_fz_name.isalnum()) and (custom_fz_name.isascii()):
|
||||
if (
|
||||
(custom_fz_name != "")
|
||||
and (len(custom_fz_name) <= 8)
|
||||
and (custom_fz_name.isalnum())
|
||||
and (custom_fz_name.isascii())
|
||||
):
|
||||
return {
|
||||
"GIT_COMMIT": commit,
|
||||
"GIT_BRANCH": branch,
|
||||
|
||||
Reference in New Issue
Block a user