2020-02-07 13:51:17 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
2020-02-21 10:51:36 -08:00
|
|
|
#include "PeriodicTask.h"
|
2020-02-07 16:12:55 -08:00
|
|
|
|
2020-02-21 10:51:36 -08:00
|
|
|
void screen_print(const char * text);
|
2020-02-27 21:45:20 -08:00
|
|
|
void screen_print(const char * text, uint8_t x, uint8_t y, uint8_t alignment);
|
2020-02-07 16:12:55 -08:00
|
|
|
|
2020-02-07 20:59:21 -08:00
|
|
|
|
|
|
|
|
// Show the bluetooth PIN screen
|
|
|
|
|
void screen_start_bluetooth(uint32_t pin);
|
|
|
|
|
|
|
|
|
|
// restore our regular frame list
|
2020-02-21 04:57:08 -08:00
|
|
|
void screen_set_frames();
|
|
|
|
|
|
2020-02-21 10:51:36 -08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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();
|
2020-02-22 12:01:59 -08:00
|
|
|
|
|
|
|
|
/// Is the screen currently on
|
|
|
|
|
bool isOn();
|
|
|
|
|
|
|
|
|
|
/// Turn the screen on/off
|
|
|
|
|
void setOn(bool on);
|
|
|
|
|
|
|
|
|
|
/// Handle a button press
|
|
|
|
|
void onPress();
|
2020-03-04 16:46:57 -08:00
|
|
|
|
|
|
|
|
/// Rebuilt our list of screens
|
|
|
|
|
void setFrames();
|
|
|
|
|
private:
|
2020-02-21 10:51:36 -08:00
|
|
|
};
|
|
|
|
|
|
2020-02-27 21:45:20 -08:00
|
|
|
extern Screen screen;
|