forked from Archive/PX4-Autopilot
fix VTOL vehicle_status timestamp (#5252)
* fix VTOL vehicle_status timestamp * run astyle
This commit is contained in:
parent
6ac79aa55f
commit
bbe3525377
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue