diff --git a/include/myactuator_rmd/protocol/single_motor_message.hpp b/include/myactuator_rmd/protocol/single_motor_message.hpp index da6fccb..0caeafe 100644 --- a/include/myactuator_rmd/protocol/single_motor_message.hpp +++ b/include/myactuator_rmd/protocol/single_motor_message.hpp @@ -12,6 +12,8 @@ #include #include +#include +#include #include "myactuator_rmd/protocol/command_type.hpp" #include "myactuator_rmd/protocol/message.hpp" @@ -49,7 +51,9 @@ namespace myactuator_rmd { constexpr SingleMotorMessage::SingleMotorMessage(std::array const& data) : Message{data} { if (data[0] != C) { - throw ProtocolException("Unexpected response"); + std::stringstream ss {}; + ss << std::showbase << std::hex << static_cast(data[0]); + throw ProtocolException("Unexpected response '" + ss.str() + "'"); } return; }