diff options
Diffstat (limited to 'low-can-binding/can/can-message.cpp')
-rw-r--r-- | low-can-binding/can/can-message.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/low-can-binding/can/can-message.cpp b/low-can-binding/can/can-message.cpp index 057bc71f..fe66936c 100644 --- a/low-can-binding/can/can-message.cpp +++ b/low-can-binding/can/can-message.cpp @@ -176,7 +176,7 @@ void can_message_t::set_format(const can_message_format_t new_format) if(new_format == can_message_format_t::STANDARD || new_format == can_message_format_t::EXTENDED || new_format == can_message_format_t::INVALID) format_ = new_format; else - ERROR("Can set format, wrong format chosen"); + AFB_ERROR("Can set format, wrong format chosen"); } /// @brief Take a canfd_frame struct to initialize class members @@ -198,15 +198,15 @@ can_message_t can_message_t::convert_from_frame(const struct canfd_frame& frame, switch(nbytes) { case CANFD_MTU: - DEBUG("Got an CAN FD frame"); + AFB_DEBUG("Got an CAN FD frame"); maxdlen = CANFD_MAX_DLEN; break; case CAN_MTU: - DEBUG("Got a legacy CAN frame"); + AFB_DEBUG("Got a legacy CAN frame"); maxdlen = CAN_MAX_DLEN; break; default: - ERROR("unsupported CAN frame"); + AFB_ERROR("unsupported CAN frame"); break; } @@ -260,7 +260,7 @@ can_message_t can_message_t::convert_from_frame(const struct canfd_frame& frame, data.push_back(frame.data[i]); }; - DEBUG("Found id: %X, format: %X, length: %X, data %02X%02X%02X%02X%02X%02X%02X%02X", + AFB_DEBUG("Found id: %X, format: %X, length: %X, data %02X%02X%02X%02X%02X%02X%02X%02X", id, (uint8_t)format, length, data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]); } @@ -285,12 +285,12 @@ can_message_t can_message_t::convert_from_frame(const struct can_frame& frame, s if(nbytes <= CAN_MTU) { - DEBUG("Got a legacy CAN frame"); + AFB_DEBUG("Got a legacy CAN frame"); maxdlen = CAN_MAX_DLEN; } else { - ERROR("unsupported CAN frame"); + AFB_ERROR("unsupported CAN frame"); } if (frame.can_id & CAN_ERR_FLAG) @@ -339,7 +339,7 @@ can_message_t can_message_t::convert_from_frame(const struct can_frame& frame, s data.push_back(frame.data[i]); }; -// DEBUG("Found id: %X, format: %X, length: %X, data %02X%02X%02X%02X%02X%02X%02X%02X", +// AFB_DEBUG("Found id: %X, format: %X, length: %X, data %02X%02X%02X%02X%02X%02X%02X%02X", // id, (uint8_t)format, length, data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]); } @@ -362,7 +362,7 @@ struct canfd_frame can_message_t::convert_to_canfd_frame() ::memcpy(frame.data, get_data(), length_); } else - ERROR("can_message_t not correctly initialized to be sent"); + AFB_ERROR("can_message_t not correctly initialized to be sent"); return frame; } @@ -383,7 +383,7 @@ struct can_frame can_message_t::convert_to_can_frame() ::memcpy(frame.data, get_data(), length_); } else - ERROR("can_message_t not correctly initialized to be sent"); + AFB_ERROR("can_message_t not correctly initialized to be sent"); return frame; } |