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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user