Display battery level and BLE connection status using icon on Clock screen.

This commit is contained in:
JF
2020-03-14 16:33:47 +01:00
parent a91c68c931
commit 4d2aacf863
60 changed files with 4183 additions and 26 deletions

View File

@@ -34,8 +34,8 @@ void SystemTask::Work() {
NRF_LOG_INFO("Last reset reason : %s", Pinetime::Drivers::Watchdog::ResetReasonToString(watchdog.ResetReason()));
APP_GPIOTE_INIT(2);
bool erase_bonds=false;
// ble_manager_init_peer_manager();
// nrf_sdh_freertos_init(ble_manager_start_advertising, &erase_bonds);
ble_manager_init_peer_manager();
nrf_sdh_freertos_init(ble_manager_start_advertising, &erase_bonds);
spi.Init();
lcd.Init();
@@ -87,6 +87,7 @@ void SystemTask::Work() {
}
uint32_t systick_counter = nrf_rtc_counter_get(portNRF_RTC_REG);
dateTimeController.UpdateTime(systick_counter);
batteryController.Update();
if(!nrf_gpio_pin_read(pinButton))
watchdog.Kick();
@@ -103,7 +104,6 @@ void SystemTask::OnButtonPushed() {
NRF_LOG_INFO("[SystemTask] Button pushed, waking up");
displayApp->PushMessage(Pinetime::Applications::DisplayApp::Messages::GoToRunning);
isSleeping = false;
batteryController.Update();
displayApp->PushMessage(Pinetime::Applications::DisplayApp::Messages::UpdateBatteryLevel);
}
}