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 296132b876
commit 7a0b9632cd
1 changed files with 1 additions and 1 deletions

View File

@ -405,7 +405,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;
}
}