From 5635f33a328144542e4ca7947c8c54614ce30de3 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Fri, 4 Feb 2022 22:20:38 -0800 Subject: [PATCH] [glass] Increase plot depth to 20K points (#3993) 2K was sufficient for simulation because it's possible to pause time, but isn't quite enough for looking at real robot data. 20K points is 400 seconds at 50 Hz which should make pausing plots much more useful. As every point is looped over, this does increase CPU utilization somewhat but doesn't seem to have much of an impact for typical use cases. Increasing this further will necessitate some greater optimizations (e.g. an initial cull using binary search). --- glass/src/lib/native/cpp/other/Plot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glass/src/lib/native/cpp/other/Plot.cpp b/glass/src/lib/native/cpp/other/Plot.cpp index 9af2da70cb..bff55b7223 100644 --- a/glass/src/lib/native/cpp/other/Plot.cpp +++ b/glass/src/lib/native/cpp/other/Plot.cpp @@ -105,7 +105,7 @@ class PlotSeries { int& m_digitalBitGap; // value storage - static constexpr int kMaxSize = 2000; + static constexpr int kMaxSize = 20000; static constexpr double kTimeGap = 0.05; std::atomic m_size = 0; std::atomic m_offset = 0;