Huge refactoring for C++ and low-power mode

The display currently shows the time, with hours and minutes, and is
capable of receiving input with buttons (though does nothing). It
sleeps during intervals where nothing is happening. The display task
runs once per second, and RTC alarm A is used for periodic alarms to
update the system time.
This commit is contained in:
2019-04-17 21:51:35 -07:00
parent 6747d6c831
commit a7f1ffc1b5
22 changed files with 1051 additions and 231 deletions

View File

@@ -26,6 +26,7 @@
#include "DisplayDriver.h"
#include "ReturnCode.h"
#include "Task.h"
#include "RtcDriver.h"
class DisplayTimeTask : public Common::Schedule::Task {
public:
@@ -36,6 +37,14 @@ public:
Common::Schedule::NextTime execute();
private:
void display_time();
void display_number(uint32_t x, uint32_t y, uint32_t tens, uint32_t ones, const font &f);
BSP::DisplayDriver &m_driver;
unsigned int m_y_pos;
bool m_has_cleared;
BSP::time_bcd m_last_time;
const bool m_display_seconds;
};