Add Stopwatch application

It can be started, stopped, and cleared. It also continues to run if
you leave the screen.
This commit is contained in:
2019-12-17 22:12:20 -08:00
parent 00c9910872
commit 463c3afd3d
7 changed files with 279 additions and 13 deletions

View File

@@ -100,7 +100,7 @@ public:
void render() {
const struct font &font = default_font;
//m_driver.clear();
m_driver.clear();
uint32_t x = 0;
uint32_t y = 0;
@@ -124,6 +124,16 @@ public:
m_driver.refresh();
}
BSP::ReturnCode add_item(MenuScreenItem item) {
if (m_num_items == MAX_ITEMS) {
return BSP::ReturnCode::FAIL;
}
m_items[m_num_items++] = item;
return BSP::ReturnCode::OK;
}
BSP::ReturnCode init() {
return BSP::ReturnCode::OK;
}
@@ -134,7 +144,6 @@ public:
void enable() override {
m_selected = 0;
m_driver.clear();
render();
}