Torque

Forums

Forums

Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » Bug: Certain PIDs (i.e. Fuel status) returned as zero to Torque Scan and Realtime Charts Plugins

Pages: [1]
Author Topic: Bug: Certain PIDs (i.e. Fuel status) returned as zero to Torque Scan and Realtime Charts Plugins
Phil_in_NH
Member
Posts: 30
Post Bug: Certain PIDs (i.e. Fuel status) returned as zero to Torque Scan and Realtime Charts Plugins
on: February 13, 2019 (GMT)

The “Fuel Status” PID is always returned as a zero value from Torque Pro to remote Plugins like Torque Scan and Realtime Charts.

I debugged and confirmed that this is a bug in Torque Pro, the Fuel Status PID is always returned as zero (for all plugin apps except Realtime Information) including the Torque Scan Plugin.

Please fix this issue in Torque Pro (or the Torque Pro Service).

Also, I believe the same issue might exist for HVB Max Volts and HVB Min Volts but I have no way to test this (reported by another user).

The workaround is to define a new custom “Fuel Status” PID to force Torque Pro to read and return the correct value for this sensor. Now you can see the Fuel Status PID value in other plugins like Torque Scan and Realtime Charts.

Also – Here’s the mapping for the Fuel Status values:

https://en.wikipedia.org/wiki/OBD-II_PIDs#Service_01_PID_03

To set up a new Fuel Status custom PID is very easy…

Under Torque Pro click the gear icon in the lower left
– Click “Manage extra PIDs/Sensors”
– Click the three dots in the upper right and click “Add custom PID”
– For OBD2 Mode – Enter 0103
– For Long Name – enter – My Fuel Status
– For Short Name – enter My FS
– For Unit Type – enter Byte
– For Equation – Enter A
– Scroll to the bottom and click Ok

Thanks, Phil

Phil_in_NH
Realtime Charts Plugin Developer, outdoorsman, car guy, woodworker, software engineer, fly fisherman, cyclist

Get Realtime Charts for Torque Pro at https://play.google.com/store/apps/details?id=com.pjt.realtimecharts_v1

Phil_in_NH
Realtime Charts Plugin Developer, outdoorsman, car guy, woodworker, software engineer, fly fisherman, cyclist

Get Realtime Charts for Torque Pro at https://play.google.com/store/apps/details?id=com.pjt.realtimecharts_v1

Phil_in_NH
Member
Posts: 30
Post Re: Bug: Certain PIDs (i.e. Fuel status) returned as zero to Torque Scan and Realtime Charts Plugins
on: November 28, 2020 (GMT)

I finally managed to workaround the Torque Pro ‘Fuel Status’ PID being returned as zero to TorqueScan and other exernal plugins apps.

It appears to me that the Torque Pro Serivce special-cased the Fuel Status PID and forgot to save the PID value for normal reading.

Here’s my code, just poll the ‘Fuel Status’ sensor (“03,0”) using the standard Torque AIDL intereface, then read the raw OBD command response from Torque Pro and parse the response message manually.


     if (PIDs[series_count].equals("03,0")) {
        FuelStatusIndex = series_count;
     }

...
     PID_Readings = torqueService.getPIDValues(pidToFetch);
...

     //
     // Special Fuel Status workaround
     //
     try {
        if (FuelStatusIndex != -1) {
          if (PIDs_long[FuelStatusIndex] == 03) {
            String [] response;
            response = torqueService.getPIDRawResponse("0103");
            if (response[0].length() > 6) {
              if (response[0].startsWith("4103")) {
                PID_Readings[FuelStatusIndex] = Integer.parseInt(response[0].substring(4, 6), 16);
              }
            }
          }
       }
     } catch (Exception e) {}

Phil_in_NH
Realtime Charts Plugin Developer, outdoorsman, car guy, woodworker, software engineer, fly fisherman, cyclist

Get Realtime Charts for Torque Pro at https://play.google.com/store/apps/details?id=com.pjt.realtimecharts_v1

Pages: [1]
WP-Forum by: Fredrik Fahlstad, Version: 2.4
Page loaded in: 0.057 seconds.

  Follow me on twitter