mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 09:38:35 -07:00
Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into mntm-dev
This commit is contained in:
@@ -270,7 +270,7 @@ void desktop_set_stealth_mode_state(Desktop* desktop, bool enabled) {
|
||||
desktop->in_transition = false;
|
||||
}
|
||||
|
||||
Desktop* desktop_alloc() {
|
||||
Desktop* desktop_alloc(void) {
|
||||
Desktop* desktop = malloc(sizeof(Desktop));
|
||||
|
||||
desktop->animation_manager = animation_manager_alloc();
|
||||
|
||||
@@ -86,7 +86,7 @@ struct Desktop {
|
||||
FuriPubSubSubscription* ascii_events_subscription;
|
||||
};
|
||||
|
||||
Desktop* desktop_alloc();
|
||||
Desktop* desktop_alloc(void);
|
||||
|
||||
void desktop_free(Desktop* desktop);
|
||||
void desktop_lock(Desktop* desktop, bool pin_lock);
|
||||
|
||||
@@ -28,13 +28,13 @@ static const NotificationSequence sequence_pin_fail = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
void desktop_pin_lock_error_notify() {
|
||||
void desktop_pin_lock_error_notify(void) {
|
||||
NotificationApp* notification = furi_record_open(RECORD_NOTIFICATION);
|
||||
notification_message(notification, &sequence_pin_fail);
|
||||
furi_record_close(RECORD_NOTIFICATION);
|
||||
}
|
||||
|
||||
uint32_t desktop_pin_lock_get_fail_timeout() {
|
||||
uint32_t desktop_pin_lock_get_fail_timeout(void) {
|
||||
uint32_t pin_fails = furi_hal_rtc_get_pin_fails();
|
||||
if(pin_fails < 3) {
|
||||
return 0;
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
#include "../desktop.h"
|
||||
#include <desktop/desktop_settings.h>
|
||||
|
||||
void desktop_pin_lock_error_notify();
|
||||
void desktop_pin_lock_error_notify(void);
|
||||
|
||||
uint32_t desktop_pin_lock_get_fail_timeout();
|
||||
uint32_t desktop_pin_lock_get_fail_timeout(void);
|
||||
|
||||
bool desktop_pin_compare(const PinCode* pin_code1, const PinCode* pin_code2);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ _Static_assert(sizeof(SlideshowFrameHeader) == 2, "Incorrect SlideshowFrameHeade
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
Slideshow* slideshow_alloc() {
|
||||
Slideshow* slideshow_alloc(void) {
|
||||
Slideshow* ret = malloc(sizeof(Slideshow));
|
||||
ret->loaded = false;
|
||||
return ret;
|
||||
|
||||
@@ -9,7 +9,7 @@ typedef struct {
|
||||
bool loaded;
|
||||
} Slideshow;
|
||||
|
||||
Slideshow* slideshow_alloc();
|
||||
Slideshow* slideshow_alloc(void);
|
||||
|
||||
void slideshow_free(Slideshow* slideshow);
|
||||
bool slideshow_load(Slideshow* slideshow, const char* fspath);
|
||||
|
||||
@@ -346,7 +346,7 @@ bool desktop_lock_menu_input_callback(InputEvent* event, void* context) {
|
||||
return consumed;
|
||||
}
|
||||
|
||||
DesktopLockMenuView* desktop_lock_menu_alloc() {
|
||||
DesktopLockMenuView* desktop_lock_menu_alloc(void) {
|
||||
DesktopLockMenuView* lock_menu = malloc(sizeof(DesktopLockMenuView));
|
||||
lock_menu->bt = furi_record_open(RECORD_BT);
|
||||
lock_menu->notification = furi_record_open(RECORD_NOTIFICATION);
|
||||
|
||||
@@ -43,5 +43,5 @@ View* desktop_lock_menu_get_view(DesktopLockMenuView* lock_menu);
|
||||
void desktop_lock_menu_set_pin_state(DesktopLockMenuView* lock_menu, bool pin_is_set);
|
||||
void desktop_lock_menu_set_stealth_mode_state(DesktopLockMenuView* lock_menu, bool stealth_mode);
|
||||
void desktop_lock_menu_set_idx(DesktopLockMenuView* lock_menu, uint8_t idx);
|
||||
DesktopLockMenuView* desktop_lock_menu_alloc();
|
||||
DesktopLockMenuView* desktop_lock_menu_alloc(void);
|
||||
void desktop_lock_menu_free(DesktopLockMenuView* lock_menu);
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
#define LOCKED_HINT_TIMEOUT_MS (3000)
|
||||
#define UNLOCKED_HINT_TIMEOUT_MS (2000)
|
||||
|
||||
#define COVER_OFFSET_START -64
|
||||
#define COVER_OFFSET_END 0
|
||||
#define COVER_OFFSET_START (-64)
|
||||
#define COVER_OFFSET_END (0)
|
||||
|
||||
#define UNLOCK_CNT 3
|
||||
#define UNLOCK_RST_TIMEOUT 600
|
||||
#define UNLOCK_CNT (3)
|
||||
#define UNLOCK_RST_TIMEOUT (600)
|
||||
|
||||
struct DesktopViewLocked {
|
||||
View* view;
|
||||
@@ -64,7 +64,7 @@ static void locked_view_timer_callback(void* context) {
|
||||
|
||||
void desktop_view_locked_draw_lockscreen(Canvas* canvas, void* m) {
|
||||
DesktopViewLockedModel* model = m;
|
||||
int y = model->cover_offset;
|
||||
int32_t y = model->cover_offset;
|
||||
char time_str[9];
|
||||
char second_str[5];
|
||||
char date_str[14];
|
||||
@@ -263,7 +263,7 @@ static bool desktop_view_locked_input(InputEvent* event, void* context) {
|
||||
return true;
|
||||
}
|
||||
|
||||
DesktopViewLocked* desktop_view_locked_alloc() {
|
||||
DesktopViewLocked* desktop_view_locked_alloc(void) {
|
||||
DesktopViewLocked* locked_view = malloc(sizeof(DesktopViewLocked));
|
||||
locked_view->view = view_alloc();
|
||||
locked_view->timer =
|
||||
|
||||
@@ -14,7 +14,7 @@ void desktop_view_locked_set_callback(
|
||||
void* context);
|
||||
void desktop_view_locked_update(DesktopViewLocked* locked_view);
|
||||
View* desktop_view_locked_get_view(DesktopViewLocked* locked_view);
|
||||
DesktopViewLocked* desktop_view_locked_alloc();
|
||||
DesktopViewLocked* desktop_view_locked_alloc(void);
|
||||
void desktop_view_locked_free(DesktopViewLocked* locked_view);
|
||||
void desktop_view_locked_lock(DesktopViewLocked* locked_view, bool pin_locked);
|
||||
void desktop_view_locked_unlock(DesktopViewLocked* locked_view);
|
||||
|
||||
@@ -58,7 +58,7 @@ bool desktop_main_input_callback(InputEvent* event, void* context) {
|
||||
return true;
|
||||
}
|
||||
|
||||
DesktopMainView* desktop_main_alloc() {
|
||||
DesktopMainView* desktop_main_alloc(void) {
|
||||
DesktopMainView* main_view = malloc(sizeof(DesktopMainView));
|
||||
|
||||
main_view->view = view_alloc();
|
||||
|
||||
@@ -13,5 +13,5 @@ void desktop_main_set_callback(
|
||||
void* context);
|
||||
|
||||
View* desktop_main_get_view(DesktopMainView* main_view);
|
||||
DesktopMainView* desktop_main_alloc();
|
||||
DesktopMainView* desktop_main_alloc(void);
|
||||
void desktop_main_free(DesktopMainView* main_view);
|
||||
|
||||
@@ -158,7 +158,7 @@ static void desktop_view_slideshow_exit(void* context) {
|
||||
view_commit_model(instance->view, false);
|
||||
}
|
||||
|
||||
DesktopSlideshowView* desktop_view_slideshow_alloc() {
|
||||
DesktopSlideshowView* desktop_view_slideshow_alloc(void) {
|
||||
DesktopSlideshowView* instance = malloc(sizeof(DesktopSlideshowView));
|
||||
instance->view = view_alloc();
|
||||
view_allocate_model(instance->view, ViewModelTypeLocking, sizeof(DesktopSlideshowViewModel));
|
||||
|
||||
@@ -10,7 +10,7 @@ typedef struct DesktopSlideshowView DesktopSlideshowView;
|
||||
|
||||
typedef void (*DesktopSlideshowViewCallback)(DesktopEvent event, void* context);
|
||||
|
||||
DesktopSlideshowView* desktop_view_slideshow_alloc();
|
||||
DesktopSlideshowView* desktop_view_slideshow_alloc(void);
|
||||
|
||||
void desktop_view_slideshow_free(DesktopSlideshowView* main_view);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user