mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-30 15:08:16 +08:00
ControlAllocator: only use torque, not thrust sp as callback item
Signed-off-by: Silvan <silvan@auterion.com>
This commit is contained in:
@@ -95,11 +95,6 @@ ControlAllocator::init()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_vehicle_thrust_setpoint_sub.registerCallback()) {
|
|
||||||
PX4_ERR("callback registration failed");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef ENABLE_LOCKSTEP_SCHEDULER // Backup schedule would interfere with lockstep
|
#ifndef ENABLE_LOCKSTEP_SCHEDULER // Backup schedule would interfere with lockstep
|
||||||
ScheduleDelayed(50_ms);
|
ScheduleDelayed(50_ms);
|
||||||
#endif
|
#endif
|
||||||
@@ -309,7 +304,6 @@ ControlAllocator::Run()
|
|||||||
{
|
{
|
||||||
if (should_exit()) {
|
if (should_exit()) {
|
||||||
_vehicle_torque_setpoint_sub.unregisterCallback();
|
_vehicle_torque_setpoint_sub.unregisterCallback();
|
||||||
_vehicle_thrust_setpoint_sub.unregisterCallback();
|
|
||||||
exit_and_cleanup();
|
exit_and_cleanup();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ private:
|
|||||||
|
|
||||||
// Inputs
|
// Inputs
|
||||||
uORB::SubscriptionCallbackWorkItem _vehicle_torque_setpoint_sub{this, ORB_ID(vehicle_torque_setpoint)}; /**< vehicle torque setpoint subscription */
|
uORB::SubscriptionCallbackWorkItem _vehicle_torque_setpoint_sub{this, ORB_ID(vehicle_torque_setpoint)}; /**< vehicle torque setpoint subscription */
|
||||||
uORB::SubscriptionCallbackWorkItem _vehicle_thrust_setpoint_sub{this, ORB_ID(vehicle_thrust_setpoint)}; /**< vehicle thrust setpoint subscription */
|
uORB::Subscription _vehicle_thrust_setpoint_sub{ORB_ID(vehicle_thrust_setpoint)}; /**< vehicle thrust setpoint subscription */
|
||||||
|
|
||||||
uORB::Subscription _vehicle_torque_setpoint1_sub{ORB_ID(vehicle_torque_setpoint), 1}; /**< vehicle torque setpoint subscription (2. instance) */
|
uORB::Subscription _vehicle_torque_setpoint1_sub{ORB_ID(vehicle_torque_setpoint), 1}; /**< vehicle torque setpoint subscription (2. instance) */
|
||||||
uORB::Subscription _vehicle_thrust_setpoint1_sub{ORB_ID(vehicle_thrust_setpoint), 1}; /**< vehicle thrust setpoint subscription (2. instance) */
|
uORB::Subscription _vehicle_thrust_setpoint1_sub{ORB_ID(vehicle_thrust_setpoint), 1}; /**< vehicle thrust setpoint subscription (2. instance) */
|
||||||
|
|||||||
Reference in New Issue
Block a user