From f505476ff5af0e1773999c9a498a436ca6163be0 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 1 Jan 2024 18:07:09 -0800 Subject: [PATCH] Remove run number selection --- .../src/main/native/cpp/view/DataSelector.cpp | 23 ------------------- .../native/include/sysid/view/DataSelector.h | 1 - 2 files changed, 24 deletions(-) diff --git a/sysid/src/main/native/cpp/view/DataSelector.cpp b/sysid/src/main/native/cpp/view/DataSelector.cpp index 191bfa6e250..9f36605c834 100644 --- a/sysid/src/main/native/cpp/view/DataSelector.cpp +++ b/sysid/src/main/native/cpp/view/DataSelector.cpp @@ -64,33 +64,11 @@ void DataSelector::Display() { for (auto&& test : m_tests) { if (ImGui::Selectable(test.first.c_str(), test.first == m_selectedTest)) { m_selectedTest = test.first; - m_selectedRun = 0; } } ImGui::EndCombo(); } - // Run number selection - if (!m_selectedTest.empty()) { - int numRuns = INT_MAX; - for (auto&& state : m_tests[m_selectedTest]) { - numRuns = std::min(numRuns, static_cast(state.second.size())); - } - if (numRuns != INT_MAX) { - std::string runStr = - m_selectedRun == 0 ? "" : fmt::format("{}", m_selectedRun); - if (ImGui::BeginCombo("Run", runStr.c_str())) { - for (int i = 1; i < (numRuns + 1); ++i) { - runStr = fmt::format("{}", i); - if (ImGui::Selectable(runStr.c_str(), i == m_selectedRun)) { - m_selectedRun = i; - } - } - ImGui::EndCombo(); - } - } - } - // DND targets EmitEntryTarget("Velocity", false, &m_velocityEntry); EmitEntryTarget("Position", false, &m_positionEntry); @@ -110,7 +88,6 @@ void DataSelector::Reset() { m_velocityEntry = nullptr; m_positionEntry = nullptr; m_voltageEntry = nullptr; - m_selectedRun = 0; } void DataSelector::LoadTests(const glass::DataLogReaderEntry& testStateEntry) { diff --git a/sysid/src/main/native/include/sysid/view/DataSelector.h b/sysid/src/main/native/include/sysid/view/DataSelector.h index 3069f3ec5f2..a903667c508 100644 --- a/sysid/src/main/native/include/sysid/view/DataSelector.h +++ b/sysid/src/main/native/include/sysid/view/DataSelector.h @@ -56,7 +56,6 @@ class DataSelector : public glass::View { using Tests = std::map>; // e.g. "dynamic" std::future m_testsFuture; std::string m_selectedTest; - int m_selectedRun = 0; Tests m_tests; const glass::DataLogReaderEntry* m_testStateEntry = nullptr; const glass::DataLogReaderEntry* m_velocityEntry = nullptr;