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