Skip to content

Commit

Permalink
OswAppStepStats: add debug window for current position value (#372)
Browse files Browse the repository at this point in the history
Add a debug window to 'OswAppStepStats' as well.
  • Loading branch information
RuffaloLavoisier authored Nov 23, 2023
2 parents 2cddafd + e1786c7 commit db1390a
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 db1390a

Please sign in to comment.