mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 14:38:36 -07:00
Revert "rename timers, stop before free"
This reverts commit 89e1620883.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
#define NFC_EMULATION_TIME_MAX_MS (5 * 60 * 1000)
|
||||
|
||||
FuriTimer* timer_auto_exit;
|
||||
FuriTimer* timer;
|
||||
|
||||
void nfc_scene_emulate_timer_callback(void* context) {
|
||||
NfcApp* instance = context;
|
||||
@@ -18,9 +18,8 @@ void nfc_scene_emulate_on_enter(void* context) {
|
||||
|
||||
nfc_protocol_support_on_enter(NfcProtocolSupportSceneEmulate, 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);
|
||||
timer = furi_timer_alloc(nfc_scene_emulate_timer_callback, FuriTimerTypeOnce, instance);
|
||||
furi_timer_start(timer, NFC_EMULATION_TIME_MAX_MS);
|
||||
}
|
||||
|
||||
bool nfc_scene_emulate_on_event(void* context, SceneManagerEvent event) {
|
||||
@@ -41,7 +40,6 @@ bool nfc_scene_emulate_on_event(void* context, SceneManagerEvent event) {
|
||||
}
|
||||
|
||||
void nfc_scene_emulate_on_exit(void* context) {
|
||||
furi_timer_stop(timer_auto_exit);
|
||||
furi_timer_free(timer_auto_exit);
|
||||
furi_timer_free(timer);
|
||||
nfc_protocol_support_on_exit(NfcProtocolSupportSceneEmulate, context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user