Skip to content

Commit

Permalink
Merge pull request #22 from yoziru/fix-debug-logging
Browse files Browse the repository at this point in the history
fix debug logging
  • Loading branch information
yoziru authored Jul 25, 2024
2 parents 45eca61 + 4a82202 commit be719be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/zehnder_comfoair_q/zehnder_comfoair_q.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ namespace zehnder_comfoair_q

void ZehnderComfoAirQ::send_can_message_(uint32_t can_id, bool remote_transmission_request, const std::vector<uint8_t> &data)
{
ESP_LOGD(TAG, "Send can message: id: 0x%08x (pdo_id: %d), rtr: %d, size: %d, content: %s", can_id, can_id >> 14,
ESP_LOGD(TAG, "Send can message: id: 0x%08lx (pdo_id: %ld), rtr: %d, size: %d, content: %s", can_id, can_id >> 14,
remote_transmission_request, data.size(), format_hex_pretty(data).c_str());

if (parent_ == nullptr)
Expand Down
8 changes: 6 additions & 2 deletions packages/canbus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ canbus:
- lambda: |-
auto data_pretty = remote_transmission_request ? "n/a" : format_hex_pretty(x).c_str();
if ((can_id & 0b11111000000000011111111000000) == 0b00000000000000000000001000000)
ESP_LOGD("comfoair_dump", "Node: %d, PDO: %d, rtr: %d, length: %d, content: %s (can_id: 0x%08x)", can_id & 0x3f, can_id >> 14, remote_transmission_request, x.size(), data_pretty, can_id);
{
ESP_LOGD("comfoair_dump", "Node: %ld, PDO: %ld, rtr: %d, length: %d, content: %s (can_id: 0x%08lx)", can_id & 0x3f, can_id >> 14, remote_transmission_request, x.size(), data_pretty, can_id);
}
else
ESP_LOGV("comfoair_dump", "can_id: 0x%08x, rtr: %d, length: %d, content: %s", can_id, remote_transmission_request, x.size(), data_pretty);
{
ESP_LOGV("comfoair_dump", "can_id: 0x%08lx, rtr: %d, length: %d, content: %s", can_id, remote_transmission_request, x.size(), data_pretty);
}
- can_id: 0b00000000000000000000001000000
can_id_mask: 0b11111000000000011111111000000
use_extended_id: true
Expand Down

0 comments on commit be719be

Please sign in to comment.