[Tinyos-2-commits] CVS: tinyos-2.x/apps/RadioSenseToLeds RadioSenseToLedsC.nc, 1.1.2.8, 1.1.2.9

Jan-Hinrich Hauer janhauer at users.sourceforge.net
Fri Nov 17 05:30:31 PST 2006


Update of /cvsroot/tinyos/tinyos-2.x/apps/RadioSenseToLeds
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22266/apps/RadioSenseToLeds

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	RadioSenseToLedsC.nc 
Log Message:
Now the lower three bits are displayed as described in the README.

Index: RadioSenseToLedsC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/RadioSenseToLeds/RadioSenseToLedsC.nc,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -C2 -d -r1.1.2.8 -r1.1.2.9
*** RadioSenseToLedsC.nc	7 Nov 2006 23:14:50 -0000	1.1.2.8
--- RadioSenseToLedsC.nc	17 Nov 2006 13:30:28 -0000	1.1.2.9
***************
*** 102,118 ****
        radio_sense_msg_t* rsm = (radio_sense_msg_t*)payload;
        uint16_t val = rsm->data;
!       call Leds.led0Toggle();
!       if (val & 0x8000) {
! 	call Leds.led1On();
!       }
!       else {
! 	call Leds.led1Off();
!       }
!       if (val & 0x4000) {
! 	call Leds.led2On();
!       }
!       else {
! 	call Leds.led2Off();
!       }
        return bufPtr;
      }
--- 102,117 ----
        radio_sense_msg_t* rsm = (radio_sense_msg_t*)payload;
        uint16_t val = rsm->data;
!       if (val & 0x0004)
!         call Leds.led2On();
!       else
!         call Leds.led2Off();
!       if (val & 0x0002)
!         call Leds.led1On();
!       else
!         call Leds.led1Off();
!       if (val & 0x0001)
!         call Leds.led0On();
!       else
!         call Leds.led0Off();
        return bufPtr;
      }



More information about the Tinyos-2-commits mailing list