Skip to content

Commit

Permalink
execute command switch for async hardware components
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Trampler committed Dec 17, 2024
1 parent 7374c43 commit 98d50c1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions hardware_interface/src/resource_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1649,9 +1649,11 @@ bool ResourceManager::prepare_command_mode_switch(
};

const bool actuators_result = call_prepare_mode_switch(resource_storage_->actuators_);
const bool async_actuators_result = call_prepare_mode_switch(resource_storage_->async_actuators_);
const bool systems_result = call_prepare_mode_switch(resource_storage_->systems_);
const bool async_systems_result = call_prepare_mode_switch(resource_storage_->async_systems_);

return actuators_result && systems_result;
return actuators_result && async_actuators_result && systems_result && async_systems_result;
}

// CM API: Called in "update"-thread
Expand Down Expand Up @@ -1714,9 +1716,11 @@ bool ResourceManager::perform_command_mode_switch(
};

const bool actuators_result = call_perform_mode_switch(resource_storage_->actuators_);
const bool async_actuators_result = call_perform_mode_switch(resource_storage_->async_actuators_);
const bool systems_result = call_perform_mode_switch(resource_storage_->systems_);

return actuators_result && systems_result;
const bool async_systems_result = call_perform_mode_switch(resource_storage_->async_systems_);

return actuators_result && async_actuators_result && systems_result && async_systems_result;
}

// CM API: Called in "callback/slow"-thread
Expand Down

0 comments on commit 98d50c1

Please sign in to comment.