Browse Source

Sub: Disable external baro check for SITL

master
Jacob Walser 8 years ago committed by Randy Mackay
parent
commit
8a24b074f7
  1. 2
      ArduSub/control_althold.cpp
  2. 3
      ArduSub/control_surface.cpp

2
ArduSub/control_althold.cpp

@ -8,10 +8,12 @@ @@ -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

3
ArduSub/control_surface.cpp

@ -3,11 +3,12 @@ @@ -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());

Loading…
Cancel
Save