Skip to content

Commit 4579e08

Browse files
committed
DPL GUI: add GUI to enable / disable driver signposts
1 parent bdea2e0 commit 4579e08

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

Framework/GUISupport/src/FrameworkGUIDebugger.cxx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "FrameworkGUIDataRelayerUsage.h"
2424
#include "PaletteHelpers.h"
2525
#include "FrameworkGUIState.h"
26+
#include "Framework/Signpost.h"
2627
#include <DebugGUI/icons_font_awesome.h>
2728

2829
#include <fmt/format.h>
@@ -34,6 +35,7 @@
3435
#include <cinttypes>
3536
#include <numeric>
3637

38+
O2_DECLARE_DYNAMIC_LOG(driver);
3739
// Make sure we can use aggregated initialisers.
3840
#pragma GCC diagnostic push
3941
#pragma GCC diagnostic ignored "-Wpedantic"
@@ -506,7 +508,7 @@ void displayDeviceMetrics(const char* label,
506508
case MetricsDisplayStyle::Lines: {
507509
auto xAxisFlags = ImPlotAxisFlags_None;
508510
auto yAxisFlags = ImPlotAxisFlags_LockMin;
509-
//ImPlot::FitNextPlotAxes(true, true, true, true);
511+
// ImPlot::FitNextPlotAxes(true, true, true, true);
510512
if (ImPlot::BeginPlot("##Some plot", {-1, -1}, axisFlags)) {
511513
ImPlot::SetupAxes("time", "value", xAxisFlags, yAxisFlags);
512514
ImPlot::SetupAxisFormat(ImAxis_Y1, formatSI, nullptr);
@@ -1093,6 +1095,17 @@ void displayDriverInfo(DriverInfo const& driverInfo, DriverControl& driverContro
10931095
}
10941096
#endif
10951097

1098+
static bool selectedSignpost = false;
1099+
if (ImGui::CollapsingHeader("Signposts", ImGuiTreeNodeFlags_DefaultOpen)) {
1100+
if (ImGui::Checkbox("Driver", &selectedSignpost)) {
1101+
if (selectedSignpost) {
1102+
O2_LOG_ENABLE(driver);
1103+
} else {
1104+
O2_LOG_DISABLE(driver);
1105+
}
1106+
}
1107+
}
1108+
10961109
for (size_t i = 0; i < driverInfo.states.size(); ++i) {
10971110
ImGui::Text("#%lu: %s", i, DriverInfoHelper::stateToString(driverInfo.states[i]));
10981111
}

0 commit comments

Comments
 (0)