Skip to content

Commit

Permalink
autosync
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jun 25, 2024
1 parent 26177a0 commit 9aeced2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ODriveCAN.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class ODriveCAN {
if (!awaitMsg(timeout_ms)) return T{};

T ret{};
memcpy(&ret, buffer_[4], sizeof(T));
memcpy(&ret, &buffer_[4], sizeof(T));
return ret;
}

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

// Value to write
mempcy(&data[4], &value, sizeof(T));
memcpy(&data[4], &value, sizeof(T));

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

0 comments on commit 9aeced2

Please sign in to comment.