Storage: lfs config fingerprinting. RTC: fix data collision in lock register, refactor and cleanup. (#928)
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#include "portmacro.h"
|
||||
#include "storage/filesystem-api-defines.h"
|
||||
#include "storage/storage.h"
|
||||
#include <furi-hal-lock.h>
|
||||
#include <stdint.h>
|
||||
#include <power/power_service/power.h>
|
||||
#include "helpers/desktop_animation.h"
|
||||
@@ -155,14 +154,14 @@ int32_t desktop_srv(void* p) {
|
||||
|
||||
bool loaded = LOAD_DESKTOP_SETTINGS(&desktop->settings);
|
||||
if(!loaded) {
|
||||
furi_hal_lock_set(false);
|
||||
furi_hal_rtc_reset_flag(FuriHalRtcFlagLock);
|
||||
memset(&desktop->settings, 0, sizeof(desktop->settings));
|
||||
SAVE_DESKTOP_SETTINGS(&desktop->settings);
|
||||
}
|
||||
|
||||
scene_manager_next_scene(desktop->scene_manager, DesktopSceneMain);
|
||||
|
||||
if(furi_hal_lock_get()) {
|
||||
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagLock)) {
|
||||
furi_hal_usb_disable();
|
||||
scene_manager_set_scene_state(
|
||||
desktop->scene_manager, DesktopSceneLocked, DesktopLockedWithPin);
|
||||
|
@@ -82,7 +82,7 @@ void desktop_start_new_idle_animation(DesktopAnimation* animation) {
|
||||
DolphinStats stats = dolphin_stats(dolphin);
|
||||
furi_record_close("dolphin");
|
||||
|
||||
furi_assert((stats.level >= 1) && (stats.level <= 3));
|
||||
furi_check((stats.level >= 1) && (stats.level <= 3));
|
||||
|
||||
AnimationList_t animation_list;
|
||||
AnimationList_init(animation_list);
|
||||
|
@@ -2,7 +2,6 @@
|
||||
#include "../views/desktop_lock_menu.h"
|
||||
#include <toolbox/saved_struct.h>
|
||||
#include <stdbool.h>
|
||||
#include <furi-hal-lock.h>
|
||||
|
||||
void desktop_scene_lock_menu_callback(DesktopLockMenuEvent event, void* context) {
|
||||
Desktop* desktop = (Desktop*)context;
|
||||
@@ -33,7 +32,7 @@ bool desktop_scene_lock_menu_on_event(void* context, SceneManagerEvent event) {
|
||||
break;
|
||||
case DesktopLockMenuEventPinLock:
|
||||
if(desktop->settings.pincode.length > 0) {
|
||||
furi_hal_lock_set(true);
|
||||
furi_hal_rtc_set_flag(FuriHalRtcFlagLock);
|
||||
furi_hal_usb_disable();
|
||||
scene_manager_set_scene_state(
|
||||
desktop->scene_manager, DesktopSceneLocked, DesktopLockedWithPin);
|
||||
|
@@ -2,7 +2,6 @@
|
||||
#include "../views/desktop_locked.h"
|
||||
#include "desktop/helpers/desktop_animation.h"
|
||||
#include "desktop/views/desktop_main.h"
|
||||
#include <furi-hal-lock.h>
|
||||
|
||||
void desktop_scene_locked_callback(DesktopLockedEvent event, void* context) {
|
||||
Desktop* desktop = (Desktop*)context;
|
||||
@@ -56,7 +55,7 @@ static bool desktop_scene_locked_check_pin(Desktop* desktop, DesktopMainEvent ev
|
||||
if(match) {
|
||||
desktop->pincode_buffer.length = 0;
|
||||
furi_hal_usb_enable();
|
||||
furi_hal_lock_set(false);
|
||||
furi_hal_rtc_reset_flag(FuriHalRtcFlagLock);
|
||||
desktop_main_unlocked(desktop->main_view);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user