subghz things and remove rtos finally

This commit is contained in:
MX
2023-11-13 12:42:05 +04:00
parent bee1a6c18a
commit ef09dcf8f8
12 changed files with 168 additions and 286 deletions

View File

@@ -95,18 +95,17 @@ void archive_free(ArchiveApp* archive) {
}
void archive_show_loading_popup(ArchiveApp* context, bool show) {
TaskHandle_t timer_task = xTaskGetHandle(configTIMER_SERVICE_TASK_NAME);
ViewStack* view_stack = context->view_stack;
Loading* loading = context->loading;
if(show) {
// 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));
} else {
view_stack_remove_view(view_stack, loading_get_view(loading));
// Restore default timer priority
vTaskPrioritySet(timer_task, configTIMER_TASK_PRIORITY);
furi_timer_set_thread_priority(FuriTimerThreadPriorityNormal);
}
}

View File

@@ -111,7 +111,7 @@ void subghz_view_receiver_set_lock(SubGhzViewReceiver* subghz_receiver, bool loc
SubGhzViewReceiverModel * model,
{ model->bar_show = SubGhzViewReceiverBarShowLock; },
true);
furi_timer_start(subghz_receiver->timer, pdMS_TO_TICKS(1000));
furi_timer_start(subghz_receiver->timer, 1000);
} else {
with_view_model(
subghz_receiver->view,
@@ -453,7 +453,7 @@ bool subghz_view_receiver_input(InputEvent* event, void* context) {
{ model->bar_show = SubGhzViewReceiverBarShowToUnlockPress; },
true);
if(subghz_receiver->lock_count == 0) {
furi_timer_start(subghz_receiver->timer, pdMS_TO_TICKS(1000));
furi_timer_start(subghz_receiver->timer, 1000);
}
if(event->key == InputKeyBack && event->type == InputTypeShort) {
subghz_receiver->lock_count++;
@@ -467,7 +467,7 @@ bool subghz_view_receiver_input(InputEvent* event, void* context) {
{ model->bar_show = SubGhzViewReceiverBarShowUnlock; },
true);
//subghz_receiver->lock = false;
furi_timer_start(subghz_receiver->timer, pdMS_TO_TICKS(650));
furi_timer_start(subghz_receiver->timer, 650);
}
return true;