mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 18:52:30 +00:00
change screen into a periodictask, so it can be used with the scheduler
This commit is contained in:
24
src/screen.h
24
src/screen.h
@@ -1,11 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "PeriodicTask.h"
|
||||
|
||||
void screen_print(const char * text);
|
||||
|
||||
/// @return how many msecs can we sleep before we want service again
|
||||
uint32_t screen_loop();
|
||||
|
||||
void screen_setup(), screen_on(), screen_off(), screen_press();
|
||||
void screen_on(), screen_off(), screen_press();
|
||||
|
||||
// Show the bluetooth PIN screen
|
||||
void screen_start_bluetooth(uint32_t pin);
|
||||
@@ -14,3 +13,20 @@ void screen_start_bluetooth(uint32_t pin);
|
||||
void screen_set_frames();
|
||||
|
||||
bool is_screen_on();
|
||||
|
||||
/**
|
||||
* Slowly I'm moving screen crap into this class
|
||||
*/
|
||||
class Screen : public PeriodicTask
|
||||
{
|
||||
public:
|
||||
|
||||
void setup();
|
||||
|
||||
virtual void doTask();
|
||||
|
||||
/// Turn on the screen asap
|
||||
void doWakeScreen();
|
||||
};
|
||||
|
||||
extern Screen screen;
|
||||
Reference in New Issue
Block a user