canbus: remove get_node_id() method
This method isn't necessary as the bootloader shouldnt need to discover multiple node ids. Change the decoded node ID offset to 0x200 in an effort to avoid collisions with nodes assigned by Klipper. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
1 file changed
+1
-9
@@ -102,18 +102,10 @@ can_check_uuid(uint32_t id, uint32_t len, uint8_t *data)
|
||||
return len >= 7 && memcmp(&data[1], canbus_uuid, sizeof(canbus_uuid)) == 0;
|
||||
}
|
||||
|
||||
// Helpers to encode/decode a CAN identifier to a 1-byte "nodeid"
|
||||
static int
|
||||
can_get_nodeid(void)
|
||||
{
|
||||
if (!canbus_assigned_id)
|
||||
return 0;
|
||||
return (canbus_assigned_id - 0x100) >> 1;
|
||||
}
|
||||
static uint32_t
|
||||
can_decode_nodeid(int nodeid)
|
||||
{
|
||||
return (nodeid << 1) + 0x100;
|
||||
return (nodeid << 1) + 0x200;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in new issue
Block a user