1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 04:34:43 +04:00

Merge pull request #900 from Dmitry422/dev

display backlight option "always on" and rgb bug removed
This commit is contained in:
MMX
2025-05-20 03:03:45 +03:00
committed by GitHub
3 changed files with 14 additions and 5 deletions

View File

@@ -231,7 +231,7 @@ static void rainbow_timer_callback(void* context) {
break;
}
rgb_backlight_update(app->settings.led_brightness * app->current_night_shift);
rgb_backlight_update(app->settings.display_brightness * app->current_night_shift);
}
}
@@ -377,7 +377,10 @@ static void notification_reset_notification_layer(
app->settings.display_brightness * 0xFF * app->current_night_shift * 1.0f);
// --- NIGHT SHIFT END---
}
furi_timer_start(app->display_timer, notification_settings_display_off_delay_ticks(app));
if(app->settings.display_off_delay_ms > 0) {
furi_timer_start(
app->display_timer, notification_settings_display_off_delay_ticks(app));
}
}
}

View File

@@ -84,8 +84,9 @@ const float volume_value[VOLUME_COUNT] = {
0.55f, 0.60f, 0.65f, 0.70f, 0.75f, 0.80f, 0.85f, 0.90f, 0.95f, 1.00f,
};
#define DELAY_COUNT 11
#define DELAY_COUNT 12
const char* const delay_text[DELAY_COUNT] = {
"Always ON",
"1s",
"5s",
"10s",
@@ -99,7 +100,7 @@ const char* const delay_text[DELAY_COUNT] = {
"30min",
};
const uint32_t delay_value[DELAY_COUNT] =
{1000, 5000, 10000, 15000, 30000, 60000, 90000, 120000, 300000, 600000, 1800000};
{0, 1000, 5000, 10000, 15000, 30000, 60000, 90000, 120000, 300000, 600000, 1800000};
#define VIBRO_COUNT 2
const char* const vibro_text[VIBRO_COUNT] = {
@@ -303,6 +304,11 @@ static void screen_changed(VariableItem* item) {
variable_item_set_current_value_text(item, delay_text[index]);
app->notification->settings.display_off_delay_ms = delay_value[index];
// Switch off current backlight delay timer if user choose "Always ON"
if((delay_value[index] == 0) & (furi_timer_is_running(app->notification->display_timer))) {
furi_timer_stop(app->notification->display_timer);
}
notification_message(app->notification, &sequence_display_backlight_on);
}

View File

@@ -58,7 +58,7 @@ void SK6805_set_led_color(uint8_t led_index, uint8_t r, uint8_t g, uint8_t b) {
void SK6805_update(void) {
SK6805_init();
FURI_CRITICAL_ENTER();
furi_delay_us(100);
furi_delay_us(150);
uint32_t end;
/* Последовательная отправка цветов светодиодов */
for(uint8_t lednumber = 0; lednumber < SK6805_LED_COUNT; lednumber++) {