summaryrefslogtreecommitdiff
path: root/src/displayapp
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp')
-rw-r--r--src/displayapp/DisplayApp.cpp4
-rw-r--r--src/displayapp/screens/SystemInfo.cpp12
-rw-r--r--src/displayapp/screens/SystemInfo.h6
3 files changed, 15 insertions, 7 deletions
diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp
index 071af0c8..dd6292eb 100644
--- a/src/displayapp/DisplayApp.cpp
+++ b/src/displayapp/DisplayApp.cpp
@@ -338,7 +338,7 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
break;
case Apps::SysInfo:
currentScreen =
- std::make_unique<Screens::SystemInfo>(this, dateTimeController, batteryController, brightnessController, bleController, watchdog, motionController);
+ std::make_unique<Screens::SystemInfo>(this, dateTimeController, batteryController, brightnessController, bleController, watchdog, motionController, touchPanel);
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
break;
case Apps::FlashLight:
@@ -397,7 +397,7 @@ void DisplayApp::PushMessage(Messages msg) {
TouchEvents DisplayApp::OnTouchEvent() {
auto info = touchPanel.GetTouchInfo();
- if (info.isTouch) {
+ if (info.isValid) {
switch (info.gesture) {
case Pinetime::Drivers::Cst816S::Gestures::SingleTap:
if (touchMode == TouchModes::Gestures) {
diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp
index f5bf0cc9..d1df579c 100644
--- a/src/displayapp/screens/SystemInfo.cpp
+++ b/src/displayapp/screens/SystemInfo.cpp
@@ -31,7 +31,8 @@ SystemInfo::SystemInfo(Pinetime::Applications::DisplayApp* app,
Pinetime::Controllers::BrightnessController& brightnessController,
Pinetime::Controllers::Ble& bleController,
Pinetime::Drivers::WatchdogView& watchdog,
- Pinetime::Controllers::MotionController& motionController)
+ Pinetime::Controllers::MotionController& motionController,
+ Pinetime::Drivers::Cst816S& touchPanel)
: Screen(app),
dateTimeController {dateTimeController},
batteryController {batteryController},
@@ -39,6 +40,7 @@ SystemInfo::SystemInfo(Pinetime::Applications::DisplayApp* app,
bleController {bleController},
watchdog {watchdog},
motionController{motionController},
+ touchPanel{touchPanel},
screens {app,
0,
{[this]() -> std::unique_ptr<Screen> {
@@ -151,7 +153,8 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen2() {
"#444444 Battery# %d%%/%03imV\n"
"#444444 Backlight# %s\n"
"#444444 Last reset# %s\n"
- "#444444 Accel.# %s\n",
+ "#444444 Accel.# %s\n"
+ "#444444 Touch.# %x.%x.%x\n",
dateTimeController.Day(),
static_cast<uint8_t>(dateTimeController.Month()),
dateTimeController.Year(),
@@ -166,7 +169,10 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen2() {
batteryController.Voltage(),
brightnessController.ToString(),
resetReason,
- ToString(motionController.DeviceType()));
+ ToString(motionController.DeviceType()),
+ touchPanel.GetChipId(),
+ touchPanel.GetVendorId(),
+ touchPanel.GetFwVersion());
lv_obj_align(label, lv_scr_act(), LV_ALIGN_CENTER, 0, 0);
return std::make_unique<Screens::Label>(1, 5, app, label);
}
diff --git a/src/displayapp/screens/SystemInfo.h b/src/displayapp/screens/SystemInfo.h
index 9d471f61..88984dfe 100644
--- a/src/displayapp/screens/SystemInfo.h
+++ b/src/displayapp/screens/SystemInfo.h
@@ -28,7 +28,8 @@ namespace Pinetime {
Pinetime::Controllers::BrightnessController& brightnessController,
Pinetime::Controllers::Ble& bleController,
Pinetime::Drivers::WatchdogView& watchdog,
- Pinetime::Controllers::MotionController& motionController);
+ Pinetime::Controllers::MotionController& motionController,
+ Pinetime::Drivers::Cst816S& touchPanel);
~SystemInfo() override;
bool Refresh() override;
bool OnButtonPushed() override;
@@ -43,6 +44,7 @@ namespace Pinetime {
Pinetime::Controllers::Ble& bleController;
Pinetime::Drivers::WatchdogView& watchdog;
Pinetime::Controllers::MotionController& motionController;
+ Pinetime::Drivers::Cst816S& touchPanel;
ScreenList<5> screens;
@@ -56,4 +58,4 @@ namespace Pinetime {
};
}
}
-} \ No newline at end of file
+}