mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
to bool
This commit is contained in:
@@ -487,11 +487,9 @@ static void notification_process_notification_message(
|
||||
}
|
||||
break;
|
||||
case NotificationMessageTypeLedDisplayBacklightEnforceOn:
|
||||
furi_check(app->display_led_lock < UINT8_MAX);
|
||||
|
||||
// --- NIGHT SHIFT ---
|
||||
if(app->display_led_lock < 1) {
|
||||
app->display_led_lock = 1;
|
||||
if(!app->display_led_lock) {
|
||||
app->display_led_lock = true;
|
||||
notification_apply_internal_led_layer(
|
||||
&app->display,
|
||||
notification_message->data.led.value * display_brightness_setting *
|
||||
@@ -499,8 +497,8 @@ static void notification_process_notification_message(
|
||||
}
|
||||
break;
|
||||
case NotificationMessageTypeLedDisplayBacklightEnforceAuto:
|
||||
if(app->display_led_lock > 0) {
|
||||
app->display_led_lock = 0;
|
||||
if(app->display_led_lock) {
|
||||
app->display_led_lock = false;
|
||||
notification_apply_internal_led_layer(
|
||||
&app->display,
|
||||
notification_message->data.led.value * display_brightness_setting *
|
||||
|
||||
@@ -77,7 +77,7 @@ struct NotificationApp {
|
||||
|
||||
NotificationLedLayer display;
|
||||
NotificationLedLayer led[NOTIFICATION_LED_COUNT];
|
||||
uint8_t display_led_lock;
|
||||
bool display_led_lock;
|
||||
|
||||
NotificationSettings settings;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user