[Tinyos-commits]
CVS: tinyos-1.x/tos/platform/micaz FramerM.nc, 1.5, 1.6
Jonathan Hui
jwhui at users.sourceforge.net
Thu Jul 21 23:19:39 PDT 2005
Update of /cvsroot/tinyos/tinyos-1.x/tos/platform/micaz
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22652
Modified Files:
FramerM.nc
Log Message:
- Fixed a critical bug that stems from mapping a CC2420 packet to a
mica2 packet. Previously, the mote acked UART messages by reusing the
most recent tx buffer. This is a big hack and breaks down when a mote
wants to schedule a UART transmit on a UART receive event since the
address field is immediately overwritten when transmitting the
ack. Thus, the UART transmit no longer looks like its for the UART.
Index: FramerM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/tos/platform/micaz/FramerM.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** FramerM.nc 11 Oct 2004 19:30:55 -0000 1.5
--- FramerM.nc 22 Jul 2005 06:19:37 -0000 1.6
***************
*** 190,194 ****
if (gFlags & FLAGS_TOKENPEND) {
#ifdef MICA2MSGTYPE
! gpTxBuf[offsetof(TOS_Msg,addr)] = gTxTokenBuf;
#else
gpTxBuf = (uint8_t *)&gTxTokenBuf;
--- 190,195 ----
if (gFlags & FLAGS_TOKENPEND) {
#ifdef MICA2MSGTYPE
! gpTxBuf = (uint8_t *)&gTxTokenBuf;
! // gpTxBuf[offsetof(TOS_Msg,addr)] = gTxTokenBuf;
#else
gpTxBuf = (uint8_t *)&gTxTokenBuf;
***************
*** 549,553 ****
case TXSTATE_INFO:
! nextByte = gpTxBuf[gTxByteCnt];
gTxRunningCRC = crcByte(gTxRunningCRC,nextByte);
gTxByteCnt++;
--- 550,557 ----
case TXSTATE_INFO:
! if (gTxProto == PROTO_ACK)
! nextByte = gpTxBuf[0];
! else
! nextByte = gpTxBuf[gTxByteCnt];
gTxRunningCRC = crcByte(gTxRunningCRC,nextByte);
gTxByteCnt++;
More information about the Tinyos-commits
mailing list