Skip to content

Commit

Permalink
fix int sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrk-its committed Dec 1, 2024
1 parent bcea227 commit a0a44c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/canbus_udp_multicast/canbus_udp_multicast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,22 @@ bool CanbusUdpMulticast::decode_can_frame(uint8_t *buffer, size_t len, struct ca
if (cmp_read_map(&cmp, &map_size)) {
int32_t num;

ESP_LOGV(TAG, "map_size: %d", map_size);
ESP_LOGV(TAG, "map_size: %u", map_size);
char key[33];
for (n = 0; n < map_size; n++) {
uint32_t size = 32;
if (cmp_read_str(&cmp, key, &size)) {
ESP_LOGV(TAG, "key: %s", key);
if (!strncmp(key, "arbi", 4)) {
if (cmp_read_int(&cmp, (int32_t *) &frame->can_id)) {
ESP_LOGV(TAG, " %s: %ld", key, frame->can_id);
ESP_LOGV(TAG, " %s: %u", key, frame->can_id);
} else
break;
} else if (!strncmp(key, "data", 4)) {
uint32_t size = 64;
if (cmp_read_bin(&cmp, frame->data, &size)) {
data_size = size;
ESP_LOGV(TAG, " data size: %ld", size);
ESP_LOGV(TAG, " data size: %u", size);
} else
break;
} else if (!strcmp(key, "is_extended_id")) {
Expand Down

0 comments on commit a0a44c3

Please sign in to comment.