ManualControl: correct manual control input subscription name

This commit is contained in:
Matthias Grob 2023-05-09 16:08:24 +02:00
parent 258fc786dc
commit 8dc73c4621
2 changed files with 4 additions and 4 deletions

View File

@ -92,7 +92,7 @@ void ManualControl::Run()
for (int i = 0; i < MAX_MANUAL_INPUT_COUNT; i++) {
manual_control_setpoint_s manual_control_input;
if (_manual_control_setpoint_subs[i].update(&manual_control_input)) {
if (_manual_control_input_subs[i].update(&manual_control_input)) {
_selector.updateWithNewInputSample(now, manual_control_input, i);
}
}
@ -239,11 +239,11 @@ void ManualControl::Run()
if (instance != _previous_manual_control_input_instance) {
if ((0 <= _previous_manual_control_input_instance)
&& (_previous_manual_control_input_instance < MAX_MANUAL_INPUT_COUNT)) {
_manual_control_setpoint_subs[_previous_manual_control_input_instance].unregisterCallback();
_manual_control_input_subs[_previous_manual_control_input_instance].unregisterCallback();
}
if ((0 <= instance) && (instance < MAX_MANUAL_INPUT_COUNT)) {
_manual_control_setpoint_subs[instance].registerCallback();
_manual_control_input_subs[instance].registerCallback();
}
_previous_manual_control_input_instance = instance;

View File

@ -104,7 +104,7 @@ private:
uORB::Subscription _vehicle_status_sub{ORB_ID(vehicle_status)};
int _previous_manual_control_input_instance{-1};
uORB::SubscriptionCallbackWorkItem _manual_control_setpoint_subs[MAX_MANUAL_INPUT_COUNT] {
uORB::SubscriptionCallbackWorkItem _manual_control_input_subs[MAX_MANUAL_INPUT_COUNT] {
{this, ORB_ID(manual_control_input), 0},
{this, ORB_ID(manual_control_input), 1},
{this, ORB_ID(manual_control_input), 2},