change screen into a periodictask, so it can be used with the scheduler

This commit is contained in:
geeksville
2020-02-21 10:51:36 -08:00
parent a6b98bec1f
commit 20461807f3
3 changed files with 60 additions and 24 deletions

View File

@@ -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;