diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2019-11-29 15:42:55 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2019-12-03 19:46:26 +0100 |
commit | f2ba29a69543a88199b7a664459980ada9345c03 (patch) | |
tree | bf96787bc91af364c7926ce5244d2b13934e6ec4 | |
parent | 00b0c2cc66ee0e5e6c91f2851e1e5b9d815409ef (diff) |
all: format typo
Change-Id: I81c01a817cd31d577068350d8445a1df2751bff7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r-- | low-can-binding/binding/low-can-hat.cpp | 4 | ||||
-rw-r--r-- | low-can-binding/can/can-bus.cpp | 2 | ||||
-rw-r--r-- | low-can-binding/can/message-definition.cpp | 2 | ||||
-rw-r--r-- | low-can-binding/utils/converter.cpp | 6 | ||||
-rw-r--r-- | low-can-binding/utils/socketcan-j1939/socketcan-j1939.cpp | 2 |
5 files changed, 7 insertions, 9 deletions
diff --git a/low-can-binding/binding/low-can-hat.cpp b/low-can-binding/binding/low-can-hat.cpp index 5a268745..7e0d94a4 100644 --- a/low-can-binding/binding/low-can-hat.cpp +++ b/low-can-binding/binding/low-can-hat.cpp @@ -71,7 +71,9 @@ int read_message(sd_event_source *event_source, int fd, uint32_t revents, void * std::shared_ptr<message_t> message = s->read_message(); // Sure we got a valid CAN message ? - if (message->get_id() && message->get_length() && !(message->get_flags() & INVALID_FLAG)) + if (message->get_id() && + message->get_length() && + ! (message->get_flags() & INVALID_FLAG) ) push_n_notify(message); } } diff --git a/low-can-binding/can/can-bus.cpp b/low-can-binding/can/can-bus.cpp index cbe3cda7..0510998b 100644 --- a/low-can-binding/can/can-bus.cpp +++ b/low-can-binding/can/can-bus.cpp @@ -181,9 +181,7 @@ void can_bus_t::can_decode_message() std::lock_guard<std::mutex> subscribed_signals_lock(sm.get_subscribed_signals_mutex()); map_subscription& s = sm.get_subscribed_signals(); if(application_t::instance().get_diagnostic_manager().is_diagnostic_response(message)) - { process_diagnostic_signals(application_t::instance().get_diagnostic_manager(), message, s); - } else process_signals(message, s); } diff --git a/low-can-binding/can/message-definition.cpp b/low-can-binding/can/message-definition.cpp index e6fd862f..5977fb49 100644 --- a/low-can-binding/can/message-definition.cpp +++ b/low-can-binding/can/message-definition.cpp @@ -87,7 +87,7 @@ bool message_definition_t::is_j1939() const bool message_definition_t::is_isotp() const { - return (flags_&ISOTP_PROTOCOL); + return (flags_ & ISOTP_PROTOCOL); } vect_ptr_signal_t& message_definition_t::get_signals() diff --git a/low-can-binding/utils/converter.cpp b/low-can-binding/utils/converter.cpp index 1d7abde7..0a09125f 100644 --- a/low-can-binding/utils/converter.cpp +++ b/low-can-binding/utils/converter.cpp @@ -58,12 +58,12 @@ void converter_t::signal_to_bits_bytes(unsigned int bit_position, unsigned int b /** - * @brief This is to use when you have a big endian CAN frame layout. - * It converts the bit position so it matches with little endiant CAN frame layout. + * @brief This is to use when you have a big endian CAN frame layout. + * It converts the bit position so it matches with little endiant CAN frame layout. * * @param bit_position Original bit position. * @param bit_size Size of the data. - * @return uint32_t New little endian bit position. + * @return uint32_t New bit position. */ uint32_t converter_t::bit_position_swap(uint32_t bit_position,uint32_t bit_size) { diff --git a/low-can-binding/utils/socketcan-j1939/socketcan-j1939.cpp b/low-can-binding/utils/socketcan-j1939/socketcan-j1939.cpp index 000999ff..3b2f24ad 100644 --- a/low-can-binding/utils/socketcan-j1939/socketcan-j1939.cpp +++ b/low-can-binding/utils/socketcan-j1939/socketcan-j1939.cpp @@ -212,8 +212,6 @@ namespace utils if(nbytes < 0) return nullptr; - //AFB_DEBUG("Data available: %i bytes read", (int)nbytes); - struct timeval tv; ioctl(socket(), SIOCGSTAMP, &tv); uint64_t timestamp = 1000000 * tv.tv_sec + tv.tv_usec; |