Android OBD-II How to clear distance travelled (PID0131)?

£可爱£侵袭症+ 提交于 2019-12-05 16:56:11

Elm Electronics are right. The resetting trouble codes solution is a possible, but maybe unwanted workaround though.

Mode 04 is for resetting the codes. Sending 04 will reset the MIL (Malfunction Indicator Light) and reset the codes you want to reset.

In the comments, Chris suggested to use the value, and than keep track of this value yourself. That way you don't need to misuse the Mode 04. Th 0131 value overflows at 65535 km. But when you bring you car in for maintenance, they could reset this value, depending on who is maintaining your car ofcourse.

Source: Mode 04 - Wikipedia

There are two PIds: 0x0121 Distance travelled with malfunction indicator lamp (MIL) on which keeps the distance with MIL on and 0x0131 Distance travelled since codes cleared which keeps the distance after clearing the MIL by using mode 0x04. By saying code, it meant the Diagnostics Trouble Code (DTC). When one of them keeps counting the distance the other one is fixed and activation is done for them only based on MIL on or off.

For having the milage, afaik, you need to have current mileage from the odometer as the reference, in addition to those two PIDs. For example, if the current mileage on the odometer* is X and the first time readings for those two PIDs are Y and Z respectively, and x and y are real-time readings from those two PIDs, these two formulas can give you the mileage and trip distance:

Real-Time mileage** = X + (y - Y) + (z - Z)

Trip distance (MIL Off) = x(end) - x(start) 

Trip distance (MIL On) = y(end) - y(start) 

*The odometer is supposed to be available by PID 0x01A6 Odometer, but in almost all the vehicles, it's not supported.

**The overflow in readings from those two PIDs should be considered as well.

Pelin Akyürek

I think You can use the PID 0x011F (Run time since engine start) and PID 0x010D (Vehicle speed). If you save these values in an sd card then you can multiply these two values.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!