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 <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2022-05-10 11:53:49 -04:00
parent be4b8b17f2
commit 2c441b4502
1 changed files with 5 additions and 5 deletions

View File

@ -90,7 +90,7 @@ console_sendf(const struct command_encoder *ce, va_list args)
// Available commands and responses // Available commands and responses
#define CANBUS_CMD_QUERY_UNASSIGNED 0x00 #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_CMD_REQUEST_BOOTLOADER 0x02
#define CANBUS_RESP_NEED_NODEID 0x20 #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]; 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[7] = CANBUS_CMD_SET_KLIPPER_NODEID;
// Send with retry // Send with retry
for (;;) { for (;;) {
int ret = canbus_send(CANBUS_ID_ADMIN_RESP, 8, send); int ret = canbus_send(CANBUS_ID_ADMIN_RESP, 8, send);
@ -145,7 +145,7 @@ can_id_conflict(void)
} }
static 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) if (len < 8)
return; return;
@ -188,8 +188,8 @@ can_process(uint32_t id, uint32_t len, uint8_t *data)
case CANBUS_CMD_QUERY_UNASSIGNED: case CANBUS_CMD_QUERY_UNASSIGNED:
can_process_query_unassigned(id, len, data); can_process_query_unassigned(id, len, data);
break; break;
case CANBUS_CMD_SET_NODEID: case CANBUS_CMD_SET_KLIPPER_NODEID:
can_process_set_nodeid(id, len, data); can_process_set_klipper_nodeid(id, len, data);
break; break;
case CANBUS_CMD_REQUEST_BOOTLOADER: case CANBUS_CMD_REQUEST_BOOTLOADER:
can_process_request_bootloader(id, len, data); can_process_request_bootloader(id, len, data);