rtlabs-com / c-open

CANopen stack for embedded devices
http://www.rt-labs.com
Other
79 stars 40 forks source link

Accept too long PDOs #22

Closed nattgris closed 4 years ago

nattgris commented 4 years ago

If a received PDO is longer than the mapped objects, the device SHALL consume the mapped part of the payload and MAY transmit an EMCY (CiA 301 7.5.2.36). Current code discards the data and sends an EMCY.

Only abort reception and send EMCY if the PDO length is shorter than the mapped objects, as required. Process the frame normally and skip the EMCY if the PDO is longer.

Fixes: rtlabs-com/c-open#21

nattgris commented 4 years ago

I'll add a test case once I've realized how the test framework works.

hefloryd commented 4 years ago

Merged, thanks!