mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 11:28:36 -07:00
[FL-3867] Code formatting update (#3765)
* clang-format: AllowShortEnumsOnASingleLine: false * clang-format: InsertNewlineAtEOF: true * clang-format: Standard: c++20 * clang-format: AlignConsecutiveBitFields * clang-format: AlignConsecutiveMacros * clang-format: RemoveParentheses: ReturnStatement * clang-format: RemoveSemicolon: true * Restored RemoveParentheses: Leave, retained general changes for it * formatting: fixed logging TAGs * Formatting update for dev Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -14,14 +14,14 @@
|
||||
|
||||
#define TAG "AnimationManager"
|
||||
|
||||
#define HARDCODED_ANIMATION_NAME "L1_Tv_128x47"
|
||||
#define NO_SD_ANIMATION_NAME "L1_NoSd_128x49"
|
||||
#define HARDCODED_ANIMATION_NAME "L1_Tv_128x47"
|
||||
#define NO_SD_ANIMATION_NAME "L1_NoSd_128x49"
|
||||
#define BAD_BATTERY_ANIMATION_NAME "L1_BadBattery_128x47"
|
||||
|
||||
#define NO_DB_ANIMATION_NAME "L0_NoDb_128x51"
|
||||
#define BAD_SD_ANIMATION_NAME "L0_SdBad_128x51"
|
||||
#define SD_OK_ANIMATION_NAME "L0_SdOk_128x51"
|
||||
#define URL_ANIMATION_NAME "L0_Url_128x51"
|
||||
#define NO_DB_ANIMATION_NAME "L0_NoDb_128x51"
|
||||
#define BAD_SD_ANIMATION_NAME "L0_SdBad_128x51"
|
||||
#define SD_OK_ANIMATION_NAME "L0_SdOk_128x51"
|
||||
#define URL_ANIMATION_NAME "L0_Url_128x51"
|
||||
#define NEW_MAIL_ANIMATION_NAME "L0_NewMail_128x51"
|
||||
|
||||
typedef enum {
|
||||
@@ -47,13 +47,13 @@ struct AnimationManager {
|
||||
int32_t freezed_animation_time_left;
|
||||
ViewStack* view_stack;
|
||||
|
||||
bool dummy_mode : 1;
|
||||
bool blocking_shown_url : 1;
|
||||
bool dummy_mode : 1;
|
||||
bool blocking_shown_url : 1;
|
||||
bool blocking_shown_sd_bad : 1;
|
||||
bool blocking_shown_no_db : 1;
|
||||
bool blocking_shown_sd_ok : 1;
|
||||
bool levelup_pending : 1;
|
||||
bool levelup_active : 1;
|
||||
bool blocking_shown_no_db : 1;
|
||||
bool blocking_shown_sd_ok : 1;
|
||||
bool levelup_pending : 1;
|
||||
bool levelup_active : 1;
|
||||
};
|
||||
|
||||
static StorageAnimation*
|
||||
|
||||
@@ -11,11 +11,12 @@
|
||||
#include <assets_dolphin_internal.h>
|
||||
#include <assets_dolphin_blocking.h>
|
||||
|
||||
#define ANIMATION_META_FILE "meta.txt"
|
||||
#define ANIMATION_DIR EXT_PATH("dolphin")
|
||||
#define ANIMATION_MANIFEST_FILE ANIMATION_DIR "/manifest.txt"
|
||||
#define TAG "AnimationStorage"
|
||||
|
||||
#define ANIMATION_META_FILE "meta.txt"
|
||||
#define ANIMATION_DIR EXT_PATH("dolphin")
|
||||
#define ANIMATION_MANIFEST_FILE ANIMATION_DIR "/manifest.txt"
|
||||
|
||||
static void animation_storage_free_bubbles(BubbleAnimation* animation);
|
||||
static void animation_storage_free_frames(BubbleAnimation* animation);
|
||||
static void animation_storage_free_animation(BubbleAnimation** storage_animation);
|
||||
|
||||
@@ -84,7 +84,7 @@ struct Desktop {
|
||||
DesktopClock clock;
|
||||
|
||||
bool in_transition : 1;
|
||||
bool locked : 1;
|
||||
bool locked : 1;
|
||||
|
||||
FuriSemaphore* animation_semaphore;
|
||||
};
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
#define DESKTOP_SETTINGS_VER (10)
|
||||
|
||||
#define DESKTOP_SETTINGS_PATH INT_PATH(DESKTOP_SETTINGS_FILE_NAME)
|
||||
#define DESKTOP_SETTINGS_PATH INT_PATH(DESKTOP_SETTINGS_FILE_NAME)
|
||||
#define DESKTOP_SETTINGS_MAGIC (0x17)
|
||||
#define PIN_MAX_LENGTH 12
|
||||
#define PIN_MAX_LENGTH 12
|
||||
|
||||
#define DESKTOP_SETTINGS_RUN_PIN_SETUP_ARG "run_pin_setup"
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
DESKTOP_SETTINGS_MAGIC, \
|
||||
DESKTOP_SETTINGS_VER)
|
||||
|
||||
#define MAX_PIN_SIZE 10
|
||||
#define MIN_PIN_SIZE 4
|
||||
#define MAX_PIN_SIZE 10
|
||||
#define MIN_PIN_SIZE 4
|
||||
#define MAX_APP_LENGTH 128
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <gui/icon_i.h>
|
||||
#include <core/dangerous_defines.h>
|
||||
|
||||
#define SLIDESHOW_MAGIC 0x72676468
|
||||
#define SLIDESHOW_MAGIC 0x72676468
|
||||
#define SLIDESHOW_MAX_SUPPORTED_VERSION 1
|
||||
|
||||
struct Slideshow {
|
||||
|
||||
@@ -7,4 +7,4 @@ ADD_SCENE(desktop, locked, Locked)
|
||||
ADD_SCENE(desktop, pin_input, PinInput)
|
||||
ADD_SCENE(desktop, pin_timeout, PinTimeout)
|
||||
ADD_SCENE(desktop, slideshow, Slideshow)
|
||||
ADD_SCENE(desktop, secure_enclave, SecureEnclave)
|
||||
ADD_SCENE(desktop, secure_enclave, SecureEnclave)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#define SCENE_LOCKED_FIRST_ENTER 0
|
||||
#define SCENE_LOCKED_FIRST_ENTER 0
|
||||
#define SCENE_LOCKED_REPEAT_ENTER 1
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "desktop_scene_i.h"
|
||||
|
||||
#define WRONG_PIN_HEADER_TIMEOUT 3000
|
||||
#define INPUT_PIN_VIEW_TIMEOUT 15000
|
||||
#define INPUT_PIN_VIEW_TIMEOUT 15000
|
||||
|
||||
static void desktop_scene_locked_callback(DesktopEvent event, void* context) {
|
||||
Desktop* desktop = (Desktop*)context;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "desktop_scene.h"
|
||||
|
||||
#define WRONG_PIN_HEADER_TIMEOUT 3000
|
||||
#define INPUT_PIN_VIEW_TIMEOUT 15000
|
||||
#define INPUT_PIN_VIEW_TIMEOUT 15000
|
||||
|
||||
typedef struct {
|
||||
FuriTimer* timer;
|
||||
|
||||
@@ -10,17 +10,17 @@
|
||||
#include "../desktop_i.h"
|
||||
#include "desktop_view_locked.h"
|
||||
|
||||
#define DOOR_MOVING_INTERVAL_MS (1000 / 16)
|
||||
#define LOCKED_HINT_TIMEOUT_MS (1000)
|
||||
#define DOOR_MOVING_INTERVAL_MS (1000 / 16)
|
||||
#define LOCKED_HINT_TIMEOUT_MS (1000)
|
||||
#define UNLOCKED_HINT_TIMEOUT_MS (2000)
|
||||
|
||||
#define DOOR_OFFSET_START (-55)
|
||||
#define DOOR_OFFSET_END (0)
|
||||
#define DOOR_OFFSET_END (0)
|
||||
|
||||
#define DOOR_L_FINAL_POS (0)
|
||||
#define DOOR_R_FINAL_POS (60)
|
||||
|
||||
#define UNLOCK_CNT (3)
|
||||
#define UNLOCK_CNT (3)
|
||||
#define UNLOCK_RST_TIMEOUT (600)
|
||||
|
||||
struct DesktopViewLocked {
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#define NO_ACTIVITY_TIMEOUT 15000
|
||||
|
||||
#define PIN_CELL_WIDTH 13
|
||||
#define DEFAULT_PIN_X 64
|
||||
#define DEFAULT_PIN_Y 32
|
||||
#define DEFAULT_PIN_X 64
|
||||
#define DEFAULT_PIN_Y 32
|
||||
|
||||
struct DesktopViewPinInput {
|
||||
View* view;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "../helpers/slideshow.h"
|
||||
|
||||
#define DESKTOP_SLIDESHOW_POWEROFF_SHORT 5000
|
||||
#define DESKTOP_SLIDESHOW_POWEROFF_LONG (60 * 60 * 1000)
|
||||
#define DESKTOP_SLIDESHOW_POWEROFF_LONG (60 * 60 * 1000)
|
||||
|
||||
struct DesktopSlideshowView {
|
||||
View* view;
|
||||
@@ -136,4 +136,4 @@ void desktop_view_slideshow_set_callback(
|
||||
furi_assert(callback);
|
||||
instance->callback = callback;
|
||||
instance->context = context;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user