mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-13 17:05:37 -04:00
Unclever first attempt at display sleep.
This commit is contained in:
parent
1caf6952d8
commit
894d4b955c
6 changed files with 48 additions and 12 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue