Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in canopen_fake_slaves/include/canopen_fake_slaves /cia402_slave.hpp inside function "run_profile_velocity_mode" #285

Closed
jmflpalera opened this issue Apr 26, 2024 · 0 comments · Fixed by #286
Labels
bug Something isn't working

Comments

@jmflpalera
Copy link

Describe the bug

There is an error inside function run_profile_velocity_mode in header file canopen_fake_slaves/include/canopen_fake_slaves /cia402_slave.hpp.

The line is the next:

std::this_thread::sleep_for(
std::chrono::milliseconds(((int32_t)control_cycle_period_d * 1000)));

The purpose of this line is to sleep 10 ms but control_cycle_period_d is truncated to 0 so sleep is always 0.

Replace with

std::this_thread::sleep_for(
std::chrono::milliseconds(((int32_t)(control_cycle_period_d * 1000.0))));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant