You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My interpretation of this code is that should the if statement evaluate to false the corresponding return won't be called, and the program will erroneously move onto the next case statement. Each case statement should end with a break;.
No the code works as intended, it needs to drop through
It checks N data bytes (where N is 1-8 as set by the PDO length) to see if
the the value has changed compare to the cached value and the COS flag is
set for that byte. If any byte has changed AND has a COS flag the entire
PDO must be transmitted. As soon as it has a match it returns 1, if it does
not match it checks the next byte in the PDO until all bytes are checked,
The switch just lets it jump into the correct starting N.
Regards
Robin
My interpretation of this code is that should the if statement evaluate to false the corresponding return won't be called, and the program will erroneously move onto the next case statement. Each case statement should end with a break;.
CANopenNode/stack/CO_PDO.c
Lines 843 to 850 in 5338015
The text was updated successfully, but these errors were encountered: