diff options
| author | JF <jf@codingfield.com> | 2020-04-05 19:59:22 +0200 |
|---|---|---|
| committer | Gitea <gitea@fake.local> | 2020-04-05 19:59:22 +0200 |
| commit | 86d5732b960fbe7f81ed711b2de7e6b79293c96a (patch) | |
| tree | 8447f6b7bbff0f423e9cf5d15ed709c630bed25e /src/DisplayApp/Screens/Tile.cpp | |
| parent | a91c68c931cc8308e87acd796afb46ba70ae3dc2 (diff) | |
| parent | 6e1bd118c5ecc53016548072501591b329500870 (diff) | |
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/DisplayApp/Screens/Tile.cpp')
| -rw-r--r-- | src/DisplayApp/Screens/Tile.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/DisplayApp/Screens/Tile.cpp b/src/DisplayApp/Screens/Tile.cpp index 004c8d31..6c225c9d 100644 --- a/src/DisplayApp/Screens/Tile.cpp +++ b/src/DisplayApp/Screens/Tile.cpp @@ -16,7 +16,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) { screen->OnObjectEvent(obj, event, eventData); } -static const char * btnm_map1[] = {"Meter", "Gauge", "Clock", "\n", "Soft\nversion", "App2", "App3", ""}; +static const char * btnm_map1[] = {"Meter", "Gauge", "Clock", "\n", "Soft\nversion", "App2", "Brightness", ""}; Tile::Tile(DisplayApp* app) : Screen(app) { modal.reset(new Modal(app)); @@ -123,11 +123,15 @@ void Tile::OnObjectEvent(lv_obj_t *obj, lv_event_t event, uint32_t buttonId) { tile->StartClockApp(); break; case 3: - modal->Show(); + char versionStr[20]; + sprintf(versionStr, "VERSION: %d.%d.%d", Version::Major(), Version::Minor(), Version::Patch()); + modal->Show(versionStr); break; case 4: + tile->StartSysInfoApp(); + break; case 5: - tile->StartTestApp(); + tile->StartBrightnessApp(); break; } @@ -146,8 +150,13 @@ void Tile::StartClockApp() { running = false; } -void Tile::StartTestApp() { - app->StartApp(DisplayApp::Apps::Test); +void Tile::StartSysInfoApp() { + app->StartApp(DisplayApp::Apps::SysInfo); + running = false; +} + +void Tile::StartBrightnessApp() { + app->StartApp(DisplayApp::Apps::Brightness); running = false; } |
