From 2c441b4502c3fb4d5199d1193475b3f2e74cac0a Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 10 May 2022 11:53:49 -0400 Subject: [PATCH] canbus: Rename CANBUS_CMD_SET_NODEID to CANBUS_CMD_SET_KLIPPER_NODEID Rename the command name for consistency with the canbus_query.py script. Signed-off-by: Kevin O'Connor --- src/generic/canbus.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/generic/canbus.c b/src/generic/canbus.c index dc470c25..f1dad27f 100644 --- a/src/generic/canbus.c +++ b/src/generic/canbus.c @@ -90,7 +90,7 @@ console_sendf(const struct command_encoder *ce, va_list args) // Available commands and responses #define CANBUS_CMD_QUERY_UNASSIGNED 0x00 -#define CANBUS_CMD_SET_NODEID 0x01 +#define CANBUS_CMD_SET_KLIPPER_NODEID 0x01 #define CANBUS_CMD_REQUEST_BOOTLOADER 0x02 #define CANBUS_RESP_NEED_NODEID 0x20 @@ -127,7 +127,7 @@ 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[7] = CANBUS_CMD_SET_KLIPPER_NODEID; // Send with retry for (;;) { int ret = canbus_send(CANBUS_ID_ADMIN_RESP, 8, send); @@ -145,7 +145,7 @@ can_id_conflict(void) } static void -can_process_set_nodeid(uint32_t id, uint32_t len, uint8_t *data) +can_process_set_klipper_nodeid(uint32_t id, uint32_t len, uint8_t *data) { if (len < 8) return; @@ -188,8 +188,8 @@ can_process(uint32_t id, uint32_t len, uint8_t *data) case CANBUS_CMD_QUERY_UNASSIGNED: can_process_query_unassigned(id, len, data); break; - case CANBUS_CMD_SET_NODEID: - can_process_set_nodeid(id, len, data); + case CANBUS_CMD_SET_KLIPPER_NODEID: + can_process_set_klipper_nodeid(id, len, data); break; case CANBUS_CMD_REQUEST_BOOTLOADER: can_process_request_bootloader(id, len, data);