Skip to content

Commit b8a364a

Browse files
committed
fix logger errors
1 parent 60acfff commit b8a364a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

components/canbus_udp_multicast/canbus_udp_multicast.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,22 @@ bool CanbusUdpMulticast::decode_can_frame(uint8_t *buffer, size_t len, struct ca
7070
if (cmp_read_map(&cmp, &map_size)) {
7171
int32_t num;
7272

73-
ESP_LOGV(TAG, "map_size: %u", map_size);
73+
ESP_LOGV(TAG, "map_size: %lu", map_size);
7474
char key[33];
7575
for (n = 0; n < map_size; n++) {
7676
uint32_t size = 32;
7777
if (cmp_read_str(&cmp, key, &size)) {
7878
ESP_LOGV(TAG, "key: %s", key);
7979
if (!strncmp(key, "arbi", 4)) {
8080
if (cmp_read_int(&cmp, (int32_t *) &frame->can_id)) {
81-
ESP_LOGV(TAG, " %s: %u", key, frame->can_id);
81+
ESP_LOGV(TAG, " %s: %lu", key, frame->can_id);
8282
} else
8383
break;
8484
} else if (!strncmp(key, "data", 4)) {
8585
uint32_t size = 64;
8686
if (cmp_read_bin(&cmp, frame->data, &size)) {
8787
data_size = size;
88-
ESP_LOGV(TAG, " data size: %u", size);
88+
ESP_LOGV(TAG, " data size: %lu", size);
8989
} else
9090
break;
9191
} else if (!strcmp(key, "is_extended_id")) {
@@ -206,7 +206,7 @@ void CanbusUdpMulticast::loop() {
206206

207207
canbus::CanFrame frame;
208208
if (decode_can_frame(udp_recv_buf, 256, &frame)) {
209-
ESP_LOGD(TAG, "decoded frame: can_id: %03x, dlc: %d", frame.can_id, frame.can_data_length_code);
209+
ESP_LOGD(TAG, "decoded frame: can_id: %03lx, dlc: %d", frame.can_id, frame.can_data_length_code);
210210
send_message_no_loopback(&frame);
211211
}
212212

@@ -280,7 +280,7 @@ void CanbusUdpMulticast::send_udp_multicast(uint32_t can_id, bool use_extended_i
280280
if (ret < 0) {
281281
ESP_LOGE(TAG, "Error occurred during sending: errno %d", errno);
282282
} else {
283-
ESP_LOGD(TAG, "sent, can_id: %03x", can_id);
283+
ESP_LOGD(TAG, "sent, can_id: %03lx", can_id);
284284
}
285285
}
286286

0 commit comments

Comments
 (0)