mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 17:13:34 +08:00
uORB::DeviceNode replace SubscriptionData with uORB::SubscriptionInterval
This commit is contained in:
@@ -45,11 +45,6 @@ bool FlightTaskOffboard::updateInitialize()
|
||||
{
|
||||
bool ret = FlightTask::updateInitialize();
|
||||
|
||||
_sub_triplet_setpoint.update();
|
||||
|
||||
// require a valid triplet
|
||||
ret = ret && _sub_triplet_setpoint.get().current.valid;
|
||||
|
||||
// require valid position / velocity in xy
|
||||
return ret && PX4_ISFINITE(_position(0))
|
||||
&& PX4_ISFINITE(_position(1))
|
||||
@@ -73,6 +68,8 @@ bool FlightTaskOffboard::update()
|
||||
// reset setpoint for every loop
|
||||
_resetSetpoints();
|
||||
|
||||
_sub_triplet_setpoint.update();
|
||||
|
||||
if (!_sub_triplet_setpoint.get().current.valid) {
|
||||
_setDefaultConstraints();
|
||||
_position_setpoint = _position;
|
||||
|
||||
Reference in New Issue
Block a user