Correct downsampling and better layout
This commit is contained in:
1 parent
0d741c401b
commit
30db44eaa0
13 files changed
+1511
-252
No files matched your search
+9
-2
@@ -3,6 +3,10 @@
|
||||
|
||||
#include "config.hpp"
|
||||
|
||||
// For `RowSet::kMaxRows`: `--plots` names a row count, and one constant for the ceiling
|
||||
// is what stops the message and the clamp from drifting apart.
|
||||
#include "plot_host.hpp"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <stdexcept>
|
||||
@@ -48,7 +52,8 @@ void print_usage(std::FILE* out, const char* argv0) {
|
||||
" --max-window SEC largest time window the toolbar offers (default 600)\n"
|
||||
" --holdoff SEC default trigger hold-off (default 0.010)\n"
|
||||
" --recv-buffer BYTES SO_RCVBUF for the receiver socket (default 8388608)\n"
|
||||
" --plots N initial number of stacked plots, 1..4 (default 1)\n"
|
||||
" --plots N stacked plots to start with, 1..8 (default 1); rows are\n"
|
||||
" added and removed from the layout editor\n"
|
||||
" -h, --help this text\n",
|
||||
argv0);
|
||||
}
|
||||
@@ -88,7 +93,9 @@ Config parse_args(int argc, char** argv) {
|
||||
} else if (a == "--plots" || a.rfind("--plots=", 0) == 0) {
|
||||
const std::string v = value_of(argc, argv, i, "--plots");
|
||||
const long n = std::strtol(v.c_str(), nullptr, 10);
|
||||
if (n < 1 || n > 4) fail("--plots must be 1..4: " + v);
|
||||
if (n < 1 || n > RowSet::kMaxRows) {
|
||||
fail("--plots must be 1.." + std::to_string(RowSet::kMaxRows) + ": " + v);
|
||||
}
|
||||
c.plots = static_cast<int>(n);
|
||||
} else {
|
||||
fail("unknown argument: " + a);
|
||||
|
||||
Reference in new issue
Block a user