mirror of https://github.com/Desuuuu/klipper.git
canbus: send 8 bytes in the id response
The last byte contains the "node id" command, which is used to identify the application. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
3505f4cae5
commit
81ff8e125c
|
@ -127,9 +127,10 @@ can_process_query_unassigned(uint32_t id, uint32_t len, uint8_t *data)
|
||||||
uint8_t send[8];
|
uint8_t send[8];
|
||||||
send[0] = CANBUS_RESP_NEED_NODEID;
|
send[0] = CANBUS_RESP_NEED_NODEID;
|
||||||
memcpy(&send[1], canbus_uuid, sizeof(canbus_uuid));
|
memcpy(&send[1], canbus_uuid, sizeof(canbus_uuid));
|
||||||
|
send[7] = CANBUS_CMD_SET_NODEID;
|
||||||
// Send with retry
|
// Send with retry
|
||||||
for (;;) {
|
for (;;) {
|
||||||
int ret = canbus_send(CANBUS_ID_ADMIN_RESP, 7, send);
|
int ret = canbus_send(CANBUS_ID_ADMIN_RESP, 8, send);
|
||||||
if (ret >= 0)
|
if (ret >= 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue