Copter: add pre-arm board voltage check
Copter will not arm unless board voltage is over 4.5V
This commit is contained in:
parent
eba7d6da9a
commit
c3d21a457f
@ -382,6 +382,10 @@
|
||||
# define HIGH_DISCHARGE 1760
|
||||
#endif
|
||||
|
||||
#ifndef BOARD_VOLTAGE_MIN
|
||||
# define BOARD_VOLTAGE_MIN 4500 // min board voltage in milli volts for pre-arm checks
|
||||
#endif
|
||||
|
||||
// Battery failsafe
|
||||
#ifndef FS_BATTERY
|
||||
# define FS_BATTERY DISABLED
|
||||
|
@ -264,6 +264,14 @@ static void pre_arm_checks(bool display_failure)
|
||||
}
|
||||
#endif
|
||||
|
||||
// check board voltage
|
||||
if(board_voltage() < BOARD_VOLTAGE_MIN) {
|
||||
if (display_failure) {
|
||||
gcs_send_text_P(SEVERITY_HIGH,PSTR("PreArm: Low Board Voltage"));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// if we've gotten this far then pre arm checks have completed
|
||||
ap.pre_arm_check = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user