Notification: backlight always on lock. Gpio: backlight always on lock in uart brige app. (#1007)

This commit is contained in:
あく
2022-02-24 03:17:40 +03:00
committed by GitHub
parent 3c77ae2eb8
commit 92734f1bb3
6 changed files with 65 additions and 3 deletions

View File

@@ -163,6 +163,7 @@ void notification_process_notification_message(
notification_message = (*message->sequence)[notification_message_index];
bool led_active = false;
uint8_t display_led_lock = 0;
uint8_t led_values[NOTIFICATION_LED_COUNT] = {0x00, 0x00, 0x00};
bool reset_notifications = true;
float speaker_volume_setting = app->settings.speaker_volume;
@@ -189,6 +190,24 @@ void notification_process_notification_message(
}
reset_mask |= reset_display_mask;
break;
case NotificationMessageTypeLedDisplayLock:
furi_assert(display_led_lock < UINT8_MAX);
display_led_lock++;
if(display_led_lock == 1) {
notification_apply_internal_led_layer(
&app->display,
notification_message->data.led.value * display_brightness_setting);
}
break;
case NotificationMessageTypeLedDisplayUnlock:
furi_assert(display_led_lock > 0);
display_led_lock--;
if(display_led_lock == 0) {
notification_apply_internal_led_layer(
&app->display,
notification_message->data.led.value * display_brightness_setting);
}
break;
case NotificationMessageTypeLedRed:
// store and send on delay or after seq
led_active = true;