aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding/can
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2019-12-03 17:17:07 -0500
committerRomain Forlot <romain.forlot@iot.bzh>2019-12-05 08:17:15 +0000
commit4780c23547407f6bafb7e14fb70aaeeca0a1257d (patch)
tree77ae5857011f58247709801923d6766921c1f81d /low-can-binding/can
parent6af1b5e243df2333a9ecdedf9c9ba23a3619de58 (diff)
Fix filter bitmask generation
Fix filter bitmask generation in encoder_t::encode_data; the mask bits need to be left-aligned in each byte, not right-aligned. Bug-AGL: SPEC-3013 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ie084f81e3d8c06e69b5bb7562055187395099ac7
Diffstat (limited to 'low-can-binding/can')
-rw-r--r--low-can-binding/can/can-encoder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/low-can-binding/can/can-encoder.cpp b/low-can-binding/can/can-encoder.cpp
index 37a7b246..2d836cf9 100644
--- a/low-can-binding/can/can-encoder.cpp
+++ b/low-can-binding/can/can-encoder.cpp
@@ -93,7 +93,7 @@ void encoder_t::encode_data(std::shared_ptr<signal_t> sig, std::vector<uint8_t>
int j=0;
for(int i=0;i<new_bit_size;i++)
{
- int mask = 1 << ((i%8)+new_start_bit);
+ int mask = 0x80 >> ((i%8)+new_start_bit);
uint8_t mask_v = 0;
if(mask > 255)