Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OswAppStepStats: add debug window for current position value #372

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/apps/tools/OswAppStepStats.h
Original file line number Diff line number Diff line change
@@ -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(""));
10 changes: 10 additions & 0 deletions src/apps/tools/OswAppStepStats.cpp
Original file line number Diff line number Diff line change
@@ -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);
RuffaloLavoisier marked this conversation as resolved.
Show resolved Hide resolved
ImGui::End();
}
#endif

void OswAppStepStats::stop() {}
#endif