Fix: CAN message transmitted filled of zero.
authorRomain Forlot <romain.forlot@iot.bzh>
Tue, 16 May 2017 10:42:35 +0000 (12:42 +0200)
committerRomain Forlot <romain.forlot@iot.bzh>
Fri, 19 May 2017 09:36:43 +0000 (11:36 +0200)
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>
CAN-binder/low-can-binding/diagnostic/diagnostic-manager.cpp

index 7539634..eb9a344 100644 (file)
@@ -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;