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

Serial_CAN_Module.cpp timer_s variable set when it shouldn't #7

Open
matspetter opened this issue Sep 22, 2020 · 0 comments
Open

Serial_CAN_Module.cpp timer_s variable set when it shouldn't #7

matspetter opened this issue Sep 22, 2020 · 0 comments

Comments

@matspetter
Copy link

In Serial_CAN_Module.cpp / recv():

In the following lines the return 0 statement will never be reached since time_s is set right before the check.
Probably the timer_s = should be removed since it is also set at the very beginning of recv.

timer_s = millis();
if((millis()-timer_s) > 10)
return 0; // Reading 12 bytes should be faster than 10ms, abort if it takes longer, we loose the partial message in this case

@matspetter matspetter changed the title Serial_CAN_Module.cpp timer_s var set when it shouldn't Serial_CAN_Module.cpp timer_s variable set when it shouldn't Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant