mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 08:13:56 -04:00
Sub: Disable external baro check for SITL
This commit is contained in:
parent
15a7f7742f
commit
8a24b074f7
@ -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,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…
Reference in New Issue
Block a user