Sub: Disable external baro check for SITL

This commit is contained in:
Jacob Walser 2017-03-06 13:08:32 -05:00 committed by Randy Mackay
parent 15a7f7742f
commit 8a24b074f7
2 changed files with 4 additions and 1 deletions

View File

@ -8,10 +8,12 @@
// althold_init - initialise althold controller
bool Sub::althold_init(bool ignore_checks)
{
#if CONFIG_HAL_BOARD != HAL_BOARD_SITL
if (!ap.depth_sensor_present) { // can't hold depth without a depth sensor, exit immediately.
gcs_send_text(MAV_SEVERITY_WARNING, "Depth hold requires external pressure sensor.");
return false;
}
#endif
// initialize vertical speeds and leash lengths
// sets the maximum speed up and down returned by position controller

View File

@ -3,11 +3,12 @@
bool Sub::surface_init(bool ignore_checks)
{
#if CONFIG_HAL_BOARD != HAL_BOARD_SITL
if (!ap.depth_sensor_present) { // can't hold depth without a depth sensor, exit immediately.
gcs_send_text(MAV_SEVERITY_WARNING, "Surface mode requires external pressure sensor.");
return false;
}
#endif
// initialize vertical speeds and leash lengths
pos_control.set_speed_z(wp_nav.get_speed_down(), wp_nav.get_speed_up());