Skip to content

Commit 9aeced2

Browse files
committed
autosync
1 parent 26177a0 commit 9aeced2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ODriveCAN.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class ODriveCAN {
277277
if (!awaitMsg(timeout_ms)) return T{};
278278

279279
T ret{};
280-
memcpy(&ret, buffer_[4], sizeof(T));
280+
memcpy(&ret, &buffer_[4], sizeof(T));
281281
return ret;
282282
}
283283

@@ -301,7 +301,7 @@ class ODriveCAN {
301301
data[2] = (endpoint_id >> 8) & 0xFF;
302302

303303
// Value to write
304-
mempcy(&data[4], &value, sizeof(T));
304+
memcpy(&data[4], &value, sizeof(T));
305305

306306
can_intf_.sendMsg((node_id_ << ODriveCAN::kNodeIdShift) | 0x004, 8, data);
307307
return true;

0 commit comments

Comments
 (0)