AP_Airspeed: add and use instance number to ARSP message

This commit is contained in:
Peter Barker 2020-11-19 09:52:48 +11:00 committed by Peter Barker
parent c291107f50
commit 8647dda8a9

View File

@ -574,9 +574,10 @@ void AP_Airspeed::Log_Airspeed()
if (!get_temperature(i, temperature)) {
temperature = 0;
}
struct log_AIRSPEED pkt = {
LOG_PACKET_HEADER_INIT(i==0?LOG_ARSP_MSG:LOG_ASP2_MSG),
const struct log_ARSP pkt{
LOG_PACKET_HEADER_INIT(LOG_ARSP_MSG),
time_us : now,
instance : i,
airspeed : get_raw_airspeed(i),
diffpressure : get_differential_pressure(i),
temperature : (int16_t)(temperature * 100.0f),