mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-29 21:52:03 -07:00
Fix resetting PIN code with key combo
This commit is contained in:
@@ -309,6 +309,14 @@ int32_t desktop_srv(void* p) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagResetPin)) {
|
||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||
storage_common_remove(storage, DESKTOP_SETTINGS_PATH);
|
||||
storage_common_remove(storage, DESKTOP_SETTINGS_OLD_PATH);
|
||||
furi_record_close(RECORD_STORAGE);
|
||||
furi_hal_rtc_reset_flag(FuriHalRtcFlagResetPin);
|
||||
}
|
||||
|
||||
Desktop* desktop = desktop_alloc();
|
||||
|
||||
bool loaded = DESKTOP_SETTINGS_LOAD(&desktop->settings);
|
||||
|
||||
@@ -56,6 +56,7 @@ void flipper_boot_recovery_exec() {
|
||||
}
|
||||
|
||||
if(!counter) {
|
||||
furi_hal_rtc_set_flag(FuriHalRtcFlagResetPin);
|
||||
furi_hal_rtc_set_flag(FuriHalRtcFlagFactoryReset);
|
||||
furi_hal_rtc_set_pin_fails(0);
|
||||
furi_hal_rtc_reset_flag(FuriHalRtcFlagLock);
|
||||
|
||||
@@ -30,6 +30,7 @@ typedef enum {
|
||||
FuriHalRtcFlagLock = (1 << 2),
|
||||
FuriHalRtcFlagC2Update = (1 << 3),
|
||||
FuriHalRtcFlagHandOrient = (1 << 4),
|
||||
FuriHalRtcFlagResetPin = (1 << 5),
|
||||
} FuriHalRtcFlag;
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user