summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-16 12:42:35 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-05-19 11:36:43 +0200
commit242f0f5c08dbf5d80734d64311fcd6ac29852a81 (patch)
tree62381f71a3e0ec908f90530664cb45acd206fd73 /CAN-binder/low-can-binding
parent046af0b8441ff890f644da722507bc77cd3270f7 (diff)
Fix: CAN message transmitted filled of zero.
can_dlc field was set to 0 and is evaluated so BCM assumes there is no data to transmit. It is mandatory to set it. Change-Id: I1e29ff4248a49212d3fee22c3a0cc77f5b699fd7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding')
-rw-r--r--CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp
index 75396342..eb9a3441 100644
--- a/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp
+++ b/CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp
@@ -168,6 +168,7 @@ bool diagnostic_manager_t::shims_send(const uint32_t arbitration_id, const uint8
bcm_msg.msg_head.ival2.tv_sec = freq.tv_sec;
bcm_msg.msg_head.ival2.tv_usec = freq.tv_usec;
bcm_msg.msg_head.nframes = 1;
+ cfd.can_dlc = size;
::memcpy(cfd.data, data, size);
bcm_msg.frames = cfd;