Add new App : Sysinfo. It displays various info about the running system : version, date/time, battery, brightness and resetreason. It contains placeholder for future use (like mac address, uptime,...).

This commit is contained in:
JF
2020-03-22 12:03:17 +01:00
parent 8ed6ffaaf8
commit fb64ba8fb6
15 changed files with 276 additions and 41 deletions

View File

@@ -13,7 +13,9 @@ SystemTask::SystemTask(Pinetime::Drivers::SpiMaster &spi, Pinetime::Drivers::St7
Pinetime::Drivers::Cst816S &touchPanel, Pinetime::Components::LittleVgl &lvgl,
Pinetime::Controllers::Battery &batteryController, Pinetime::Controllers::Ble &bleController,
Pinetime::Controllers::DateTime& dateTimeController) :
spi{spi}, lcd{lcd}, touchPanel{touchPanel}, lvgl{lvgl}, batteryController{batteryController}, bleController{bleController}, dateTimeController{dateTimeController} {
spi{spi}, lcd{lcd}, touchPanel{touchPanel}, lvgl{lvgl}, batteryController{batteryController},
bleController{bleController}, dateTimeController{dateTimeController},
watchdog{}, watchdogView{watchdog}{
systemTaksMsgQueue = xQueueCreate(10, 1);
}
@@ -42,7 +44,7 @@ void SystemTask::Work() {
touchPanel.Init();
batteryController.Init();
displayApp.reset(new Pinetime::Applications::DisplayApp(lcd, lvgl, touchPanel, batteryController, bleController, dateTimeController, *this));
displayApp.reset(new Pinetime::Applications::DisplayApp(lcd, lvgl, touchPanel, batteryController, bleController, dateTimeController, watchdogView, *this));
displayApp->Start();
batteryController.Update();

View File

@@ -43,6 +43,7 @@ namespace Pinetime {
QueueHandle_t systemTaksMsgQueue;
bool isSleeping = false;
Pinetime::Drivers::Watchdog watchdog;
Pinetime::Drivers::WatchdogView watchdogView;
static constexpr uint8_t pinSpiSck = 2;