From 888eca5ba20672448624a418ebad573dd4d640e6 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Fri, 30 Dec 2022 02:37:11 -0500 Subject: vehicle-signals: Increase double value precision The code for double values for VSS signals was using the default Qt double to string conversion, which defaults to a max of 6 decimal places, explicitly format with 9 so that latitude and longtitude values for the navigation related signals do not get truncated. Bug-AGL: SPEC-4662 Signed-off-by: Scott Murray Change-Id: I49d23c4224c41f33687c20cdbd21f4cbb538c52d --- vehicle-signals/vehiclesignals.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vehicle-signals/vehiclesignals.cpp b/vehicle-signals/vehiclesignals.cpp index f3db521..d6cf8eb 100644 --- a/vehicle-signals/vehiclesignals.cpp +++ b/vehicle-signals/vehiclesignals.cpp @@ -337,7 +337,7 @@ bool VehicleSignals::parseData(const QJsonObject &response, QString &path, QStri } else if (dp["value"].isString()) { value = dp["value"].toString(); } else if (dp["value"].isDouble()) { - value.setNum(dp["value"].toDouble()); + value = QString::number(dp["value"].toDouble(), 'f', 9); } else if (dp["value"].isBool()) { value = dp["value"].toBool() ? "true" : "false"; } else { -- cgit 1.2.3-korg