mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 09:48:35 -07:00
Fix timer priority api in apps
This commit is contained in:
4
applications/external/brainfuck/brainfuck.c
vendored
4
applications/external/brainfuck/brainfuck.c
vendored
@@ -121,11 +121,11 @@ void brainfuck_show_loading_popup(void* context, bool show) {
|
|||||||
|
|
||||||
if(show) {
|
if(show) {
|
||||||
// Raise timer priority so that animations can play
|
// 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(brainfuck->view_dispatcher, brainfuckViewLoading);
|
view_dispatcher_switch_to_view(brainfuck->view_dispatcher, brainfuckViewLoading);
|
||||||
} else {
|
} else {
|
||||||
// Restore default timer priority
|
// Restore default timer priority
|
||||||
vTaskPrioritySet(timer_task, configTIMER_TASK_PRIORITY);
|
furi_timer_set_thread_priority(FuriTimerThreadPriorityNormal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,17 +2,16 @@
|
|||||||
#include "../helpers/evil_portal_storage.h"
|
#include "../helpers/evil_portal_storage.h"
|
||||||
|
|
||||||
void evil_portal_show_loading_popup(Evil_PortalApp* app, bool show) {
|
void evil_portal_show_loading_popup(Evil_PortalApp* app, bool show) {
|
||||||
TaskHandle_t timer_task = xTaskGetHandle(configTIMER_SERVICE_TASK_NAME);
|
|
||||||
ViewStack* view_stack = app->view_stack;
|
ViewStack* view_stack = app->view_stack;
|
||||||
Loading* loading = app->loading;
|
Loading* loading = app->loading;
|
||||||
if(show) {
|
if(show) {
|
||||||
// Raise timer priority so that animations can play
|
// Raise timer priority so that animations can play
|
||||||
vTaskPrioritySet(timer_task, configMAX_PRIORITIES - 1);
|
furi_timer_set_thread_priority(FuriTimerThreadPriorityElevated);
|
||||||
view_stack_add_view(view_stack, loading_get_view(loading));
|
view_stack_add_view(view_stack, loading_get_view(loading));
|
||||||
} else {
|
} else {
|
||||||
view_stack_remove_view(view_stack, loading_get_view(loading));
|
view_stack_remove_view(view_stack, loading_get_view(loading));
|
||||||
// Restore default timer priority
|
// Restore default timer priority
|
||||||
vTaskPrioritySet(timer_task, configTIMER_TASK_PRIORITY);
|
furi_timer_set_thread_priority(FuriTimerThreadPriorityNormal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
5
applications/external/magspoof/mag.c
vendored
5
applications/external/magspoof/mag.c
vendored
@@ -235,14 +235,13 @@ void mag_text_input_callback(void* context) {
|
|||||||
|
|
||||||
void mag_show_loading_popup(void* context, bool show) {
|
void mag_show_loading_popup(void* context, bool show) {
|
||||||
Mag* mag = context;
|
Mag* mag = context;
|
||||||
TaskHandle_t timer_task = xTaskGetHandle(configTIMER_SERVICE_TASK_NAME);
|
|
||||||
|
|
||||||
if(show) {
|
if(show) {
|
||||||
// Raise timer priority so that animations can play
|
// 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);
|
view_dispatcher_switch_to_view(mag->view_dispatcher, MagViewLoading);
|
||||||
} else {
|
} else {
|
||||||
// Restore default timer priority
|
// Restore default timer priority
|
||||||
vTaskPrioritySet(timer_task, configTIMER_TASK_PRIORITY);
|
furi_timer_set_thread_priority(FuriTimerThreadPriorityNormal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,15 +22,13 @@ static void mass_storage_app_tick_event_callback(void* context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mass_storage_app_show_loading_popup(MassStorageApp* app, bool show) {
|
void mass_storage_app_show_loading_popup(MassStorageApp* app, bool show) {
|
||||||
TaskHandle_t timer_task = xTaskGetHandle(configTIMER_SERVICE_TASK_NAME);
|
|
||||||
|
|
||||||
if(show) {
|
if(show) {
|
||||||
// Raise timer priority so that animations can play
|
// 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(app->view_dispatcher, MassStorageAppViewLoading);
|
view_dispatcher_switch_to_view(app->view_dispatcher, MassStorageAppViewLoading);
|
||||||
} else {
|
} else {
|
||||||
// Restore default timer priority
|
// Restore default timer priority
|
||||||
vTaskPrioritySet(timer_task, configTIMER_TASK_PRIORITY);
|
furi_timer_set_thread_priority(FuriTimerThreadPriorityNormal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,15 +21,14 @@ void mifare_nested_tick_event_callback(void* context) {
|
|||||||
|
|
||||||
void mifare_nested_show_loading_popup(void* context, bool show) {
|
void mifare_nested_show_loading_popup(void* context, bool show) {
|
||||||
MifareNested* mifare_nested = context;
|
MifareNested* mifare_nested = context;
|
||||||
TaskHandle_t timer_task = xTaskGetHandle(configTIMER_SERVICE_TASK_NAME);
|
|
||||||
|
|
||||||
if(show) {
|
if(show) {
|
||||||
// Raise timer priority so that animations can play
|
// 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(mifare_nested->view_dispatcher, MifareNestedViewLoading);
|
view_dispatcher_switch_to_view(mifare_nested->view_dispatcher, MifareNestedViewLoading);
|
||||||
} else {
|
} else {
|
||||||
// Restore default timer priority
|
// Restore default timer priority
|
||||||
vTaskPrioritySet(timer_task, configTIMER_TASK_PRIORITY);
|
furi_timer_set_thread_priority(FuriTimerThreadPriorityNormal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
5
applications/external/nfc_magic/nfc_magic.c
vendored
5
applications/external/nfc_magic/nfc_magic.c
vendored
@@ -20,15 +20,14 @@ void nfc_magic_tick_event_callback(void* context) {
|
|||||||
|
|
||||||
void nfc_magic_show_loading_popup(void* context, bool show) {
|
void nfc_magic_show_loading_popup(void* context, bool show) {
|
||||||
NfcMagic* nfc_magic = context;
|
NfcMagic* nfc_magic = context;
|
||||||
TaskHandle_t timer_task = xTaskGetHandle(configTIMER_SERVICE_TASK_NAME);
|
|
||||||
|
|
||||||
if(show) {
|
if(show) {
|
||||||
// Raise timer priority so that animations can play
|
// 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(nfc_magic->view_dispatcher, NfcMagicViewLoading);
|
view_dispatcher_switch_to_view(nfc_magic->view_dispatcher, NfcMagicViewLoading);
|
||||||
} else {
|
} else {
|
||||||
// Restore default timer priority
|
// Restore default timer priority
|
||||||
vTaskPrioritySet(timer_task, configTIMER_TASK_PRIORITY);
|
furi_timer_set_thread_priority(FuriTimerThreadPriorityNormal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
5
applications/external/picopass/picopass.c
vendored
5
applications/external/picopass/picopass.c
vendored
@@ -197,15 +197,14 @@ void picopass_blink_stop(Picopass* picopass) {
|
|||||||
|
|
||||||
void picopass_show_loading_popup(void* context, bool show) {
|
void picopass_show_loading_popup(void* context, bool show) {
|
||||||
Picopass* picopass = context;
|
Picopass* picopass = context;
|
||||||
TaskHandle_t timer_task = xTaskGetHandle(configTIMER_SERVICE_TASK_NAME);
|
|
||||||
|
|
||||||
if(show) {
|
if(show) {
|
||||||
// Raise timer priority so that animations can play
|
// 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(picopass->view_dispatcher, PicopassViewLoading);
|
view_dispatcher_switch_to_view(picopass->view_dispatcher, PicopassViewLoading);
|
||||||
} else {
|
} else {
|
||||||
// Restore default timer priority
|
// Restore default timer priority
|
||||||
vTaskPrioritySet(timer_task, configTIMER_TASK_PRIORITY);
|
furi_timer_set_thread_priority(FuriTimerThreadPriorityNormal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -366,9 +366,7 @@ int32_t tetris_game_app() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Not doing this eventually causes issues with TimerSvc due to not sleeping/yielding enough in this task
|
// Not doing this eventually causes issues with TimerSvc due to not sleeping/yielding enough in this task
|
||||||
TaskHandle_t timer_task = xTaskGetHandle(configTIMER_SERVICE_TASK_NAME);
|
furi_timer_set_thread_priority(FuriTimerThreadPriorityElevated);
|
||||||
|
|
||||||
vTaskPrioritySet(timer_task, configMAX_PRIORITIES - 1);
|
|
||||||
|
|
||||||
ViewPort* view_port = view_port_alloc();
|
ViewPort* view_port = view_port_alloc();
|
||||||
view_port_set_orientation(view_port, ViewPortOrientationVertical);
|
view_port_set_orientation(view_port, ViewPortOrientationVertical);
|
||||||
@@ -472,9 +470,9 @@ int32_t tetris_game_app() {
|
|||||||
view_port_free(view_port);
|
view_port_free(view_port);
|
||||||
furi_message_queue_free(event_queue);
|
furi_message_queue_free(event_queue);
|
||||||
furi_mutex_free(tetris_state->mutex);
|
furi_mutex_free(tetris_state->mutex);
|
||||||
vTaskPrioritySet(timer_task, configTIMER_TASK_PRIORITY);
|
furi_timer_set_thread_priority(FuriTimerThreadPriorityNormal);
|
||||||
free(newPiece);
|
free(newPiece);
|
||||||
free(tetris_state);
|
free(tetris_state);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user