Adjust pulse timing for 7.4 V battery
This commit is contained in:
parent
2b341fd39f
commit
063dd4e1fd
|
@ -493,7 +493,7 @@ void ADC1_2_IRQHandler(void)
|
|||
// Use the formula from section 3.6, adjusted for integer arithmetic and
|
||||
// a pulse with in microseconds
|
||||
PulseWidth = (285 * 178 - (int)(1000 * 178 * 0.003135) * (temp - 25))
|
||||
/ (int)((5 * 1.4 - 2.9) * (5 * 1.4 - 2.9));
|
||||
/ (int)((7.4 * 1.2 - 1.8) * (7.4 * 1.2 - 1.8));
|
||||
|
||||
average_counter = 0;
|
||||
average = 0;
|
||||
|
|
Loading…
Reference in a new issue