From e1786c7dd0aa93ad3915991073c0d2d42ae3a805 Mon Sep 17 00:00:00 2001 From: Ruffalo Lavoisier Date: Thu, 9 Nov 2023 13:17:25 +0900 Subject: [PATCH] OswAppStepStats: add debug window for current position value --- include/apps/tools/OswAppStepStats.h | 3 +++ src/apps/tools/OswAppStepStats.cpp | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/include/apps/tools/OswAppStepStats.h b/include/apps/tools/OswAppStepStats.h index 0ca523862..336700acf 100644 --- a/include/apps/tools/OswAppStepStats.h +++ b/include/apps/tools/OswAppStepStats.h @@ -13,6 +13,9 @@ class OswAppStepStats : public OswApp { }; virtual void setup() override; virtual void loop() override; +#ifdef OSW_EMULATOR + virtual void loopDebug() override; +#endif virtual void stop() override; ~OswAppStepStats() {}; static void drawInfoPanel(OswUI* ui, uint32_t pos, uint32_t lastWeekData, uint32_t todayData, uint32_t average, uint32_t total, const String& unit = String("")); diff --git a/src/apps/tools/OswAppStepStats.cpp b/src/apps/tools/OswAppStepStats.cpp index a3e818f7f..1fc5ab495 100644 --- a/src/apps/tools/OswAppStepStats.cpp +++ b/src/apps/tools/OswAppStepStats.cpp @@ -85,5 +85,15 @@ void OswAppStepStats::loop() { showStickChart(); } +#ifdef OSW_EMULATOR +#include "imgui.h" + +void OswAppStepStats::loopDebug() { + ImGui::Begin("Debug: OswAppStepStats"); + ImGui::InputScalar("cursorPos", ImGuiDataType_U8, &this->cursorPos); + ImGui::End(); +} +#endif + void OswAppStepStats::stop() {} #endif \ No newline at end of file