mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
Copter: add range finder status to extended status msg
This commit is contained in:
parent
245e46205a
commit
3719ea53e4
@ -245,6 +245,16 @@ static NOINLINE void send_extended_status1(mavlink_channel_t chan)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_SONAR == ENABLED
|
||||
if (sonar.num_sensors() > 0) {
|
||||
control_sensors_present |= MAV_SYS_STATUS_SENSOR_LASER_POSITION;
|
||||
control_sensors_enabled |= MAV_SYS_STATUS_SENSOR_LASER_POSITION;
|
||||
if (sonar.has_data()) {
|
||||
control_sensors_health |= MAV_SYS_STATUS_SENSOR_LASER_POSITION;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!ap.initialised || ins.calibrating()) {
|
||||
// while initialising the gyros and accels are not enabled
|
||||
control_sensors_enabled &= ~(MAV_SYS_STATUS_SENSOR_3D_GYRO | MAV_SYS_STATUS_SENSOR_3D_ACCEL);
|
||||
|
Loading…
Reference in New Issue
Block a user