From 65a56cdb4acc0dc66d294fd2a8a2198b43487d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=82=E3=81=8F?= Date: Tue, 10 Oct 2023 02:55:38 +0900 Subject: [PATCH] Firmware: bigger thread name storage. Notification app: better BacklightEnforce edge cases handling. (#3137) --- .../services/notification/notification_app.c | 17 ++++++++++------- firmware/targets/f7/inc/FreeRTOSConfig.h | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/applications/services/notification/notification_app.c b/applications/services/notification/notification_app.c index 6fa48e7f..5769ced9 100644 --- a/applications/services/notification/notification_app.c +++ b/applications/services/notification/notification_app.c @@ -228,7 +228,7 @@ static void notification_process_notification_message( } break; case NotificationMessageTypeLedDisplayBacklightEnforceOn: - furi_assert(app->display_led_lock < UINT8_MAX); + furi_check(app->display_led_lock < UINT8_MAX); app->display_led_lock++; if(app->display_led_lock == 1) { notification_apply_internal_led_layer( @@ -237,12 +237,15 @@ static void notification_process_notification_message( } break; case NotificationMessageTypeLedDisplayBacklightEnforceAuto: - furi_assert(app->display_led_lock > 0); - app->display_led_lock--; - if(app->display_led_lock == 0) { - notification_apply_internal_led_layer( - &app->display, - notification_message->data.led.value * display_brightness_setting); + if(app->display_led_lock > 0) { + app->display_led_lock--; + if(app->display_led_lock == 0) { + notification_apply_internal_led_layer( + &app->display, + notification_message->data.led.value * display_brightness_setting); + } + } else { + FURI_LOG_E(TAG, "Incorrect BacklightEnforce use"); } break; case NotificationMessageTypeLedRed: diff --git a/firmware/targets/f7/inc/FreeRTOSConfig.h b/firmware/targets/f7/inc/FreeRTOSConfig.h index 9486f501..024d43a6 100644 --- a/firmware/targets/f7/inc/FreeRTOSConfig.h +++ b/firmware/targets/f7/inc/FreeRTOSConfig.h @@ -26,7 +26,7 @@ extern uint32_t SystemCoreClock; /* Heap size determined automatically by linker */ // #define configTOTAL_HEAP_SIZE ((size_t)0) -#define configMAX_TASK_NAME_LEN (16) +#define configMAX_TASK_NAME_LEN (32) #define configGENERATE_RUN_TIME_STATS 0 #define configUSE_TRACE_FACILITY 1 #define configUSE_16_BIT_TICKS 0