Code Review
/
apps
/
agl-service-can-low-level.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
6af1b5e
)
Fix filter bitmask generation
78/23178/2
author
Scott Murray
<scott.murray@konsulko.com>
Tue, 3 Dec 2019 22:17:07 +0000
(17:17 -0500)
committer
Romain Forlot
<romain.forlot@iot.bzh>
Thu, 5 Dec 2019 08:17:15 +0000
(08:17 +0000)
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
low-can-binding/can/can-encoder.cpp
patch
|
blob
|
history
diff --git
a/low-can-binding/can/can-encoder.cpp
b/low-can-binding/can/can-encoder.cpp
index
37a7b24
..
2d836cf
100644
(file)
--- 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)