Fysetc LCD backlight timeout (#14265)
This commit is contained in:
1 parent
8bc3b80176
commit
18904c42f6
6 files changed
+74
-9
No files matched your search
@@ -201,6 +201,17 @@ public:
|
||||
static void toggle(); // swap "off" with color
|
||||
static inline void update() { set_color(color); }
|
||||
#endif
|
||||
|
||||
#ifdef LED_BACKLIGHT_TIMEOUT
|
||||
private:
|
||||
static millis_t led_off_time;
|
||||
public:
|
||||
static inline void reset_timeout(const millis_t &ms) {
|
||||
led_off_time = ms + LED_BACKLIGHT_TIMEOUT;
|
||||
if (!lights_on) set_default();
|
||||
}
|
||||
static void update_timeout(const bool power_on);
|
||||
#endif
|
||||
};
|
||||
|
||||
extern LEDLights leds;
|
||||
Reference in new issue
Block a user