diff options
author | Eric Callahan <arksine.code@gmail.com> | 2022-04-25 15:49:35 -0400 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2022-05-10 11:48:06 -0400 |
commit | 81ff8e125c4100ccb86be1dffb1222951cdbac6f (patch) | |
tree | b431977712c3e1f33dbda7a24fca9a6e172aca50 /src/generic/canbus.c | |
parent | 3505f4cae59f4ba17d21fb4d46b3270bfeba9e54 (diff) | |
download | kutter-81ff8e125c4100ccb86be1dffb1222951cdbac6f.tar.gz kutter-81ff8e125c4100ccb86be1dffb1222951cdbac6f.tar.xz kutter-81ff8e125c4100ccb86be1dffb1222951cdbac6f.zip |
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>
Diffstat (limited to 'src/generic/canbus.c')
-rw-r--r-- | src/generic/canbus.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/generic/canbus.c b/src/generic/canbus.c index 230f59ff..dc470c25 100644 --- a/src/generic/canbus.c +++ b/src/generic/canbus.c @@ -127,9 +127,10 @@ can_process_query_unassigned(uint32_t id, uint32_t len, uint8_t *data) uint8_t send[8]; send[0] = CANBUS_RESP_NEED_NODEID; memcpy(&send[1], canbus_uuid, sizeof(canbus_uuid)); + send[7] = CANBUS_CMD_SET_NODEID; // Send with retry for (;;) { - int ret = canbus_send(CANBUS_ID_ADMIN_RESP, 7, send); + int ret = canbus_send(CANBUS_ID_ADMIN_RESP, 8, send); if (ret >= 0) return; } |