[FL-1279] Remove unnecessary menu_event timer #461

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
its your bedtime 2021-05-18 12:40:22 +03:00 committed by GitHub
parent 5000424c42
commit 1ddd4acd80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,6 @@
struct MenuEvent {
osMessageQueueId_t mqueue;
osTimerId_t timeout_timer;
};
void MenuEventimeout_callback(void* arg) {
@ -21,14 +20,8 @@ void MenuEventimeout_callback(void* arg) {
MenuEvent* menu_event_alloc() {
MenuEvent* menu_event = furi_alloc(sizeof(MenuEvent));
menu_event->mqueue = osMessageQueueNew(MENU_MESSAGE_MQUEUE_SIZE, sizeof(MenuMessage), NULL);
furi_check(menu_event->mqueue);
menu_event->timeout_timer =
osTimerNew(MenuEventimeout_callback, osTimerOnce, menu_event, NULL);
furi_check(menu_event->timeout_timer);
return menu_event;
}
@ -40,7 +33,6 @@ void menu_event_free(MenuEvent* menu_event) {
void menu_event_activity_notify(MenuEvent* menu_event) {
furi_assert(menu_event);
osTimerStart(menu_event->timeout_timer, 60000U); // 1m timeout, return to main
}
MenuMessage menu_event_next(MenuEvent* menu_event) {
@ -74,4 +66,4 @@ void menu_event_input_callback(InputEvent* input_event, void* context) {
}
osMessageQueuePut(menu_event->mqueue, &message, 0, osWaitForever);
}
}