|
23 | 23 | #include "FrameworkGUIDataRelayerUsage.h" |
24 | 24 | #include "PaletteHelpers.h" |
25 | 25 | #include "FrameworkGUIState.h" |
| 26 | +#include "Framework/Signpost.h" |
26 | 27 | #include <DebugGUI/icons_font_awesome.h> |
27 | 28 |
|
28 | 29 | #include <fmt/format.h> |
|
34 | 35 | #include <cinttypes> |
35 | 36 | #include <numeric> |
36 | 37 |
|
| 38 | +O2_DECLARE_DYNAMIC_LOG(driver); |
37 | 39 | // Make sure we can use aggregated initialisers. |
38 | 40 | #pragma GCC diagnostic push |
39 | 41 | #pragma GCC diagnostic ignored "-Wpedantic" |
@@ -506,7 +508,7 @@ void displayDeviceMetrics(const char* label, |
506 | 508 | case MetricsDisplayStyle::Lines: { |
507 | 509 | auto xAxisFlags = ImPlotAxisFlags_None; |
508 | 510 | auto yAxisFlags = ImPlotAxisFlags_LockMin; |
509 | | - //ImPlot::FitNextPlotAxes(true, true, true, true); |
| 511 | + // ImPlot::FitNextPlotAxes(true, true, true, true); |
510 | 512 | if (ImPlot::BeginPlot("##Some plot", {-1, -1}, axisFlags)) { |
511 | 513 | ImPlot::SetupAxes("time", "value", xAxisFlags, yAxisFlags); |
512 | 514 | ImPlot::SetupAxisFormat(ImAxis_Y1, formatSI, nullptr); |
@@ -1093,6 +1095,17 @@ void displayDriverInfo(DriverInfo const& driverInfo, DriverControl& driverContro |
1093 | 1095 | } |
1094 | 1096 | #endif |
1095 | 1097 |
|
| 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 | + |
1096 | 1109 | for (size_t i = 0; i < driverInfo.states.size(); ++i) { |
1097 | 1110 | ImGui::Text("#%lu: %s", i, DriverInfoHelper::stateToString(driverInfo.states[i])); |
1098 | 1111 | } |
|
0 commit comments