diff -r 8b67289d50b5 -r 6fecf36df407 src/emcy.c --- a/src/emcy.c Fri Jan 25 12:00:38 2008 +0100 +++ b/src/emcy.c Fri Jan 25 19:01:58 2008 +0100 @@ -35,6 +35,7 @@ #include #include "emcy.h" #include "canfestival.h" +#include "sysdep.h" @@ -100,7 +101,7 @@ MSG_WAR(0x3051, "sendEMCY", 0); - m.cob_id = *d->error_cobid; + m.cob_id = UNS16_LE(*(UNS16*)d->error_cobid); m.rtr = NOT_A_REQUEST; m.len = 8; m.data[0] = errCode & 0xFF; /* LSB */ @@ -238,7 +239,7 @@ } /* post the received EMCY */ - nodeID = m->cob_id & 0x7F; + nodeID = UNS16_LE(m->cob_id) & 0x7F; errCode = m->data[0] | ((UNS16)m->data[1] << 8); errReg = m->data[2]; (*d->post_emcy)(nodeID, errCode, errReg);