[Ovmsdev] Android client crashes
Tom Parker
tom at carrott.org
Sun Nov 5 16:42:58 HKT 2017
I found a couple of new android client crashes.
One was caused by the TPMS message which I've sent a pull request to fix.
The other crash is in the GPS message. The v2 car module's car_drivemode
is a hex encoded char. In v3 this has turned into a string which
defaults to 'standard'. The android client crashes on receipt of this
message. I'm not sure how to fix this, the field is only used by the
twizzy (as a bit field) and I'm not sure the intention of the
ms_v_env_drivemode string metric is.
In the meantime this patch avoids the crash
diff --git
a/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp
b/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp
index 9d3a6ad..eddb89f 100644
--- a/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp
+++ b/vehicle/OVMS.V3/components/ovms_server_v2/src/ovms_server_v2.cpp
@@ -558,7 +558,7 @@ void OvmsServerV2::TransmitMsgGPS(bool always)
else
buffer.append(StandardMetrics.ms_v_pos_speed->AsString("0",Mph).c_str());
buffer.append(",");
-
buffer.append(StandardMetrics.ms_v_env_drivemode->AsString("standard").c_str());
+ buffer.append("0"); // car_drivemode
buffer.append(",");
buffer.append(StandardMetrics.ms_v_bat_power->AsString("0",Other,1).c_str());
buffer.append(",");
More information about the OvmsDev
mailing list