mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-02 05:58:30 -04:00
fix scale error
This commit is contained in:
parent
3b93418d67
commit
b94c80059b
@ -110,7 +110,7 @@ static void read_battery(void)
|
|||||||
battery_voltage1 = BATTERY_VOLTAGE(analogRead(BATTERY_PIN_1)) * .1 + battery_voltage1 * .9;
|
battery_voltage1 = BATTERY_VOLTAGE(analogRead(BATTERY_PIN_1)) * .1 + battery_voltage1 * .9;
|
||||||
if(g.battery_monitoring == 4) {
|
if(g.battery_monitoring == 4) {
|
||||||
current_amps1 = CURRENT_AMPS(analogRead(CURRENT_PIN_1)) * .1 + current_amps1 * .9; //reads power sensor current pin
|
current_amps1 = CURRENT_AMPS(analogRead(CURRENT_PIN_1)) * .1 + current_amps1 * .9; //reads power sensor current pin
|
||||||
current_total1 += current_amps1 * 0.0002778; // .0002778 is 1/3600 (conversion to hours)
|
current_total1 += current_amps1 * 0.02778; // called at 100ms on average, .0002778 is 1/3600 (conversion to hours)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if BATTERY_EVENT == 1
|
#if BATTERY_EVENT == 1
|
||||||
|
Loading…
Reference in New Issue
Block a user