Просмотр исходного кода

Port timer priority changes from fw repo

Willy-JL 2 лет назад
Родитель
Сommit
802f3a5b9c
1 измененных файлов с 2 добавлено и 3 удалено
  1. 2 3
      magspoof/mag.c

+ 2 - 3
magspoof/mag.c

@@ -235,14 +235,13 @@ void mag_text_input_callback(void* context) {
 
 void mag_show_loading_popup(void* context, bool show) {
     Mag* mag = context;
-    TaskHandle_t timer_task = xTaskGetHandle(configTIMER_SERVICE_TASK_NAME);
 
     if(show) {
         // Raise timer priority so that animations can play
-        vTaskPrioritySet(timer_task, configMAX_PRIORITIES - 1);
+        furi_timer_set_thread_priority(FuriTimerThreadPriorityElevated);
         view_dispatcher_switch_to_view(mag->view_dispatcher, MagViewLoading);
     } else {
         // Restore default timer priority
-        vTaskPrioritySet(timer_task, configTIMER_TASK_PRIORITY);
+        furi_timer_set_thread_priority(FuriTimerThreadPriorityNormal);
     }
 }