mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 20:18:35 -07:00
Small bump in the road
- Update assets and references for new project - Revert DFU image and CLI motd - Remove NSFW text and flag - Remove credits animation (will be replaced with a setting menu soon) - New EvilPortal example HTML and better error message - Initial standalone naming for asset packs and mainmenu apps - File migration fixes/improvements - Remove hotfix workflow
This commit is contained in:
@@ -86,17 +86,16 @@ void bt_keys_storage_set_default_path(Bt* bt);
|
||||
|
||||
bool bt_remote_rssi(Bt* bt, uint8_t* rssi);
|
||||
|
||||
/**
|
||||
*
|
||||
* (Probably bad) way of opening the RPC connection, everywhereTM
|
||||
*/
|
||||
|
||||
/** Open a new RPC connection
|
||||
*
|
||||
* @param bt Bt instance
|
||||
*/
|
||||
void bt_open_rpc_connection(Bt* bt);
|
||||
|
||||
/**
|
||||
*
|
||||
* Closing the RPC connection, everywhereTM
|
||||
*/
|
||||
/** Close the active RPC connection
|
||||
*
|
||||
* @param bt Bt instance
|
||||
*/
|
||||
void bt_close_rpc_connection(Bt* bt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <bt/bt_settings.h>
|
||||
#include <bt/bt_service/bt_keys_storage.h>
|
||||
|
||||
#define BT_KEYS_STORAGE_OLD_PATH INT_PATH(".bt.keys")
|
||||
#define BT_KEYS_STORAGE_PATH CFG_PATH("bt.keys")
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BT_SETTINGS_OLD_PATH INT_PATH(".bt.settings")
|
||||
#define BT_SETTINGS_PATH CFG_PATH("bt.settings")
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -103,18 +103,26 @@ void cli_print_usage(const char* cmd, const char* usage, const char* arg) {
|
||||
}
|
||||
|
||||
void cli_motd() {
|
||||
printf(
|
||||
"\033[0m\r\n"
|
||||
" ,-' \\_/ `\\\r\n"
|
||||
"\033[1;31m__\033[0m \033[1;31m__\033[37m_\033[0m ___ ___ ___ ( , |\r\n"
|
||||
"\033[1;31m\\\033[0m \033[1;31m\\/\033[0m \033[1;31m/\033[0m \033[1m|_ _ __ ___ _ __ ___ ___\033[0m / ___| | |_ _| `-.-'`-.-'/|_|\r\n"
|
||||
" \033[1;31m\\\033[0m \033[1;31m/\033[37m| __| \'__/ _ \\ \'_ ` _ \\ / _ \\\033[0m | | | | | | \\ / | |\r\n"
|
||||
" \033[1;31m/\033[0m \033[1;31m\\\033[37m| |_| | | __/ | | | | | __/\033[0m | |___| |___ | | |=[]=: / ,'\r\n"
|
||||
"\033[1;31m/_/\\_\\\033[37m\\__|_| \\___|_| |_| |_|\\___|\033[0m \\____|_____|___| / `\\ '\r\n"
|
||||
" : \\/ )\r\n"
|
||||
"Welcome to the \033[1;31mX\033[37mtreme\033[0m Command Line Interface! | / ;\r\n"
|
||||
"Visit \033[1;31mhttps://flipper-xtre.me/\033[0m for even more fun | / /"
|
||||
"\r\n");
|
||||
printf("\r\n"
|
||||
" _.-------.._ -,\r\n"
|
||||
" .-\"```\"--..,,_/ /`-, -, \\ \r\n"
|
||||
" .:\" /:/ /'\\ \\ ,_..., `. | |\r\n"
|
||||
" / ,----/:/ /`\\ _\\~`_-\"` _;\r\n"
|
||||
" ' / /`\"\"\"'\\ \\ \\.~`_-' ,-\"'/ \r\n"
|
||||
" | | | 0 | | .-' ,/` /\r\n"
|
||||
" | ,..\\ \\ ,.-\"` ,/` /\r\n"
|
||||
" ; : `/`\"\"\\` ,/--==,/-----,\r\n"
|
||||
" | `-...| -.___-Z:_______J...---;\r\n"
|
||||
" : ` _-'\r\n"
|
||||
" _L_ _ ___ ___ ___ ___ ____--\"`___ _ ___\r\n"
|
||||
"| __|| | |_ _|| _ \\| _ \\| __|| _ \\ / __|| | |_ _|\r\n"
|
||||
"| _| | |__ | | | _/| _/| _| | / | (__ | |__ | |\r\n"
|
||||
"|_| |____||___||_| |_| |___||_|_\\ \\___||____||___|\r\n"
|
||||
"\r\n"
|
||||
"Welcome to Flipper Zero Command Line Interface!\r\n"
|
||||
"Read the manual: https://docs.flipper.net/development/cli\r\n"
|
||||
"Run `help` or `?` to list available commands\r\n"
|
||||
"\r\n");
|
||||
|
||||
const Version* firmware_version = furi_hal_version_get_firmware_version();
|
||||
if(firmware_version) {
|
||||
|
||||
@@ -174,7 +174,7 @@ void cli_command_src(Cli* cli, FuriString* args, void* context) {
|
||||
UNUSED(args);
|
||||
UNUSED(context);
|
||||
|
||||
printf("https://github.com/Flipper-XFW/Xtreme-Firmware");
|
||||
printf("https://github.com/Next-Flip/Momentum-Firmware");
|
||||
}
|
||||
|
||||
#define CLI_COMMAND_LOG_RING_SIZE 2048
|
||||
|
||||
@@ -13,14 +13,13 @@
|
||||
#include "animation_storage.h"
|
||||
#include "animation_manager.h"
|
||||
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
|
||||
#define TAG "AnimationManager"
|
||||
|
||||
#define HARDCODED_ANIMATION_NAME "L1_AnimationError_128x64"
|
||||
#define NO_SD_ANIMATION_NAME "L1_NoSd_128x49"
|
||||
#define BAD_BATTERY_ANIMATION_NAME "L1_BadBattery_128x47"
|
||||
#define CREDITS_ANIMATION_NAME "Credits_128x64"
|
||||
|
||||
#define NO_DB_ANIMATION_NAME "L0_NoDb_128x51"
|
||||
#define BAD_SD_ANIMATION_NAME "L0_SdBad_128x51"
|
||||
@@ -148,7 +147,7 @@ void animation_manager_check_blocking_process(AnimationManager* animation_manage
|
||||
const StorageAnimationManifestInfo* manifest_info =
|
||||
animation_storage_get_meta(animation_manager->current_animation);
|
||||
bool valid = animation_manager_is_valid_idle_animation(
|
||||
manifest_info, &stats, xtreme_settings.unlock_anims);
|
||||
manifest_info, &stats, momentum_settings.unlock_anims);
|
||||
|
||||
if(!valid) {
|
||||
animation_manager_start_new_idle(animation_manager);
|
||||
@@ -203,8 +202,8 @@ static void animation_manager_start_new_idle(AnimationManager* animation_manager
|
||||
const BubbleAnimation* bubble_animation =
|
||||
animation_storage_get_bubble_animation(animation_manager->current_animation);
|
||||
animation_manager->state = AnimationManagerStateIdle;
|
||||
int32_t duration = (xtreme_settings.cycle_anims == 0) ? (bubble_animation->duration) :
|
||||
(xtreme_settings.cycle_anims);
|
||||
int32_t duration = (momentum_settings.cycle_anims == 0) ? (bubble_animation->duration) :
|
||||
(momentum_settings.cycle_anims);
|
||||
furi_timer_start(
|
||||
animation_manager->idle_animation_timer, (duration > 0) ? (duration * 1000) : 0);
|
||||
}
|
||||
@@ -389,8 +388,7 @@ static StorageAnimation*
|
||||
uint32_t whole_weight = 0;
|
||||
|
||||
// Filter valid animations
|
||||
bool skip_credits = !xtreme_settings.credits_anim && xtreme_settings.asset_pack[0] == '\0';
|
||||
bool unlock = xtreme_settings.unlock_anims;
|
||||
bool unlock = momentum_settings.unlock_anims;
|
||||
StorageAnimationList_it_t it;
|
||||
for(StorageAnimationList_it(it, animation_list); !StorageAnimationList_end_p(it);) {
|
||||
StorageAnimation* storage_animation = *StorageAnimationList_ref(it);
|
||||
@@ -401,9 +399,6 @@ static StorageAnimation*
|
||||
if(strcmp(manifest_info->name, HARDCODED_ANIMATION_NAME) == 0) {
|
||||
// Dont pick error anim randomly
|
||||
valid = false;
|
||||
} else if(skip_credits && strcmp(manifest_info->name, CREDITS_ANIMATION_NAME) == 0) {
|
||||
// Dont pick credits anim if disabled
|
||||
valid = false;
|
||||
}
|
||||
|
||||
if(valid) {
|
||||
@@ -546,7 +541,7 @@ void animation_manager_load_and_continue_animation(AnimationManager* animation_m
|
||||
const StorageAnimationManifestInfo* manifest_info =
|
||||
animation_storage_get_meta(restore_animation);
|
||||
bool valid = animation_manager_is_valid_idle_animation(
|
||||
manifest_info, &stats, xtreme_settings.unlock_anims);
|
||||
manifest_info, &stats, momentum_settings.unlock_anims);
|
||||
// Restore only if anim is valid and not the error anim
|
||||
if(valid && strcmp(manifest_info->name, HARDCODED_ANIMATION_NAME) != 0) {
|
||||
animation_manager_replace_current_animation(
|
||||
@@ -561,9 +556,9 @@ void animation_manager_load_and_continue_animation(AnimationManager* animation_m
|
||||
const BubbleAnimation* bubble_animation =
|
||||
animation_storage_get_bubble_animation(
|
||||
animation_manager->current_animation);
|
||||
int32_t duration = (xtreme_settings.cycle_anims == 0) ?
|
||||
int32_t duration = (momentum_settings.cycle_anims == 0) ?
|
||||
(bubble_animation->duration) :
|
||||
(xtreme_settings.cycle_anims);
|
||||
(momentum_settings.cycle_anims);
|
||||
furi_timer_start(
|
||||
animation_manager->idle_animation_timer,
|
||||
(duration > 0) ? (duration * 1000) : 0);
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
#include "animation_storage_i.h"
|
||||
#include <assets_dolphin_internal.h>
|
||||
#include <assets_dolphin_blocking.h>
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
#define ANIMATION_META_FILE "meta.txt"
|
||||
#define TAG "AnimationStorage"
|
||||
char ANIMATION_DIR[23 /*"/ext/asset_packs//Anims"*/ + XTREME_ASSETS_PACK_NAME_LEN + 1];
|
||||
char ANIMATION_DIR[23 /* /ext/asset_packs//Anims */ + ASSET_PACKS_NAME_LEN + 1];
|
||||
char ANIMATION_MANIFEST_FILE[sizeof(ANIMATION_DIR) + 13 /*"/manifest.txt"*/];
|
||||
|
||||
static void animation_storage_free_bubbles(BubbleAnimation* animation);
|
||||
@@ -25,10 +25,10 @@ static BubbleAnimation* animation_storage_load_animation(const char* name);
|
||||
void animation_handler_select_manifest() {
|
||||
FuriString* anim_dir = furi_string_alloc();
|
||||
FuriString* manifest = furi_string_alloc();
|
||||
bool use_asset_pack = xtreme_settings.asset_pack[0] != '\0';
|
||||
bool use_asset_pack = momentum_settings.asset_pack[0] != '\0';
|
||||
if(use_asset_pack) {
|
||||
furi_string_printf(
|
||||
anim_dir, "%s/%s/Anims", XTREME_ASSETS_PATH, xtreme_settings.asset_pack);
|
||||
anim_dir, "%s/%s/Anims", ASSET_PACKS_PATH, momentum_settings.asset_pack);
|
||||
furi_string_printf(manifest, "%s/manifest.txt", furi_string_get_cstr(anim_dir));
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
if(storage_common_stat(storage, furi_string_get_cstr(manifest), NULL) == FSE_OK) {
|
||||
@@ -513,7 +513,7 @@ static BubbleAnimation* animation_storage_load_animation(const char* name) {
|
||||
if(!flipper_format_read_uint32(ff, "Active cycles", &u32value, 1)) break; //-V779
|
||||
animation->active_cycles = u32value;
|
||||
if(!flipper_format_read_uint32(ff, "Frame rate", &u32value, 1)) break;
|
||||
uint32_t anim_speed = xtreme_settings.anim_speed;
|
||||
uint32_t anim_speed = momentum_settings.anim_speed;
|
||||
u32value = (u32value * anim_speed) / 100;
|
||||
FURI_CONST_ASSIGN(animation->icon_animation.frame_rate, u32value < 1 ? 1 : u32value);
|
||||
if(!flipper_format_read_uint32(ff, "Duration", &u32value, 1)) break;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <cli/cli_vcp.h>
|
||||
#include <locale/locale.h>
|
||||
#include <applications/main/archive/helpers/archive_helpers_ext.h>
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
|
||||
#include "animations/animation_manager.h"
|
||||
#include "desktop/scenes/desktop_scene.h"
|
||||
@@ -66,13 +66,13 @@ static void desktop_clock_reconfigure(Desktop* desktop) {
|
||||
|
||||
desktop_clock_update(desktop);
|
||||
|
||||
if(xtreme_settings.statusbar_clock) {
|
||||
if(momentum_settings.statusbar_clock) {
|
||||
furi_timer_start(desktop->update_clock_timer, furi_ms_to_ticks(1000));
|
||||
} else {
|
||||
furi_timer_stop(desktop->update_clock_timer);
|
||||
}
|
||||
|
||||
view_port_enabled_set(desktop->clock_viewport, xtreme_settings.statusbar_clock);
|
||||
view_port_enabled_set(desktop->clock_viewport, momentum_settings.statusbar_clock);
|
||||
}
|
||||
|
||||
static void desktop_clock_draw_callback(Canvas* canvas, void* context) {
|
||||
@@ -217,7 +217,7 @@ void desktop_lock(Desktop* desktop, bool pin_lock) {
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
cli_session_close(cli);
|
||||
furi_record_close(RECORD_CLI);
|
||||
if(!xtreme_settings.allow_locked_rpc_commands) {
|
||||
if(!momentum_settings.allow_locked_rpc_commands) {
|
||||
Bt* bt = furi_record_open(RECORD_BT);
|
||||
bt_close_rpc_connection(bt);
|
||||
furi_record_close(RECORD_BT);
|
||||
@@ -491,7 +491,7 @@ int32_t desktop_srv(void* p) {
|
||||
|
||||
scene_manager_next_scene(desktop->scene_manager, DesktopSceneMain);
|
||||
|
||||
if(xtreme_settings.lock_on_boot || furi_hal_rtc_is_flag_set(FuriHalRtcFlagLock)) {
|
||||
if(momentum_settings.lock_on_boot || furi_hal_rtc_is_flag_set(FuriHalRtcFlagLock)) {
|
||||
desktop_lock(desktop, true);
|
||||
} else {
|
||||
if(!loader_is_locked(desktop->loader)) {
|
||||
|
||||
@@ -6,12 +6,10 @@
|
||||
#include <toolbox/saved_struct.h>
|
||||
#include <storage/storage.h>
|
||||
|
||||
#define DESKTOP_SETTINGS_OLD_PATH CFG_PATH("desktop.settings")
|
||||
#define DESKTOP_SETTINGS_PATH INT_PATH(".desktop.settings")
|
||||
#define DESKTOP_SETTINGS_MAGIC (0x17)
|
||||
#define DESKTOP_SETTINGS_VER (11)
|
||||
|
||||
#define DESKTOP_KEYBINDS_OLD_PATH CFG_PATH(".desktop.keybinds")
|
||||
#define DESKTOP_KEYBINDS_PATH CFG_PATH("desktop.keybinds")
|
||||
#define DESKTOP_KEYBINDS_MAGIC (0x14)
|
||||
#define DESKTOP_KEYBINDS_VER (1)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <furi_hal.h>
|
||||
|
||||
#include "../desktop_i.h"
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
|
||||
#define DesktopFaultEventExit 0x00FF00FF
|
||||
|
||||
@@ -15,23 +15,13 @@ void desktop_scene_fault_on_enter(void* context) {
|
||||
|
||||
Popup* popup = desktop->hw_mismatch_popup;
|
||||
popup_set_context(popup, desktop);
|
||||
if(xtreme_assets.is_nsfw) {
|
||||
popup_set_header(
|
||||
popup,
|
||||
"Slut passed out\n but is now back",
|
||||
60,
|
||||
14 + STATUS_BAR_Y_SHIFT,
|
||||
AlignCenter,
|
||||
AlignCenter);
|
||||
} else {
|
||||
popup_set_header(
|
||||
popup,
|
||||
"Flipper crashed\n but has been rebooted",
|
||||
60,
|
||||
14 + STATUS_BAR_Y_SHIFT,
|
||||
AlignCenter,
|
||||
AlignCenter);
|
||||
}
|
||||
popup_set_header(
|
||||
popup,
|
||||
"Flipper crashed\n but has been rebooted",
|
||||
60,
|
||||
14 + STATUS_BAR_Y_SHIFT,
|
||||
AlignCenter,
|
||||
AlignCenter);
|
||||
|
||||
char* message = (char*)furi_hal_rtc_get_fault_data();
|
||||
popup_set_text(popup, message, 60, 37 + STATUS_BAR_Y_SHIFT, AlignCenter, AlignCenter);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <toolbox/saved_struct.h>
|
||||
#include <stdbool.h>
|
||||
#include <loader/loader.h>
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
|
||||
#include "../desktop_i.h"
|
||||
#include <desktop/desktop_settings.h>
|
||||
@@ -43,9 +43,9 @@ void desktop_scene_lock_menu_save_settings(Desktop* desktop) {
|
||||
notification_message_save_settings(desktop->lock_menu->notification);
|
||||
desktop->lock_menu->save_notification = false;
|
||||
}
|
||||
if(desktop->lock_menu->save_xtreme) {
|
||||
xtreme_settings_save();
|
||||
desktop->lock_menu->save_xtreme = false;
|
||||
if(desktop->lock_menu->save_momentum) {
|
||||
momentum_settings_save();
|
||||
desktop->lock_menu->save_momentum = false;
|
||||
}
|
||||
if(desktop->lock_menu->save_bt) {
|
||||
bt_settings_save(&desktop->lock_menu->bt->bt_settings);
|
||||
@@ -120,9 +120,9 @@ bool desktop_scene_lock_menu_on_event(void* context, SceneManagerEvent event) {
|
||||
}
|
||||
consumed = true;
|
||||
break;
|
||||
case DesktopLockMenuEventXtreme:
|
||||
case DesktopLockMenuEventMomentum:
|
||||
desktop_scene_lock_menu_save_settings(desktop);
|
||||
loader_start_detached_with_gui_error(desktop->loader, "Xtreme", NULL);
|
||||
loader_start_detached_with_gui_error(desktop->loader, "Momentum", NULL);
|
||||
consumed = true;
|
||||
break;
|
||||
case DesktopLockMenuEventStealthModeOn:
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "../views/desktop_view_locked.h"
|
||||
#include "desktop_scene.h"
|
||||
#include "desktop_scene_i.h"
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
|
||||
#define TAG "DesktopSrv"
|
||||
|
||||
@@ -85,7 +85,7 @@ bool desktop_scene_locked_on_event(void* context, SceneManagerEvent event) {
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
switch(event.event) {
|
||||
case DesktopLockedEventOpenPowerOff: {
|
||||
if(xtreme_settings.lockscreen_poweroff) {
|
||||
if(momentum_settings.lockscreen_poweroff) {
|
||||
loader_start(desktop->loader, "Power", "off", NULL);
|
||||
}
|
||||
consumed = true;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <stdint.h>
|
||||
#include <notification/notification.h>
|
||||
#include <notification/notification_messages.h>
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
|
||||
#include "../desktop.h"
|
||||
#include "../desktop_i.h"
|
||||
@@ -57,7 +57,7 @@ static void desktop_scene_pin_input_done_callback(const PinCode* pin_code, void*
|
||||
view_dispatcher_send_custom_event(desktop->view_dispatcher, DesktopPinInputEventUnlocked);
|
||||
} else {
|
||||
uint32_t pin_fails = furi_hal_rtc_get_pin_fails() + 1;
|
||||
if(pin_fails >= 10 && xtreme_settings.bad_pins_format) {
|
||||
if(pin_fails >= 10 && momentum_settings.bad_pins_format) {
|
||||
furi_hal_rtc_reset_registers();
|
||||
furi_hal_rtc_set_flag(FuriHalRtcFlagStorageFormatInternal);
|
||||
storage_sd_format(furi_record_open(RECORD_STORAGE));
|
||||
|
||||
@@ -58,5 +58,5 @@ typedef enum {
|
||||
DesktopLockMenuEventSettings,
|
||||
DesktopLockMenuEventLockKeypad,
|
||||
DesktopLockMenuEventLockPinOff,
|
||||
DesktopLockMenuEventXtreme,
|
||||
DesktopLockMenuEventMomentum,
|
||||
} DesktopEvent;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <furi.h>
|
||||
#include <gui/elements.h>
|
||||
#include <assets_icons.h>
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
#include <furi_hal_rtc.h>
|
||||
|
||||
#include "../desktop_i.h"
|
||||
@@ -20,7 +20,7 @@ typedef enum {
|
||||
DesktopLockMenuIndexDarkMode,
|
||||
DesktopLockMenuIndexLock,
|
||||
DesktopLockMenuIndexBluetooth,
|
||||
DesktopLockMenuIndexXtreme,
|
||||
DesktopLockMenuIndexMomentum,
|
||||
DesktopLockMenuIndexBrightness,
|
||||
DesktopLockMenuIndexVolume,
|
||||
|
||||
@@ -101,7 +101,7 @@ void desktop_lock_menu_draw_callback(Canvas* canvas, void* model) {
|
||||
break;
|
||||
case DesktopLockMenuIndexDarkMode:
|
||||
icon = &I_CC_DarkMode_16x16;
|
||||
enabled = xtreme_settings.dark_mode;
|
||||
enabled = momentum_settings.dark_mode;
|
||||
break;
|
||||
case DesktopLockMenuIndexLock:
|
||||
icon = &I_CC_Lock_16x16;
|
||||
@@ -110,8 +110,8 @@ void desktop_lock_menu_draw_callback(Canvas* canvas, void* model) {
|
||||
icon = &I_CC_Bluetooth_16x16;
|
||||
enabled = m->lock_menu->bt->bt_settings.enabled;
|
||||
break;
|
||||
case DesktopLockMenuIndexXtreme:
|
||||
icon = &I_CC_Xtreme_16x16;
|
||||
case DesktopLockMenuIndexMomentum:
|
||||
icon = &I_CC_Momentum_16x16;
|
||||
break;
|
||||
case DesktopLockMenuIndexBrightness:
|
||||
icon = &I_Pin_star_7x7;
|
||||
@@ -287,8 +287,8 @@ bool desktop_lock_menu_input_callback(InputEvent* event, void* context) {
|
||||
desktop_event = DesktopLockMenuEventSettings;
|
||||
break;
|
||||
case DesktopLockMenuIndexDarkMode:
|
||||
xtreme_settings.dark_mode = !xtreme_settings.dark_mode;
|
||||
lock_menu->save_xtreme = true;
|
||||
momentum_settings.dark_mode = !momentum_settings.dark_mode;
|
||||
lock_menu->save_momentum = true;
|
||||
break;
|
||||
case DesktopLockMenuIndexBluetooth:
|
||||
lock_menu->bt->bt_settings.enabled = !lock_menu->bt->bt_settings.enabled;
|
||||
@@ -299,8 +299,8 @@ bool desktop_lock_menu_input_callback(InputEvent* event, void* context) {
|
||||
}
|
||||
lock_menu->save_bt = true;
|
||||
break;
|
||||
case DesktopLockMenuIndexXtreme:
|
||||
desktop_event = DesktopLockMenuEventXtreme;
|
||||
case DesktopLockMenuIndexMomentum:
|
||||
desktop_event = DesktopLockMenuEventMomentum;
|
||||
break;
|
||||
case DesktopLockMenuIndexVolume:
|
||||
desktop_event = stealth_mode ? DesktopLockMenuEventStealthModeOff :
|
||||
|
||||
@@ -19,7 +19,7 @@ struct DesktopLockMenuView {
|
||||
NotificationApp* notification;
|
||||
Bt* bt;
|
||||
bool save_notification;
|
||||
bool save_xtreme;
|
||||
bool save_momentum;
|
||||
bool save_bt;
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <gui/view.h>
|
||||
#include <assets_icons.h>
|
||||
#include <locale/locale.h>
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
|
||||
#include <desktop/desktop_settings.h>
|
||||
#include "../desktop_i.h"
|
||||
@@ -92,14 +92,14 @@ void desktop_view_locked_draw_lockscreen(Canvas* canvas, void* m) {
|
||||
snprintf(date_str, 14, "%.2d-%.2d-%.4d", datetime.day, datetime.month, datetime.year);
|
||||
}
|
||||
|
||||
if(!xtreme_settings.lockscreen_transparent) {
|
||||
if(!momentum_settings.lockscreen_transparent) {
|
||||
canvas_draw_icon(canvas, 0, 0 + y, &I_Lockscreen);
|
||||
}
|
||||
if(xtreme_settings.lockscreen_time) {
|
||||
if(momentum_settings.lockscreen_time) {
|
||||
canvas_set_font(canvas, FontBigNumbers);
|
||||
canvas_draw_str(canvas, 0, 64 + y, time_str);
|
||||
int offset = canvas_string_width(canvas, time_str) + 2;
|
||||
if(xtreme_settings.lockscreen_seconds) {
|
||||
if(momentum_settings.lockscreen_seconds) {
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
canvas_draw_str(canvas, 0 + offset, 64 + y, second_str);
|
||||
offset += canvas_string_width(canvas, ":00") + 2;
|
||||
@@ -109,12 +109,12 @@ void desktop_view_locked_draw_lockscreen(Canvas* canvas, void* m) {
|
||||
canvas_draw_str(canvas, 0 + offset, 64 + y, meridian_str);
|
||||
}
|
||||
}
|
||||
if(xtreme_settings.lockscreen_date) {
|
||||
if(momentum_settings.lockscreen_date) {
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
canvas_draw_str(canvas, 0, 48 + y + 16 * !xtreme_settings.lockscreen_time, date_str);
|
||||
canvas_draw_str(canvas, 0, 48 + y + 16 * !momentum_settings.lockscreen_time, date_str);
|
||||
}
|
||||
if(model->view_state == DesktopViewLockedStateLockedHintShown &&
|
||||
xtreme_settings.lockscreen_prompt) {
|
||||
momentum_settings.lockscreen_prompt) {
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
if(model->pin_locked) {
|
||||
elements_bubble_str(
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <furi_hal.h>
|
||||
#include <stdint.h>
|
||||
#include <furi.h>
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
#define DOLPHIN_LOCK_EVENT_FLAG (0x1)
|
||||
|
||||
#define TAG "Dolphin"
|
||||
@@ -156,7 +156,7 @@ int32_t dolphin_srv(void* p) {
|
||||
furi_record_create(RECORD_DOLPHIN, dolphin);
|
||||
|
||||
dolphin_state_load(dolphin->state);
|
||||
uint32_t butthurt_interval = xtreme_settings.butthurt_timer * 1000;
|
||||
uint32_t butthurt_interval = momentum_settings.butthurt_timer * 1000;
|
||||
if(butthurt_interval) furi_timer_restart(dolphin->butthurt_timer, butthurt_interval);
|
||||
dolphin_update_clear_limits_timer_period(dolphin);
|
||||
furi_timer_restart(dolphin->clear_limits_timer, HOURS_IN_TICKS(24));
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DOLPHIN_STATE_OLD_PATH INT_PATH(".dolphin.state")
|
||||
#define DOLPHIN_STATE_PATH CFG_PATH("dolphin.state")
|
||||
|
||||
extern const uint32_t DOLPHIN_LEVELS[];
|
||||
|
||||
@@ -6,5 +6,4 @@
|
||||
/**
|
||||
* @brief File name used for expansion settings.
|
||||
*/
|
||||
#define EXPANSION_SETTINGS_OLD_PATH INT_PATH(".expansion.settings")
|
||||
#define EXPANSION_SETTINGS_PATH CFG_PATH("expansion.settings")
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <furi_hal.h>
|
||||
#include <stdint.h>
|
||||
#include <u8g2_glue.h>
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
|
||||
const CanvasFontParameters canvas_font_params[FontTotalNumber] = {
|
||||
[FontPrimary] = {.leading_default = 12, .leading_min = 11, .height = 8, .descender = 2},
|
||||
@@ -137,15 +137,15 @@ uint8_t canvas_current_font_width(const Canvas* canvas) {
|
||||
const CanvasFontParameters* canvas_get_font_params(const Canvas* canvas, Font font) {
|
||||
furi_assert(canvas);
|
||||
furi_assert(font < FontTotalNumber);
|
||||
if(xtreme_assets.font_params[font]) {
|
||||
return xtreme_assets.font_params[font];
|
||||
if(asset_packs.font_params[font]) {
|
||||
return asset_packs.font_params[font];
|
||||
}
|
||||
return &canvas_font_params[font];
|
||||
}
|
||||
|
||||
void canvas_clear(Canvas* canvas) {
|
||||
furi_assert(canvas);
|
||||
if(xtreme_settings.dark_mode) {
|
||||
if(momentum_settings.dark_mode) {
|
||||
u8g2_FillBuffer(&canvas->fb);
|
||||
} else {
|
||||
u8g2_ClearBuffer(&canvas->fb);
|
||||
@@ -154,7 +154,7 @@ void canvas_clear(Canvas* canvas) {
|
||||
|
||||
void canvas_set_color(Canvas* canvas, Color color) {
|
||||
furi_assert(canvas);
|
||||
if(xtreme_settings.dark_mode) {
|
||||
if(momentum_settings.dark_mode) {
|
||||
if(color == ColorBlack) {
|
||||
color = ColorWhite;
|
||||
} else if(color == ColorWhite) {
|
||||
@@ -176,8 +176,8 @@ void canvas_invert_color(Canvas* canvas) {
|
||||
void canvas_set_font(Canvas* canvas, Font font) {
|
||||
furi_assert(canvas);
|
||||
u8g2_SetFontMode(&canvas->fb, 1);
|
||||
if(xtreme_assets.fonts[font]) {
|
||||
u8g2_SetFont(&canvas->fb, xtreme_assets.fonts[font]);
|
||||
if(asset_packs.fonts[font]) {
|
||||
u8g2_SetFont(&canvas->fb, asset_packs.fonts[font]);
|
||||
return;
|
||||
}
|
||||
switch(font) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
#include "gui_i.h"
|
||||
#include <assets_icons.h>
|
||||
#include <storage/storage.h>
|
||||
@@ -97,7 +97,7 @@ static void gui_redraw_status_bar(Gui* gui, bool need_attention) {
|
||||
/* for support black theme - paint white area and
|
||||
* draw icon with transparent white color
|
||||
*/
|
||||
if(xtreme_settings.bar_background) {
|
||||
if(momentum_settings.bar_background) {
|
||||
canvas_set_color(gui->canvas, ColorWhite);
|
||||
canvas_draw_box(gui->canvas, 1, 1, 9, 7);
|
||||
canvas_draw_box(gui->canvas, 7, 3, 58, 6);
|
||||
@@ -130,7 +130,7 @@ static void gui_redraw_status_bar(Gui* gui, bool need_attention) {
|
||||
width + 2,
|
||||
GUI_STATUS_BAR_WORKAREA_HEIGHT + 2);
|
||||
// Hide battery background
|
||||
if(xtreme_settings.bar_borders) {
|
||||
if(momentum_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));
|
||||
@@ -139,7 +139,7 @@ static void gui_redraw_status_bar(Gui* gui, bool need_attention) {
|
||||
// ViewPort draw
|
||||
canvas_frame_set(
|
||||
gui->canvas,
|
||||
x - xtreme_settings.bar_borders,
|
||||
x - momentum_settings.bar_borders,
|
||||
GUI_STATUS_BAR_Y + 2,
|
||||
width,
|
||||
GUI_STATUS_BAR_WORKAREA_HEIGHT);
|
||||
@@ -156,7 +156,7 @@ static void gui_redraw_status_bar(Gui* gui, bool need_attention) {
|
||||
right_used + 4,
|
||||
GUI_STATUS_BAR_HEIGHT);
|
||||
// Disable battery border
|
||||
if(xtreme_settings.bar_borders) {
|
||||
if(momentum_settings.bar_borders) {
|
||||
canvas_set_color(gui->canvas, ColorBlack);
|
||||
canvas_draw_rframe(
|
||||
gui->canvas, 0, 0, canvas_width(gui->canvas), canvas_height(gui->canvas), 1);
|
||||
@@ -176,7 +176,7 @@ static void gui_redraw_status_bar(Gui* gui, bool need_attention) {
|
||||
}
|
||||
|
||||
// Left side
|
||||
if(xtreme_settings.status_icons) {
|
||||
if(momentum_settings.status_icons) {
|
||||
x = 2;
|
||||
ViewPortArray_it(it, gui->layers[GuiLayerStatusBarLeft]);
|
||||
while(!ViewPortArray_end_p(it) && (right_used + left_used) < GUI_STATUS_BAR_WIDTH) {
|
||||
@@ -191,7 +191,7 @@ static void gui_redraw_status_bar(Gui* gui, bool need_attention) {
|
||||
GUI_STATUS_BAR_Y + 1,
|
||||
width + 2,
|
||||
GUI_STATUS_BAR_WORKAREA_HEIGHT + 2);
|
||||
if(xtreme_settings.bar_borders) {
|
||||
if(momentum_settings.bar_borders) {
|
||||
canvas_set_color(gui->canvas, ColorWhite);
|
||||
canvas_draw_box(
|
||||
gui->canvas, 0, 0, canvas_width(gui->canvas), canvas_height(gui->canvas));
|
||||
@@ -217,7 +217,7 @@ static void gui_redraw_status_bar(Gui* gui, bool need_attention) {
|
||||
GUI_STATUS_BAR_Y + 1,
|
||||
width + 2,
|
||||
GUI_STATUS_BAR_WORKAREA_HEIGHT + 2);
|
||||
if(xtreme_settings.bar_borders) {
|
||||
if(momentum_settings.bar_borders) {
|
||||
canvas_set_color(gui->canvas, ColorWhite);
|
||||
canvas_draw_box(
|
||||
gui->canvas, 0, 0, canvas_width(gui->canvas), canvas_height(gui->canvas));
|
||||
@@ -234,7 +234,7 @@ static void gui_redraw_status_bar(Gui* gui, bool need_attention) {
|
||||
// Draw frame around icons on the left
|
||||
if(left_used) {
|
||||
canvas_frame_set(gui->canvas, 0, 0, left_used + 3, GUI_STATUS_BAR_HEIGHT);
|
||||
if(xtreme_settings.bar_borders) {
|
||||
if(momentum_settings.bar_borders) {
|
||||
canvas_draw_rframe(
|
||||
gui->canvas, 0, 0, canvas_width(gui->canvas), canvas_height(gui->canvas), 1);
|
||||
canvas_draw_line(
|
||||
@@ -291,7 +291,7 @@ static void gui_redraw(Gui* gui) {
|
||||
bool need_attention =
|
||||
(gui_view_port_find_enabled(gui->layers[GuiLayerWindow]) != 0 ||
|
||||
gui_view_port_find_enabled(gui->layers[GuiLayerFullscreen]) != 0);
|
||||
if(xtreme_settings.lockscreen_statusbar) {
|
||||
if(momentum_settings.lockscreen_statusbar) {
|
||||
gui_redraw_status_bar(gui, need_attention);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <core/log.h>
|
||||
#include "m-algo.h"
|
||||
#include <m-array.h>
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
|
||||
#define LIST_ITEMS 5u
|
||||
#define MAX_LEN_PX 110
|
||||
@@ -85,7 +85,7 @@ static int BrowserItem_t_cmp(const BrowserItem_t* a, const BrowserItem_t* b) {
|
||||
if(b->type == BrowserItemTypeBack) {
|
||||
return 1;
|
||||
}
|
||||
if(xtreme_settings.sort_dirs_first) {
|
||||
if(momentum_settings.sort_dirs_first) {
|
||||
if(a->type == BrowserItemTypeFolder && b->type != BrowserItemTypeFolder) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <dolphin/helpers/dolphin_state.h>
|
||||
#include <furi.h>
|
||||
#include <m-array.h>
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
#include <m-string.h>
|
||||
|
||||
struct Menu {
|
||||
@@ -90,7 +90,7 @@ static void menu_draw_callback(Canvas* canvas, void* _model) {
|
||||
MenuItem* item;
|
||||
size_t shift_position;
|
||||
FuriString* name = furi_string_alloc();
|
||||
switch(xtreme_settings.menu_style) {
|
||||
switch(momentum_settings.menu_style) {
|
||||
case MenuStyleList: {
|
||||
for(uint8_t i = 0; i < 3; i++) {
|
||||
canvas_set_font(canvas, i == 1 ? FontPrimary : FontSecondary);
|
||||
@@ -403,7 +403,7 @@ static void menu_draw_callback(Canvas* canvas, void* _model) {
|
||||
static bool menu_input_callback(InputEvent* event, void* context) {
|
||||
Menu* menu = context;
|
||||
bool consumed = true;
|
||||
if(xtreme_settings.menu_style == MenuStyleVertical &&
|
||||
if(momentum_settings.menu_style == MenuStyleVertical &&
|
||||
furi_hal_rtc_is_flag_set(FuriHalRtcFlagHandOrient)) {
|
||||
if(event->key == InputKeyLeft) {
|
||||
event->key = InputKeyRight;
|
||||
@@ -612,7 +612,7 @@ static void menu_process_up(Menu* menu) {
|
||||
size_t count = MenuItemArray_size(model->items);
|
||||
size_t vertical_offset = model->vertical_offset;
|
||||
|
||||
switch(xtreme_settings.menu_style) {
|
||||
switch(momentum_settings.menu_style) {
|
||||
case MenuStyleList:
|
||||
case MenuStyleTerminal:
|
||||
if(position > 0) {
|
||||
@@ -663,7 +663,7 @@ static void menu_process_down(Menu* menu) {
|
||||
size_t count = MenuItemArray_size(model->items);
|
||||
size_t vertical_offset = model->vertical_offset;
|
||||
|
||||
switch(xtreme_settings.menu_style) {
|
||||
switch(momentum_settings.menu_style) {
|
||||
case MenuStyleList:
|
||||
case MenuStyleTerminal:
|
||||
if(position < count - 1) {
|
||||
@@ -714,7 +714,7 @@ static void menu_process_left(Menu* menu) {
|
||||
size_t count = MenuItemArray_size(model->items);
|
||||
size_t vertical_offset = model->vertical_offset;
|
||||
|
||||
switch(xtreme_settings.menu_style) {
|
||||
switch(momentum_settings.menu_style) {
|
||||
case MenuStyleWii:
|
||||
if(position < 2) {
|
||||
if(count % 2) {
|
||||
@@ -777,7 +777,7 @@ static void menu_process_right(Menu* menu) {
|
||||
size_t count = MenuItemArray_size(model->items);
|
||||
size_t vertical_offset = model->vertical_offset;
|
||||
|
||||
switch(xtreme_settings.menu_style) {
|
||||
switch(momentum_settings.menu_style) {
|
||||
case MenuStyleWii:
|
||||
if(count % 2) {
|
||||
if(position == count - 1) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <applications.h>
|
||||
#include <storage/storage.h>
|
||||
#include <furi_hal.h>
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
|
||||
#include <dialogs/dialogs.h>
|
||||
#include <toolbox/path.h>
|
||||
@@ -206,8 +206,8 @@ bool loader_menu_load_fap_meta(
|
||||
|
||||
static void loader_make_menu_file(Storage* storage) {
|
||||
Stream* new = file_stream_alloc(storage);
|
||||
if(!storage_file_exists(storage, XTREME_MENU_PATH)) {
|
||||
if(file_stream_open(new, XTREME_MENU_PATH, FSAM_WRITE, FSOM_CREATE_ALWAYS)) {
|
||||
if(!storage_file_exists(storage, MAINMENU_APPS_PATH)) {
|
||||
if(file_stream_open(new, MAINMENU_APPS_PATH, FSAM_WRITE, FSOM_CREATE_ALWAYS)) {
|
||||
stream_write_format(new, "MenuAppList Version %u\n", 0);
|
||||
for(size_t i = 0; i < FLIPPER_APPS_COUNT; i++) {
|
||||
stream_write_format(new, "%s\n", FLIPPER_APPS[i].name);
|
||||
@@ -215,13 +215,14 @@ static void loader_make_menu_file(Storage* storage) {
|
||||
for(size_t i = 0; i < FLIPPER_EXTERNAL_APPS_COUNT - 1; i++) {
|
||||
stream_write_format(new, "%s\n", FLIPPER_EXTERNAL_APPS[i].name);
|
||||
}
|
||||
// Old additional external apps
|
||||
Stream* old = file_stream_alloc(storage);
|
||||
if(file_stream_open(old, XTREME_MENU_OLD_PATH, FSAM_READ, FSOM_OPEN_EXISTING)) {
|
||||
if(file_stream_open(old, CFG_PATH("xtreme_apps.txt"), FSAM_READ, FSOM_OPEN_EXISTING)) {
|
||||
stream_copy(old, new, stream_size(old));
|
||||
}
|
||||
file_stream_close(old);
|
||||
stream_free(old);
|
||||
storage_common_remove(storage, XTREME_MENU_OLD_PATH);
|
||||
storage_common_remove(storage, CFG_PATH("xtreme_apps.txt"));
|
||||
}
|
||||
file_stream_close(new);
|
||||
}
|
||||
@@ -247,10 +248,10 @@ static Loader* loader_alloc() {
|
||||
FuriString* line = furi_string_alloc();
|
||||
FuriString* name = furi_string_alloc();
|
||||
do {
|
||||
if(!file_stream_open(stream, XTREME_MENU_PATH, FSAM_READ_WRITE, FSOM_OPEN_EXISTING)) {
|
||||
if(!file_stream_open(stream, MAINMENU_APPS_PATH, FSAM_READ_WRITE, FSOM_OPEN_EXISTING)) {
|
||||
file_stream_close(stream);
|
||||
loader_make_menu_file(storage);
|
||||
if(!file_stream_open(stream, XTREME_MENU_PATH, FSAM_READ_WRITE, FSOM_OPEN_EXISTING))
|
||||
if(!file_stream_open(stream, MAINMENU_APPS_PATH, FSAM_READ_WRITE, FSOM_OPEN_EXISTING))
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -259,9 +260,9 @@ static Loader* loader_alloc() {
|
||||
sscanf(furi_string_get_cstr(line), "MenuAppList Version %lu", &version) != 1 ||
|
||||
version > 0) {
|
||||
file_stream_close(stream);
|
||||
storage_common_remove(storage, XTREME_MENU_PATH);
|
||||
storage_common_remove(storage, MAINMENU_APPS_PATH);
|
||||
loader_make_menu_file(storage);
|
||||
if(!file_stream_open(stream, XTREME_MENU_PATH, FSAM_READ_WRITE, FSOM_OPEN_EXISTING))
|
||||
if(!file_stream_open(stream, MAINMENU_APPS_PATH, FSAM_READ_WRITE, FSOM_OPEN_EXISTING))
|
||||
break;
|
||||
if(!stream_read_line(stream, line) ||
|
||||
sscanf(furi_string_get_cstr(line), "MenuAppList Version %lu", &version) != 1 ||
|
||||
|
||||
@@ -33,7 +33,6 @@ typedef struct {
|
||||
|
||||
#define NOTIFICATION_SETTINGS_VERSION 0x02
|
||||
#define NOTIFICATION_SETTINGS_MAGIC 0x16
|
||||
#define NOTIFICATION_SETTINGS_OLD_PATH INT_PATH(".notification.settings")
|
||||
#define NOTIFICATION_SETTINGS_PATH CFG_PATH("notification.settings")
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <furi.h>
|
||||
#include <furi_hal.h>
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
|
||||
#define POWER_OFF_TIMEOUT 90
|
||||
#define TAG "Power"
|
||||
@@ -16,7 +16,7 @@ void power_set_battery_icon_enabled(Power* power, bool is_enabled) {
|
||||
void power_draw_battery_callback(Canvas* canvas, void* context) {
|
||||
furi_assert(context);
|
||||
Power* power = context;
|
||||
BatteryIcon battery_icon = xtreme_settings.battery_icon;
|
||||
BatteryIcon battery_icon = momentum_settings.battery_icon;
|
||||
if(battery_icon == BatteryIconOff) return;
|
||||
|
||||
canvas_draw_icon(canvas, 0, 0, &I_Battery_25x8);
|
||||
@@ -367,7 +367,7 @@ Power* power_alloc() {
|
||||
|
||||
// Battery view port
|
||||
power->battery_view_port = power_battery_view_port_alloc(power);
|
||||
power_set_battery_icon_enabled(power, xtreme_settings.battery_icon != BatteryIconOff);
|
||||
power_set_battery_icon_enabled(power, momentum_settings.battery_icon != BatteryIconOff);
|
||||
power->show_low_bat_level_message = true;
|
||||
|
||||
//Auto shutdown timer
|
||||
@@ -486,7 +486,7 @@ static void power_check_battery_level_change(Power* power) {
|
||||
}
|
||||
|
||||
static void power_check_charge_cap(Power* power) {
|
||||
uint32_t cap = xtreme_settings.charge_cap;
|
||||
uint32_t cap = momentum_settings.charge_cap;
|
||||
if(power->info.charge >= cap && cap < 100) {
|
||||
if(!power->info.is_charge_capped) { // Suppress charging if charge reaches custom cap
|
||||
power->info.is_charge_capped = true;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#define POWER_SETTINGS_VER (1)
|
||||
|
||||
#define POWER_SETTINGS_OLD_PATH INT_PATH(".power.settings")
|
||||
#define POWER_SETTINGS_PATH CFG_PATH("power.settings")
|
||||
#define POWER_SETTINGS_MAGIC (0x21)
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <m-dict.h>
|
||||
#include <xtreme/xtreme.h>
|
||||
#include <momentum/momentum.h>
|
||||
|
||||
#include <bt/bt_service/bt.h>
|
||||
|
||||
@@ -386,7 +386,8 @@ static void rpc_session_thread_state_callback(FuriThreadState thread_state, void
|
||||
}
|
||||
|
||||
RpcSession* rpc_session_open(Rpc* rpc, RpcOwner owner) {
|
||||
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagLock) && !xtreme_settings.allow_locked_rpc_commands)
|
||||
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagLock) &&
|
||||
!momentum_settings.allow_locked_rpc_commands)
|
||||
return NULL;
|
||||
|
||||
furi_assert(rpc);
|
||||
|
||||
Reference in New Issue
Block a user