summaryrefslogtreecommitdiff
path: root/src/systemtask/SystemTask.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemtask/SystemTask.cpp')
-rw-r--r--src/systemtask/SystemTask.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp
index 03bf6706..b9b223ed 100644
--- a/src/systemtask/SystemTask.cpp
+++ b/src/systemtask/SystemTask.cpp
@@ -22,6 +22,7 @@
#include "drivers/TwiMaster.h"
#include "drivers/Hrs3300.h"
#include "main.h"
+#include "BootErrors.h"
#include <memory>
@@ -107,6 +108,8 @@ void SystemTask::Process(void* instance) {
}
void SystemTask::Work() {
+ BootErrors bootError = BootErrors::None;
+
watchdog.Setup(7);
watchdog.Start();
NRF_LOG_INFO("Last reset reason : %s", Pinetime::Drivers::Watchdog::ResetReasonToString(watchdog.ResetReason()));
@@ -125,7 +128,9 @@ void SystemTask::Work() {
lcd.Init();
twiMaster.Init();
- touchPanel.Init();
+ if (!touchPanel.Init()) {
+ bootError = BootErrors::TouchController;
+ }
dateTimeController.Register(this);
batteryController.Init();
motorController.Init();
@@ -142,7 +147,7 @@ void SystemTask::Work() {
settingsController.Init();
displayApp.Register(this);
- displayApp.Start();
+ displayApp.Start(bootError);
displayApp.PushMessage(Pinetime::Applications::Display::Messages::UpdateBatteryLevel);
@@ -241,7 +246,7 @@ void SystemTask::Work() {
break;
case Messages::TouchWakeUp: {
auto touchInfo = touchPanel.GetTouchInfo();
- if (touchInfo.touching and ((touchInfo.gesture == Pinetime::Drivers::Cst816S::Gestures::DoubleTap and
+ if (touchInfo.isValid and ((touchInfo.gesture == Pinetime::Drivers::Cst816S::Gestures::DoubleTap and
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::DoubleTap)) or
(touchInfo.gesture == Pinetime::Drivers::Cst816S::Gestures::SingleTap and
settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::SingleTap)))) {