summaryrefslogtreecommitdiffstats
path: root/low-can-binding/can/can-encoder.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-11-05 19:33:29 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2020-01-08 00:17:29 +0100
commit64691cf96f9c4d7ff59dbd49e1fe01d26c1a00f6 (patch)
tree6e32fa6d9574223d5560508c76ce31d50bc42a14 /low-can-binding/can/can-encoder.cpp
parent3fb6ac3c3670499bee4ce02ff7813739017e8b8f (diff)
all: Format one line 'if' or 'for' statement.
Bug-AGL: SPEC-2988 Change-Id: Ic3b9670a2ce9e982220c54f3632f690ee4eea686 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/can/can-encoder.cpp')
-rw-r--r--low-can-binding/can/can-encoder.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/low-can-binding/can/can-encoder.cpp b/low-can-binding/can/can-encoder.cpp
index 2d836cf9..fb68b879 100644
--- a/low-can-binding/can/can-encoder.cpp
+++ b/low-can-binding/can/can-encoder.cpp
@@ -37,10 +37,10 @@ void encoder_t::encode_data(std::shared_ptr<signal_t> sig, std::vector<uint8_t>
uint32_t bit_position = sig->get_bit_position();
int new_start_byte = 0;
int new_end_byte = 0;
- int new_start_bit_tmp = 0;
- int new_end_bit = 0;
+ uint8_t new_start_bit = 0;
+ uint8_t new_end_bit = 0;
- converter_t::signal_to_bits_bytes(bit_position, bit_size, new_start_byte, new_end_byte, new_start_bit_tmp, new_end_bit);
+ converter_t::signal_to_bits_bytes(bit_position, bit_size, new_start_byte, new_end_byte, new_start_bit, new_end_bit);
int len_signal_bytes_tmp = new_end_byte - new_start_byte + 1;
@@ -53,17 +53,12 @@ void encoder_t::encode_data(std::shared_ptr<signal_t> sig, std::vector<uint8_t>
{
len_signal_bytes = (uint8_t) len_signal_bytes_tmp;
}
-
- uint8_t new_start_bit = 0;
- if(new_start_bit_tmp > 255)
+/*
+ if(new_start_bit > 255)
{
AFB_ERROR("Error signal %s too long",sig->get_name().c_str());
}
- else
- {
- new_start_bit = (uint8_t) new_start_bit_tmp;
- }
-
+*/
uint8_t new_bit_size = 0;
if(bit_size > 255)
{