We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1f9aaef + 4d44ee2 commit 81ee08aCopy full SHA for 81ee08a
1 file changed
canopen_fake_slaves/include/canopen_fake_slaves/cia402_slave.hpp
@@ -574,6 +574,14 @@ class CIA402MockSlave : public canopen::BasicSlave
574
575
if (old_operation_mode.load() != operation_mode.load())
576
{
577
+ // Clear homing-related/ack bits on mode change so new targets are accepted
578
+ clear_status_bit(SW_Operation_mode_specific0);
579
+ clear_status_bit(SW_Target_reached);
580
+ {
581
+ std::scoped_lock<std::mutex> lock(w_mutex);
582
+ (*this)[0x6041][0] = status_word;
583
+ this->TpdoEvent(1);
584
+ }
585
if (profiled_position_mode.joinable())
586
587
RCLCPP_INFO(rclcpp::get_logger("cia402_slave"), "Joined profiled_position_mode thread.");
0 commit comments