Please be aware - in code version 0.01 "mahtemp" is defined as an integer (16 bit) and not a long (32 bit). When the total mAh consumed exceeds 3276.7 mAh it will give overflow. This will cause the 17. bit to be written "somewhere". In most cases nothing will happen - but it's not a good idea to write bits at random addresses.
Updated code will follow after further testing.

it seem to have about 600 mv offset - and until 5-10 amps load it stays at 600 mv. Any good ideas? Hopefully it's the last thing that needs to be fixed before I can make the final installation in my plane.

It's all connected and works fine so far - except for the current sensing.

EDIT; Tested and calibrated on breadboard - works fine. Will do another test in plane later

Found the problem with the current-sensor. This is what the output signal looks like. That will make the micro-controller will read more or less random values.
A descent lowpass-filter or some extra capacitors in front of the ESC should do the trick.

it seem to have about 600 mv offset - and until 5-10 amps load it stays at 600 mv. Any good ideas? Hopefully it's the last thing that needs to be fixed before I can make the final installation in my plane.

It's all connected and works fine so far - except for the current sensing.

EDIT; Tested and calibrated on breadboard - works fine. Will do another test in plane later

Notice that this part is no longer in production. From datasheet, it has good linearity (2.8% over full range), and 60mV/A sensitivity.

The datasheet gives an offset of 600mV as you've measured. You have to substract it. So for example 600mV is 0A, and 600mV+60mV = 1A, 600mV+120mV=2A etc.

There is also 68 mV noise, but it should be easily reduced with some filtering.

Notice that this part is no longer in production. From datasheet, it has good linearity (2.8% over full range), and 60mV/A sensitivity.

The datasheet gives an offset of 600mV as you've measured. You have to substract it. So for example 600mV is 0A, and 600mV+60mV = 1A, 600mV+120mV=2A etc.

There is also 68 mV noise, but it should be easily reduced with some filtering.

Year, the 600 mv offset is no problem at all - the problem was, that it couldn't measure 0-6 A. The capacitor removed the ripple from the ESC, but the current sensor wasn't too happy about the large capacitance. A normal lowpass-filter with a low capacitance works better .

If I make another one I will consider a diode with a little higher voltage drop and much lower R2 value. Might also add the capacitor as well.

R2 is 220 ohm (Written in schematic, but not very clearly). The value is not very important, you can try a few different and pick the value/brightness you prefere.
C1 is 0.1 uF, but other values should work fine. I actually tried something like 25 uF capacitor which worked without problems (but not recommended )