Skip to content

Commit

Permalink
Remove run number selection
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterJohnson committed Jan 2, 2024
1 parent dc2d85e commit f505476
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
23 changes: 0 additions & 23 deletions sysid/src/main/native/cpp/view/DataSelector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(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);
Expand All @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion sysid/src/main/native/include/sysid/view/DataSelector.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class DataSelector : public glass::View {
using Tests = std::map<std::string, State, std::less<>>; // e.g. "dynamic"
std::future<Tests> 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;
Expand Down

0 comments on commit f505476

Please sign in to comment.