From 7eab1216c986a45fb76806357f22beceb2e3f777 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Wed, 3 Jan 2024 10:33:59 -0800 Subject: [PATCH] Remove test filtering --- .../src/main/native/cpp/view/DataSelector.cpp | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/sysid/src/main/native/cpp/view/DataSelector.cpp b/sysid/src/main/native/cpp/view/DataSelector.cpp index cfa5ef666d1..c50d00283aa 100644 --- a/sysid/src/main/native/cpp/view/DataSelector.cpp +++ b/sysid/src/main/native/cpp/view/DataSelector.cpp @@ -103,6 +103,7 @@ void DataSelector::Display() { return; } +#if 0 // Test filtering if (ImGui::BeginCombo("Test", m_selectedTest.c_str())) { for (auto&& test : m_tests) { @@ -112,6 +113,7 @@ void DataSelector::Display() { } ImGui::EndCombo(); } +#endif ImGui::Combo("Analysis Type", &m_selectedAnalysis, kAnalysisTypes, IM_ARRAYSIZE(kAnalysisTypes)); @@ -124,7 +126,7 @@ void DataSelector::Display() { ImGui::SetNextItemWidth(ImGui::GetFontSize() * 7); ImGui::Combo("Units", &m_selectedUnit, kUnits, IM_ARRAYSIZE(kUnits)); - if (!m_selectedTest.empty() && m_velocityEntry && m_positionEntry && + if (/*!m_selectedTest.empty() &&*/ m_velocityEntry && m_positionEntry && m_voltageEntry) { if (ImGui::Button("Load")) { m_testdataFuture = @@ -214,17 +216,19 @@ TestData DataSelector::BuildTestData() { bool positionDouble = m_positionEntry->type == "double"; bool velocityDouble = m_velocityEntry->type == "double"; - for (auto&& state : m_tests[m_selectedTest]) { - auto& motorData = data.motorData[state.first]; - for (auto&& range : state.second) { - auto& run = motorData.runs.emplace_back(); - for (auto&& record : range) { - if (record.GetEntry() == m_voltageEntry->entry) { - AddSample(run.voltage, record, voltageDouble); - } else if (record.GetEntry() == m_positionEntry->entry) { - AddSample(run.position, record, positionDouble); - } else if (record.GetEntry() == m_velocityEntry->entry) { - AddSample(run.velocity, record, velocityDouble); + for (auto&& test : m_tests) { + for (auto&& state : test.second) { + auto& motorData = data.motorData[state.first]; + for (auto&& range : state.second) { + auto& run = motorData.runs.emplace_back(); + for (auto&& record : range) { + if (record.GetEntry() == m_voltageEntry->entry) { + AddSample(run.voltage, record, voltageDouble); + } else if (record.GetEntry() == m_positionEntry->entry) { + AddSample(run.position, record, positionDouble); + } else if (record.GetEntry() == m_velocityEntry->entry) { + AddSample(run.velocity, record, velocityDouble); + } } } }