mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-20 07:17:51 +00:00
Unclever first attempt at display sleep.
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_painter.hpp"
|
||||
|
||||
#include "portapack.hpp"
|
||||
|
||||
#include "message.hpp"
|
||||
|
||||
#include "touch.hpp"
|
||||
@@ -53,6 +55,11 @@ public:
|
||||
void run();
|
||||
void request_stop();
|
||||
|
||||
void set_display_sleep(bool new_value) {
|
||||
portapack::io.lcd_backlight(false);
|
||||
display_sleep = new_value;
|
||||
};
|
||||
|
||||
static inline void events_flag(const eventmask_t events) {
|
||||
if( thread_event_loop ) {
|
||||
chEvtSignal(thread_event_loop, events);
|
||||
@@ -80,6 +87,7 @@ private:
|
||||
uint32_t encoder_last = 0;
|
||||
bool is_running = true;
|
||||
bool sd_card_present = false;
|
||||
bool display_sleep = false;
|
||||
|
||||
eventmask_t wait();
|
||||
void dispatch(const eventmask_t events);
|
||||
|
Reference in New Issue
Block a user