Skip to content

Commit

Permalink
Firmware: bigger thread name storage. Notification app: better Backli…
Browse files Browse the repository at this point in the history
…ghtEnforce edge cases handling. (flipperdevices#3137)
  • Loading branch information
skotopes authored Oct 9, 2023
1 parent fbded1e commit 65a56cd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions applications/services/notification/notification_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion firmware/targets/f7/inc/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 65a56cd

Please sign in to comment.