mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-15 04:19:26 -07:00
Better way of doing favorite timeout
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "nfc_app_i.h"
|
||||
|
||||
#include <xtreme/xtreme.h>
|
||||
|
||||
#define NFC_EMULATION_TIME_MAX_MS (5 * 60 * 1000)
|
||||
|
||||
FuriTimer* timer_auto_exit;
|
||||
@@ -20,7 +22,11 @@ void nfc_scene_emulate_on_enter(void* context) {
|
||||
|
||||
timer_auto_exit =
|
||||
furi_timer_alloc(nfc_scene_emulate_timer_callback, FuriTimerTypeOnce, instance);
|
||||
furi_timer_start(timer_auto_exit, NFC_EMULATION_TIME_MAX_MS);
|
||||
furi_timer_start(
|
||||
timer_auto_exit,
|
||||
instance->fav_timeout ?
|
||||
xtreme_settings.favorite_timeout * furi_kernel_get_tick_frequency() :
|
||||
NFC_EMULATION_TIME_MAX_MS);
|
||||
}
|
||||
|
||||
bool nfc_scene_emulate_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
Reference in New Issue
Block a user