Copter: make mavlink rangefinder health bit depend just on data available

This means the sensor is healthy even if it is out of range.

This is a partial revert of commit 724f34c7e7 (diff-577a72d2550199fabbdfd77fa5890368R408)
This commit is contained in:
Peter Barker 2018-11-08 12:53:44 +11:00 committed by Randy Mackay
parent 24ba876e88
commit 176ee507a2
1 changed files with 1 additions and 1 deletions

View File

@ -397,7 +397,7 @@ void Copter::update_sensor_status_flags(void)
#if RANGEFINDER_ENABLED == ENABLED
if (rangefinder_state.enabled) {
control_sensors_enabled |= MAV_SYS_STATUS_SENSOR_LASER_POSITION;
if (!rangefinder_state.alt_healthy) {
if (!rangefinder.has_data_orient(ROTATION_PITCH_270)) {
control_sensors_health &= ~MAV_SYS_STATUS_SENSOR_LASER_POSITION;
}
}