From ed59d33f68233f6a73dee8e60634f10fb5a23920 Mon Sep 17 00:00:00 2001 From: Patrick Rohner Date: Thu, 25 Mar 2021 08:34:22 +0100 Subject: [PATCH] Send full 8 byte of SDO message or full 4 byte of data according to CiA301 specification --- sdo/download.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdo/download.go b/sdo/download.go index 4e05591..2db6098 100644 --- a/sdo/download.go +++ b/sdo/download.go @@ -56,6 +56,11 @@ func (download Download) Do(bus *can.Bus) error { download.ObjectIndex.SubIndex, } + // CiA301 Standard expects all bytes to be sent + for len(data) < 4 { + data = append(data, 0x0) + } + // Initiate frame := canopen.Frame{ CobID: download.RequestCobID,