Skip to content

Commit

Permalink
OswAppStepStats: add debug window for current position value
Browse files Browse the repository at this point in the history
  • Loading branch information
RuffaloLavoisier committed Nov 9, 2023
1 parent 7b54a2f commit 2fa6165
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/apps/tools/OswAppStepStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(""));
Expand Down
10 changes: 10 additions & 0 deletions src/apps/tools/OswAppStepStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2fa6165

Please sign in to comment.