mirror of https://github.com/ArduPilot/ardupilot
GCS_MAVLink: remove check for max BARO instances
For all supported boards we allow more than 1 baro instance.
This commit is contained in:
parent
d83609b24c
commit
36150348bb
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue