fix infoerror abort code

The upper 16 bits of the infoerror abort code was invalid.
pull/51/head
Hans-Erik Floryd 2019-03-04 16:40:48 +01:00
parent 15e976f58e
commit 1917a6f72b
1 changed files with 2 additions and 1 deletions

View File

@ -558,7 +558,8 @@ void SDO_infoerror (uint32_t abortcode)
coeres->infoheader.incomplete = 0;
coeres->infoheader.reserved = 0x00;
coeres->infoheader.fragmentsleft = 0;
coeres->index = htoel (abortcode);
coeres->index = (uint16_t)htoel (abortcode);
coeres->datatype = (uint16_t)(htoel (abortcode) >> 16);
MBXcontrol[MBXout].state = MBXstate_outreq;
MBXcontrol[0].state = MBXstate_idle;
ESCvar.xoe = 0;