Fix handling of large objects in SDO Upload with Complete Access

Change-Id: I64471e2ac1ac1865db43c48fd15b0e1d44651a66
pull/92/head
Lars Danielsson 2020-10-13 09:50:27 +02:00
parent c814d2dacf
commit 48772707a6
3 changed files with 5 additions and 2 deletions

View File

@ -292,7 +292,6 @@
#define APPSTATE_INPUT 0x01 #define APPSTATE_INPUT 0x01
#define APPSTATE_OUTPUT 0x02 #define APPSTATE_OUTPUT 0x02
#define PREALLOC_FACTOR 3
#define PREALLOC_BUFFER_SIZE (PREALLOC_FACTOR * MBXSIZE) #define PREALLOC_BUFFER_SIZE (PREALLOC_FACTOR * MBXSIZE)
typedef struct sm_cfg typedef struct sm_cfg

View File

@ -468,7 +468,7 @@ static uint32_t complete_access_subindex_loop(const _objd *objd,
while (nsub <= SDOobjects[nidx].maxsub) while (nsub <= SDOobjects[nidx].maxsub)
{ {
uint8_t bitlen = (objd + nsub)->bitlength; uint16_t bitlen = (objd + nsub)->bitlength;
void *ul_source = ((objd + nsub)->data != NULL) ? void *ul_source = ((objd + nsub)->data != NULL) ?
(objd + nsub)->data : (void *)&((objd + nsub)->value); (objd + nsub)->data : (void *)&((objd + nsub)->value);
uint8_t bitoffset = size % 8; uint8_t bitoffset = size % 8;

View File

@ -31,6 +31,10 @@
#define MBXBUFFERS 3 #define MBXBUFFERS 3
#endif #endif
#ifndef PREALLOC_FACTOR
#define PREALLOC_FACTOR 3
#endif
#ifndef MBX0_sma #ifndef MBX0_sma
#define MBX0_sma 0x1000 #define MBX0_sma 0x1000
#endif #endif