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