mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
RGB vibro control tune + Display backlight always ON option.
This commit is contained in:
@@ -377,7 +377,10 @@ static void notification_reset_notification_layer(
|
|||||||
app->settings.display_brightness * 0xFF * app->current_night_shift * 1.0f);
|
app->settings.display_brightness * 0xFF * app->current_night_shift * 1.0f);
|
||||||
// --- NIGHT SHIFT END---
|
// --- 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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
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] = {
|
const char* const delay_text[DELAY_COUNT] = {
|
||||||
|
"Always ON",
|
||||||
"1s",
|
"1s",
|
||||||
"5s",
|
"5s",
|
||||||
"10s",
|
"10s",
|
||||||
@@ -99,7 +100,7 @@ const char* const delay_text[DELAY_COUNT] = {
|
|||||||
"30min",
|
"30min",
|
||||||
};
|
};
|
||||||
const uint32_t delay_value[DELAY_COUNT] =
|
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
|
#define VIBRO_COUNT 2
|
||||||
const char* const vibro_text[VIBRO_COUNT] = {
|
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]);
|
variable_item_set_current_value_text(item, delay_text[index]);
|
||||||
app->notification->settings.display_off_delay_ms = delay_value[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);
|
notification_message(app->notification, &sequence_display_backlight_on);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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) {
|
void SK6805_update(void) {
|
||||||
SK6805_init();
|
SK6805_init();
|
||||||
FURI_CRITICAL_ENTER();
|
FURI_CRITICAL_ENTER();
|
||||||
furi_delay_us(100);
|
furi_delay_us(150);
|
||||||
uint32_t end;
|
uint32_t end;
|
||||||
/* Последовательная отправка цветов светодиодов */
|
/* Последовательная отправка цветов светодиодов */
|
||||||
for(uint8_t lednumber = 0; lednumber < SK6805_LED_COUNT; lednumber++) {
|
for(uint8_t lednumber = 0; lednumber < SK6805_LED_COUNT; lednumber++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user