[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/cc1000 CC1000SendReceiveP.nc, 1.8, 1.9

David Gay idgay at users.sourceforge.net
Tue Jun 3 13:32:11 PDT 2008


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/cc1000
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv5334

Modified Files:
	CC1000SendReceiveP.nc 
Log Message:
remove bogus state check

Index: CC1000SendReceiveP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc1000/CC1000SendReceiveP.nc,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** CC1000SendReceiveP.nc	3 Jun 2008 04:08:34 -0000	1.8
--- CC1000SendReceiveP.nc	3 Jun 2008 20:32:09 -0000	1.9
***************
*** 569,588 ****
  
    void packetReceiveDone() {
-     message_t* pBuf;
      uint16_t snr;
!     atomic {
!       if (radioState != RECEIVED_STATE) {
! 	return;
!       }
!       pBuf = rxBufPtr;
!     }
!     snr = (uint16_t) getMetadata(pBuf)->strength_or_preamble;
      /* Higher signal strengths have lower voltages. So see if we're
         CC1000_WHITE_BIT_THRESH *below* the noise floor. */
      if ((snr + CC1000_WHITE_BIT_THRESH) < ((call CC1000Squelch.get()))) {
!       getMetadata(pBuf)->metadataBits |= CC1000_WHITE_BIT;
      }
      else {
!       getMetadata(pBuf)->metadataBits &= ~CC1000_WHITE_BIT;
      }
      
--- 569,582 ----
  
    void packetReceiveDone() {
      uint16_t snr;
! 
!     snr = (uint16_t) getMetadata(rxBufPtr)->strength_or_preamble;
      /* Higher signal strengths have lower voltages. So see if we're
         CC1000_WHITE_BIT_THRESH *below* the noise floor. */
      if ((snr + CC1000_WHITE_BIT_THRESH) < ((call CC1000Squelch.get()))) {
!       getMetadata(rxBufPtr)->metadataBits |= CC1000_WHITE_BIT;
      }
      else {
!       getMetadata(rxBufPtr)->metadataBits &= ~CC1000_WHITE_BIT;
      }
      



More information about the Tinyos-2-commits mailing list