File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/modm/platform/can/socketcan Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 33 * Copyright (c) 2017, Fabian Greif
44 * Copyright (c) 2017, Niklas Hauser
55 * Copyright (c) 2023, Christopher Durand
6+ * Copyright (c) 2024, Michael Jossen
67 *
78 * This file is part of the modm project.
89 *
@@ -125,10 +126,10 @@ modm::platform::SocketCan::getMessage(can::Message& message)
125126 if (nbytes > 0 )
126127 {
127128 message.identifier = frame.can_id ;
128- message.setDataLengthCode (frame.can_dlc );
129+ message.setLength (frame.len );
129130 message.setExtended (frame.can_id & CAN_EFF_FLAG);
130131 message.setRemoteTransmitRequest (frame.can_id & CAN_RTR_FLAG);
131- for (uint8_t ii = 0 ; ii < frame.can_dlc ; ++ii) {
132+ for (uint8_t ii = 0 ; ii < frame.len ; ++ii) {
132133 message.data [ii] = frame.data [ii];
133134 }
134135 return true ;
@@ -149,7 +150,7 @@ modm::platform::SocketCan::sendMessage(const can::Message& message)
149150 frame.can_id |= CAN_RTR_FLAG;
150151 }
151152
152- frame.can_dlc = message.getLength ();
153+ frame.len = message.getLength ();
153154
154155 for (uint8_t ii = 0 ; ii < message.getLength (); ++ii) {
155156 frame.data [ii] = message.data [ii];
You can’t perform that action at this time.
0 commit comments