Milage gets reset

Hello, im having some issues with the realdash in my car. im using the calculated value as my ECU or TCM do not supply a milage, but after a few starts and stops the vaue together with trip and all gets reset to 0.
What is the reason? interference when car shuts off? Or something other?
Im running it on a pi. I can’t find the file where retentive stuff shuld be in, to see if its linux that is wiping it. Can you point me to the dir. Where realdash saves the stuff that is NOT supposed to be cleared?

Kind regards

Note that there are 3 trips running in RealDash:

  • Current Trip, reset either on every start or daily
  • Trip A and Trip B, reset manually from Quick Settings

If all other settings stay, only trip reset, check if you are observing the Current Trip, which is supposed to reset automatically.

Shuld the km get reset? The milage total one? Like the one that I’m currently have at 198000km as that’s the km of the car..

Calculated values->Odometer should not get reset.

Yea that’s the issue, it do :blush:

How do you shut down your Pi?

I pull the power with ignition, set OS as allways flush to disk so I don’t get sd failures

What happens is that sometimes RealDash is in a middle of saving its status, and when you kill the power, the file is not completely written into the disk and gets corrupted.

Hmm that makes sense, how wuld I change that without a pdm or a ups?

Yea, its complicated. You would need to have some sort of hardware to gracefully shutdown the pi when ignition is turned off.

I have been thinking about this, and we could minimize the possibility of this happening by only saving when vehicle has speed, or only when odometer value changes. We have to do some tests over that.

If I rember correct, automotive speeds also do this, only change in memory when odometer changes, as the event of power surge when it changes is very slim.
I’ll see if I can make something, like a “soft shutdown hat” with a super cap and stuff so when power if pulled it will send shutdown to the pi, but keeping it alive untill that happens.
Thanks for the inputs.