plugins: VU Meter: Ignore backlight timeout

Change-Id: Ic61cbd61dab18afe951b00a84b9ebeb15a8ee5f0
This commit is contained in:
Christian Soffke 2022-12-18 17:50:18 +01:00
parent 5f2ca6718d
commit 52f59f637d

View file

@ -20,6 +20,8 @@
#include "plugin.h"
#include "fixedpoint.h"
#include "lib/playback_control.h"
#include "lib/helper.h"
#include "lib/pluginlib_exit.h"
@ -910,6 +912,12 @@ static void digital_meter(void) {
rb->lcd_hline(0,LCD_WIDTH-1,half_height+3);
}
static void vu_meter_cleanup(void)
{
/* Turn on backlight timeout (revert to settings) */
backlight_use_settings();
}
enum plugin_status plugin_start(const void* parameter) {
int button;
#if defined(VUMETER_HELP_PRE) || defined(VUMETER_MENU_PRE)
@ -920,12 +928,17 @@ enum plugin_status plugin_start(const void* parameter) {
calc_scales();
atexit(vu_meter_cleanup);
load_settings();
rb->lcd_setfont(FONT_SYSFIXED);
#ifdef HAVE_LCD_COLOR
screen_foreground = rb->lcd_get_foreground();
#endif
/* Turn off backlight timeout */
backlight_ignore_timeout();
while (1)
{
rb->lcd_clear_display();