From 583349e3ecbf77de4324d508a626ea8ae56d35e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=A4berich?= Date: Sat, 30 Oct 2021 20:41:07 +0200 Subject: [PATCH] use float instead of int when reading Y axis json --- Software/PC_Application/Traces/tracexyplot.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Software/PC_Application/Traces/tracexyplot.cpp b/Software/PC_Application/Traces/tracexyplot.cpp index 2aa0466..d9f3d04 100644 --- a/Software/PC_Application/Traces/tracexyplot.cpp +++ b/Software/PC_Application/Traces/tracexyplot.cpp @@ -192,9 +192,9 @@ void TraceXYPlot::fromJSON(nlohmann::json j) } auto yauto = jY[i].value("autorange", true); auto ylog = jY[i].value("log", false); - auto ymin = jY[i].value("min", -120); - auto ymax = jY[i].value("max", 20); - auto ydiv = jY[i].value("div", 10); + auto ymin = jY[i].value("min", -120.0); + auto ymax = jY[i].value("max", 20.0); + auto ydiv = jY[i].value("div", 10.0); setYAxis(i, ytype, ylog, yauto, ymin, ymax, ydiv); for(unsigned int hash : jY[i]["traces"]) { // attempt to find the traces with this hash