Browse Source

AP_ADSB: use correct units (sec) in time since last update for vehicle update

mission-4.1.18
Tom Pittenger 9 years ago
parent
commit
726d1d515e
  1. 3
      libraries/AP_ADSB/AP_ADSB.cpp

3
libraries/AP_ADSB/AP_ADSB.cpp

@ -433,7 +433,7 @@ void AP_ADSB::update_vehicle(const mavlink_message_t* packet) @@ -433,7 +433,7 @@ void AP_ADSB::update_vehicle(const mavlink_message_t* packet)
}
} // if buffer full
vehicle.last_update_ms = AP_HAL::millis() - vehicle.info.tslc;
vehicle.last_update_ms = AP_HAL::millis() - (vehicle.info.tslc * 1000);
push_sample(vehicle); // note that set_vehicle modifies vehicle
}
@ -444,7 +444,6 @@ void AP_ADSB::set_vehicle(const uint16_t index, const adsb_vehicle_t &vehicle) @@ -444,7 +444,6 @@ void AP_ADSB::set_vehicle(const uint16_t index, const adsb_vehicle_t &vehicle)
{
if (index < in_state.list_size) {
in_state.vehicle_list[index] = vehicle;
in_state.vehicle_list[index].last_update_ms = AP_HAL::millis();
}
}

Loading…
Cancel
Save