aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding/utils
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-11-06 09:46:31 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2019-11-06 09:46:31 +0100
commitbd8c71dd8eb67e0f043636bedab9ad3b0cc8109f (patch)
tree00245ecb001492ffdeae1063589ae7708fe1737e /low-can-binding/utils
parente2faa2a60da4fddcd966fa04a77d995c0bcbfa71 (diff)
converter: decoder: use appropriate int types
Change-Id: I7e977647b23ecd5be1f58486af857e3b7132b48f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/utils')
-rw-r--r--low-can-binding/utils/converter.cpp2
-rw-r--r--low-can-binding/utils/converter.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/low-can-binding/utils/converter.cpp b/low-can-binding/utils/converter.cpp
index d10888d0..e3db7f33 100644
--- a/low-can-binding/utils/converter.cpp
+++ b/low-can-binding/utils/converter.cpp
@@ -48,7 +48,7 @@ std::string converter_t::to_hex(const uint8_t data[], const size_t length)
* @param new_start_bit The first bit of the signal in the frame
* @param new_end_bit The last bit of the signal in the frame
*/
-void converter_t::signal_to_bits_bytes(uint32_t bit_position, uint32_t bit_size, int &new_start_byte, int &new_end_byte, int &new_start_bit, int &new_end_bit)
+void converter_t::signal_to_bits_bytes(uint32_t bit_position, uint32_t bit_size, int &new_start_byte, int &new_end_byte, uint8_t &new_start_bit, uint8_t &new_end_bit)
{
new_start_byte = bit_position >> 3;
new_start_bit = bit_position % 8;
diff --git a/low-can-binding/utils/converter.hpp b/low-can-binding/utils/converter.hpp
index f388fd0a..d24096a6 100644
--- a/low-can-binding/utils/converter.hpp
+++ b/low-can-binding/utils/converter.hpp
@@ -23,5 +23,5 @@ class converter_t
{
public:
static std::string to_hex(const uint8_t data[], const size_t length);
- static void signal_to_bits_bytes(uint32_t bit_position, uint32_t bit_size, int &new_start_byte, int &new_end_byte, int &new_start_bit, int &new_end_bit);
+ static void signal_to_bits_bytes(uint32_t bit_position, uint32_t bit_size, int &new_start_byte, int &new_end_byte, uint8_t &new_start_bit, uint8_t &new_end_bit);
};