summaryrefslogtreecommitdiffstats
path: root/low-can-binding/can
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2019-12-03 17:17:07 -0500
committerScott Murray <scott.murray@konsulko.com>2019-12-03 17:17:07 -0500
commit8d3076f85b2d86dda00ff88898951d49c98596c9 (patch)
tree8d48f14b94608d3097eaf6b7e0ab14a8a80a8b15 /low-can-binding/can
parent12e75ea716e1b5054be0228e2859e14a11be622a (diff)
Fix filter bitmask generationhalibut_8.0.4halibut/8.0.48.0.4
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)