1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-19 08:15:49 +00:00

[esp32_can] Configurable enqueue timeout (#8453)

This commit is contained in:
Patrick
2025-03-26 05:06:23 +01:00
committed by GitHub
parent bb988604c8
commit 4bb59ce1d1
5 changed files with 44 additions and 2 deletions

View File

@@ -46,7 +46,13 @@ void Canbus::send_data(uint32_t can_id, bool use_extended_id, bool remote_transm
ESP_LOGVV(TAG, " data[%d]=%02x", i, can_message.data[i]);
}
this->send_message(&can_message);
if (this->send_message(&can_message) != canbus::ERROR_OK) {
if (use_extended_id) {
ESP_LOGW(TAG, "send to extended id=0x%08" PRIx32 " failed!", can_id);
} else {
ESP_LOGW(TAG, "send to standard id=0x%03" PRIx32 " failed!", can_id);
}
}
}
void Canbus::add_trigger(CanbusTrigger *trigger) {