Firmware: bigger thread name storage. Notification app: better BacklightEnforce edge cases handling. (#3137)

This commit is contained in:
あく 2023-10-10 02:55:38 +09:00 committed by GitHub
parent fbded1e4ee
commit 65a56cdb4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 8 deletions

View File

@ -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:

View File

@ -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