summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Guyader <arthur.guyader@iot.bzh>2019-12-19 15:43:52 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2020-01-09 16:25:36 +0100
commit8c27aef5cb195d0f62ea715fc9b1be1c5868d496 (patch)
tree40c89f72eeb577728aeb1b9c0ec73ea3a9b2f4e7
parent2dcfd4d0faa9699a4a32af1c39be674dc2856f41 (diff)
converter : Add "0x" for hex data
Change-Id: I9a46b0b87d56a73fb75fafafb0509ca66bb68dd3 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--low-can-binding/utils/converter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/low-can-binding/utils/converter.cpp b/low-can-binding/utils/converter.cpp
index 6c9cedbb..56f3a449 100644
--- a/low-can-binding/utils/converter.cpp
+++ b/low-can-binding/utils/converter.cpp
@@ -32,6 +32,7 @@ std::string converter_t::to_hex(const uint8_t data[], const size_t length)
{
std::stringstream stream;
stream << std::hex << std::setfill('0');
+ stream << "0x";
for(int i = 0; i < length; i++)
stream << std::setfill('0') << std::setw(2) << std::hex << ((int) data[i]);