fix VTOL vehicle_status timestamp (#5252)

* fix VTOL vehicle_status timestamp

* run astyle
This commit is contained in:
Mark Whitehorn 2016-08-05 09:00:12 -06:00 committed by Lorenz Meier
parent 6ac79aa55f
commit bbe3525377
1 changed files with 2 additions and 1 deletions

View File

@ -668,11 +668,12 @@ void VtolAttitudeControl::task_main()
while (!_task_should_exit) {
/*Advertise/Publish vtol vehicle status*/
_vtol_vehicle_status.timestamp = hrt_absolute_time();
if (_vtol_vehicle_status_pub != nullptr) {
orb_publish(ORB_ID(vtol_vehicle_status), _vtol_vehicle_status_pub, &_vtol_vehicle_status);
} else {
_vtol_vehicle_status.timestamp = hrt_absolute_time();
_vtol_vehicle_status_pub = orb_advertise(ORB_ID(vtol_vehicle_status), &_vtol_vehicle_status);
}