aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding/binding/low-can-subscription.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-12-04 17:56:16 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2020-01-09 15:55:03 +0100
commitfad26418db56cf029d0b32f1fcc1309c545dac96 (patch)
tree363c09f9b709b179b87360ffc1c9f6529f7ff177 /low-can-binding/binding/low-can-subscription.cpp
parent92a9d02e999eb72ff08fa0fea375553dbb76a4e6 (diff)
all: format
Remove unecessary brackets and replace if possible if...else by ternary operator. Bug-AGL: SPEC-2991 Change-Id: Ibe46b83dea976e050b9cd9eb7ee7ab2c33b63905 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/binding/low-can-subscription.cpp')
-rw-r--r--low-can-binding/binding/low-can-subscription.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/low-can-binding/binding/low-can-subscription.cpp b/low-can-binding/binding/low-can-subscription.cpp
index 05367b79..0f1d1da7 100644
--- a/low-can-binding/binding/low-can-subscription.cpp
+++ b/low-can-binding/binding/low-can-subscription.cpp
@@ -648,7 +648,6 @@ int low_can_subscription_t::create_rx_filter(std::shared_ptr<diagnostic_message_
diagnostic_message_.push_back(sig);
struct timeval freq = frequency_clock_t(event_filter_.frequency).get_timeval_from_period();
- //struct timeval timeout = frequency_clock_t(10).get_timeval_from_period();
struct timeval timeout = {0, 0};
struct bcm_msg bcm_msg = make_bcm_head(RX_SETUP, OBD2_FUNCTIONAL_BROADCAST_ID, SETTIMER | RX_NO_AUTOTIMER | RX_FILTER_ID, timeout, freq);
@@ -669,13 +668,11 @@ int low_can_subscription_t::create_rx_filter_bcm(low_can_subscription_t &subscri
if(subscription.open_socket(subscription, "", CAN_PROTOCOL) < 0)
return -1;
- // If it's not an OBD2 CAN ID then just add a simple RX_SETUP job
- // else monitor all standard 8 CAN OBD2 ID response.
-
can_message_t msg = can_message_t();
-
msg.set_bcm_msg(bcm_msg);
+ // If it's not an OBD2 CAN ID then just add a simple RX_SETUP job
+ // else monitor all standard 8 CAN OBD2 ID response.
if(bcm_msg.msg_head.can_id != OBD2_FUNCTIONAL_BROADCAST_ID)
{
subscription.socket_->write_message(msg);
@@ -714,8 +711,6 @@ int low_can_subscription_t::tx_send(low_can_subscription_t &subscription, messag
struct bcm_msg &bcm_cm = cm->get_bcm_msg();
-
-
if(cfd_vect.size() > 1)
{
AFB_ERROR("Multi frame BCM not implemented");