mirror of
https://github.com/andreili/katapult.git
synced 2025-08-23 19:34:06 +02:00
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:
parent
5ff2ce1c4a
commit
11e96a8f3e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user