View Single Post
Old 11-13-2012, 12:35 AM   #1025 (permalink)
takarp
EcoModding Lurker
 
Join Date: Sep 2012
Location: Hungary
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Thnks for the quick reply!

If I stop the engine, everything goes 0, but when the engine is running the l/km instantly goes 999999 and the tank value starts to rise. It seems when the speed 0, the program won't stop to update the tank data, it continues to add the infinity to the tank avarege. I have found this "update" part of the code, edited to jump over the update if vss is 0. It's working now.

I don't think all the codes have this bug, mybe the 328 and new arduino IDE causes the problem?

I have two other things:
-my arduino has 16 mhz chrystal, if I change the code for 16 mhz the tank and current values will be different even after an instant tank reset. If I leave it 20 mhz, i'm unable to calibrate vss, if the speed ok, the distance wrong, if the distance ok the speed has more than 10% error.
-after calibrating the vss well, it indicates very vell under 60 km/h, but when I go to highway, the speed indication not rises above 70-80 km/h, and it's jumping around. I tuned the vss delay with no success.

I have found falcon four's code, it looks good with 16 mhz, but it also has the problem when speed is 0 and the engine is running, I coud repair it wit a small edit in the code. Falcon four removed all metric calculation from the code, for now it's too complicated to me to edit back all metric indication. I'm living in Europe, Hungary.
  Reply With Quote