0xCAFEDECAF / VanLiveConnect

Live data from your PSA vehicle (Peugeot, Citroën) on your smartphone or tablet, directly from the VAN bus
MIT License
37 stars 3 forks source link

Fuel in liters is not displayed #12

Open maltsevvv opened 3 weeks ago

maltsevvv commented 3 weeks ago

Hello, cool project. Thank you. Can you tell me the fuel in liters is not displayed, oil temperature.

20240821_191555 20240821_184208

log1 log2 log3

And how to correctly set a constant temperature, speed, time

Now I did this

        case "mfd_temperature_unit":
        {
            let map =
            {
                // "FAHRENHEIT": "set_units_deg_fahrenheit",
                "CELSIUS": "set_units_deg_celsius"
            };

        case "mfd_distance_unit":
        {
            let map =
            {
                //"MILES_YARDS": "set_units_mph",
                "KILOMETRES_METRES": "set_units_km_h"
            };

        case "mfd_time_unit":
        {
            let map =
            {
                "24_H": "set_units_24h",
                //"12_H": "set_units_12h"
            };
0xCAFEDECAF commented 3 weeks ago

Hi, I'm afraid I do not understand the issue nor the solution you are proposing. Please read: https://en.wikipedia.org/wiki/Wikipedia:Reference_desk/How_to_ask_a_software_question .

maltsevvv commented 3 weeks ago

My data changes spontaneously, while driving: From Celsius to Fahrenheit and back km to mil back.

I'm asking what should I change so that the data is always displayed in Celsius and km?

0xCAFEDECAF commented 3 weeks ago

Ah ok. I think your issue is that you have too many packets with CRC errors (74.309% see log2). Then some packets are interpreted incorrectly. Unfortunately, I cannot reproduce this issue myself. You may want to tinker with the bit timing values in the VanBus driver, inside function nBitsTakingIntoAccountJitter.