Re-enable BLE display on Clock screen

This commit is contained in:
JF 2020-02-20 18:17:53 +01:00
parent 167a0ffc87
commit 2bdff7ed2b
3 changed files with 8 additions and 8 deletions

View file

@ -31,7 +31,7 @@ DisplayApp::DisplayApp(Pinetime::Drivers::St7789& lcd,
batteryController{batteryController},
bleController{bleController},
dateTimeController{dateTimeController},
currentScreen{new Screens::Tile(this, gfx) } {
currentScreen{new Screens::Clock(this, gfx, dateTimeController) } {
msgQueue = xQueueCreate(queueSize, itemSize);
}

View file

@ -81,10 +81,12 @@ void Clock::Refresh(bool fullRefresh) {
}
if (fullRefresh || bleState.IsUpdated()) {
uint16_t color = (bleState.Get() == BleConnectionStates::Connected) ? 0xffff : 0x0000;
gfx.DrawString(10, 0, color, "BLE", &smallFont, false);
lv_label_set_text(label_ble, "BLE");
// TODO color
if(bleState.Get() == BleConnectionStates::Connected) {
lv_obj_set_hidden(label_ble, false);
lv_label_set_text(label_ble, "BLE");
} else {
lv_obj_set_hidden(label_ble, true);
}
}
currentDateTime = dateTimeController.CurrentDateTime();

View file

@ -20,9 +20,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
screen->OnObjectEvent(obj, event);
}
//static const char * btnm_map1[] = {"App1", "App2", "App3", "\n", "App4", "App5", "App11", ""};
//static const char * btnm_map2[] = {"App6", "App7", "App8", "\n", "App9", "App10", "App22",""};
static const char * btnm_map1[] = {"App1", ""};
static const char * btnm_map1[] = {"App1", "App2", "App3", "\n", "App4", "App5", "App11", ""};
Tile::Tile(DisplayApp* app, Pinetime::Components::Gfx &gfx) : Screen(app, gfx) {