Copter: remove pre-arm check for rally points

This commit is contained in:
Francisco Ferreira 2016-07-20 00:05:08 +01:00 committed by Randy Mackay
parent 25fefe77b7
commit 90a4b36263
2 changed files with 0 additions and 36 deletions

View File

@ -923,7 +923,6 @@ private:
void pre_arm_rc_checks();
bool pre_arm_gps_checks(bool display_failure);
bool pre_arm_ekf_attitude_check();
bool pre_arm_rallypoint_check();
bool pre_arm_terrain_check(bool display_failure);
bool arm_checks(bool display_failure, bool arming_from_gcs);
void init_disarm_motors();

View File

@ -174,14 +174,6 @@ bool Copter::pre_arm_checks(bool display_failure)
}
#endif
// check rally points
if (!pre_arm_rallypoint_check()) {
if (display_failure) {
gcs_send_text(MAV_SEVERITY_CRITICAL,"PreArm: rallypoints outside fence");
}
return false;
}
// check INS
if ((g.arming_check == ARMING_CHECK_ALL) || (g.arming_check & ARMING_CHECK_INS)) {
// check accelerometers have been calibrated
@ -499,25 +491,6 @@ bool Copter::pre_arm_ekf_attitude_check()
return filt_status.flags.attitude;
}
// check rally points are within fences
bool Copter::pre_arm_rallypoint_check()
{
#if AC_RALLY == ENABLED && AC_FENCE == ENABLED
for (uint8_t i=0; i<rally.get_rally_total(); i++) {
RallyLocation rally_loc;
if (rally.get_rally_point_with_index(i, rally_loc)) {
Location_Class rally_point(rally.rally_location_to_location(rally_loc));
if (!fence.check_destination_within_fence(rally_point)) {
return false;
}
}
}
return true;
#else
return true;
#endif
}
// check we have required terrain data
bool Copter::pre_arm_terrain_check(bool display_failure)
{
@ -677,14 +650,6 @@ bool Copter::arm_checks(bool display_failure, bool arming_from_gcs)
}
#endif
// check rally points
if (!pre_arm_rallypoint_check()) {
if (display_failure) {
gcs_send_text(MAV_SEVERITY_CRITICAL,"Arm: rallypoints outside fence");
}
return false;
}
// check lean angle
if ((g.arming_check == ARMING_CHECK_ALL) || (g.arming_check & ARMING_CHECK_INS)) {
if (degrees(acosf(ahrs.cos_roll()*ahrs.cos_pitch()))*100.0f > aparm.angle_max) {