2017-12-07 15:49:57 +00:00
|
|
|
#ifndef __countdown
|
|
|
|
#define __countdown
|
2017-11-26 19:22:15 +00:00
|
|
|
|
2017-12-07 15:49:57 +00:00
|
|
|
#include "screen.h"
|
2017-11-26 19:22:15 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Countdown screen
|
|
|
|
* Shows the remaining time.
|
|
|
|
*/
|
2017-12-03 20:27:45 +00:00
|
|
|
class CountdownScreen : public BaseScreen
|
2017-11-26 19:22:15 +00:00
|
|
|
{
|
|
|
|
private:
|
2017-12-07 15:49:57 +00:00
|
|
|
uint32_t mLastDisplayed;
|
2017-12-03 20:27:45 +00:00
|
|
|
|
2017-11-26 19:22:15 +00:00
|
|
|
protected:
|
|
|
|
void printRemainingTime();
|
2017-12-03 20:27:45 +00:00
|
|
|
|
2017-11-26 19:22:15 +00:00
|
|
|
public:
|
2017-12-03 20:27:45 +00:00
|
|
|
CountdownScreen(ScreenManager* screenManager) : BaseScreen(screenManager) { }
|
|
|
|
|
2017-11-26 19:22:15 +00:00
|
|
|
void onShow();
|
|
|
|
void onHide();
|
2017-12-03 20:27:45 +00:00
|
|
|
|
2017-11-26 19:22:15 +00:00
|
|
|
void onButton();
|
2017-12-08 21:32:04 +00:00
|
|
|
void onEncoder(int32_t lastPosition, int32_t newPosition);
|
2017-11-26 19:22:15 +00:00
|
|
|
void onTick();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|