Notification: backlight always on lock. Gpio: backlight always on lock in uart brige app. (#1007)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user