GCS_MAVLink: remove check for max BARO instances

For all supported boards we allow more than 1 baro instance.
This commit is contained in:
Lucas De Marchi 2015-10-14 12:57:21 -03:00 committed by Andrew Tridgell
parent d83609b24c
commit 36150348bb
1 changed files with 2 additions and 4 deletions

View File

@ -1121,7 +1121,7 @@ void GCS_MAVLINK::send_scaled_pressure(AP_Baro &barometer)
pressure*0.01f, // hectopascal
(pressure - barometer.get_ground_pressure(0))*0.01f, // hectopascal
barometer.get_temperature(0)*100); // 0.01 degrees C
#if BARO_MAX_INSTANCES > 1
if (barometer.num_instances() > 1) {
pressure = barometer.get_pressure(1);
mavlink_msg_scaled_pressure2_send(
@ -1131,8 +1131,7 @@ void GCS_MAVLINK::send_scaled_pressure(AP_Baro &barometer)
(pressure - barometer.get_ground_pressure(1))*0.01f, // hectopascal
barometer.get_temperature(1)*100); // 0.01 degrees C
}
#endif
#if BARO_MAX_INSTANCES > 2
if (barometer.num_instances() > 2) {
pressure = barometer.get_pressure(2);
mavlink_msg_scaled_pressure3_send(
@ -1142,7 +1141,6 @@ void GCS_MAVLINK::send_scaled_pressure(AP_Baro &barometer)
(pressure - barometer.get_ground_pressure(2))*0.01f, // hectopascal
barometer.get_temperature(2)*100); // 0.01 degrees C
}
#endif
}
void GCS_MAVLINK::send_sensor_offsets(const AP_InertialSensor &ins, const Compass &compass, AP_Baro &barometer)