From 301265a5dab15f8ad70127fcc01b1f5f3260915a Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 19 Nov 2019 16:44:38 +0100 Subject: [PATCH] converter: littles improvements. Change-Id: I9198835b96c66c140f8b1d4167828302b9dc4959 Signed-off-by: Romain Forlot --- low-can-binding/binding/low-can-subscription.cpp | 2 +- low-can-binding/utils/converter.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/low-can-binding/binding/low-can-subscription.cpp b/low-can-binding/binding/low-can-subscription.cpp index 46eced4e..73ca2796 100644 --- a/low-can-binding/binding/low-can-subscription.cpp +++ b/low-can-binding/binding/low-can-subscription.cpp @@ -420,7 +420,7 @@ int low_can_subscription_t::open_socket(low_can_subscription_t &subscription, co else if(flags & J1939_PROTOCOL) { pgn_t pgn = J1939_NO_PGN; - if(subscription.signal_ != nullptr) + if(subscription.signal_) { pgn = subscription.signal_->get_message()->get_id(); std::shared_ptr socket = std::make_shared(); diff --git a/low-can-binding/utils/converter.hpp b/low-can-binding/utils/converter.hpp index cb52f1ac..45233268 100644 --- a/low-can-binding/utils/converter.hpp +++ b/low-can-binding/utils/converter.hpp @@ -23,6 +23,6 @@ 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); static uint32_t bit_position_swap(uint32_t bit_position,uint32_t bit_size); }; -- 2.16.6