#define MAX_CURRENT   523U

The value is calculatet as: 523 = (140A * 0.001Ohm * (1+ 47k/2.7k) )/5.04V * 2^16 With 140A = max. motor current 0.001Ohm = shunt resistor 1+ 47k/2.7k = OPV (IC2) gain 5.04V = 5VB = AREF 2^16 = ADC range (16 bit resolution)

Definition at line 169 of file global.h.

Referenced by current_Update(), current_UpdateSum(), and mg_RelayControl().