[Ovmsdev] TPMS Bug in ovms_server_v2.cpp?

Mark Webb-Johnson mark at webb-johnson.net
Fri Mar 6 20:03:38 HKT 2020


Looks like an oversight. The spec says:

> Car TPMS message 0x57 “W”
> This message is sent <cartoserver> “C”, or <servertoapp> “s”, and transmits the last known TPMS values of the vehicle.
> 
> <data> is comma-separated list of:
> 
> front-right wheel pressure (psi)
> front-right wheel temperature (celcius)
> rear-right wheel pressure (psi)
> rear-right wheel temperature (celcius)
> front-left wheel pressure (psi)
> front-left wheel temperature (celcius)
> rear-left wheel pressure (psi)
> rear-left wheel temperature (celcius)
> Stale TPMS indicator (-1=none, 0=stale, >0 ok)

We can test the metrics to see if they are defined. If not, then set stale to -1. Should just be another line in the server v2 code.

Can you create a github issue, and I will fix. Or make the fix yourself and pull request?

Regards, Mark

> On 6 Mar 2020, at 6:31 PM, Chris van der Meijden <chris at arachnon.de> wrote:
> 
> Hi all,
> 
> as I can't find the CAN-ID's for TPMS for the VW e-Up at the moment, I
> thought I just disable the feature, so the app won't display the TPMS
> boxes unnecessarily.
> 
> In OVMS v2 this was possible by setting car_stale_tpms = -1 so the last
> number sent by the "W" message to the server was -1. With that -1 the
> app will not display the TMPS boxes.
> 
> The code in ovms_server_v2.cpp for the message is now
> 
>   extram::ostringstream buffer;
>   buffer
>     << "MP-0 W"
>     << StandardMetrics.ms_v_tpms_fr_p->AsString("0",PSI)
>     << ","
>     << StandardMetrics.ms_v_tpms_fr_t->AsString("0")
>     << ","
>     << StandardMetrics.ms_v_tpms_rr_p->AsString("0",PSI)
>     << ","
>     << StandardMetrics.ms_v_tpms_rr_t->AsString("0")
>     << ","
>     << StandardMetrics.ms_v_tpms_fl_p->AsString("0",PSI)
>     << ","
>     << StandardMetrics.ms_v_tpms_fl_t->AsString("0")
>     << ","
>     << StandardMetrics.ms_v_tpms_rl_p->AsString("0",PSI)
>     << ","
>     << StandardMetrics.ms_v_tpms_rl_t->AsString("0")
>     << ((stale)?",0":",1")
>     ;
> 
>   Transmit(buffer.str().c_str());
> 
> and that gives no room for sending a -1 as far as I understand it.
> 
> Is this a bug, a feature, or am I missing something?
> 
> Thanx for help
> 
> Greetinx
> 
> Chris
> 
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20200306/8252de1c/attachment.htm>


More information about the OvmsDev mailing list