[Tinyos-2-commits] CVS: tinyos-2.x/apps/Sense SenseC.nc, 1.1.2.2, 1.1.2.3

Jan-Hinrich Hauer janhauer at users.sourceforge.net
Sat Jul 1 11:10:52 PDT 2006


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

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	SenseC.nc 
Log Message:
Sense displays the three most significant bits of a sensor reading now.

Index: SenseC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/Sense/Attic/SenseC.nc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** SenseC.nc	23 Jun 2006 14:07:13 -0000	1.1.2.2
--- SenseC.nc	1 Jul 2006 18:10:50 -0000	1.1.2.3
***************
*** 70,75 ****
    event void Read.readDone(error_t result, uint16_t data) 
    {
!     if (result == SUCCESS)
!       call Leds.set((uint8_t) data);
    }
  }
--- 70,87 ----
    event void Read.readDone(error_t result, uint16_t data) 
    {
!     if (result == SUCCESS){
!       if (data & 0x8000)
!         call Leds.led2On();
!       else
!         call Leds.led2Off();
!       if (data & 0x4000)
!         call Leds.led1On();
!       else
!         call Leds.led1Off();
!       if (data & 0x2000)
!         call Leds.led0On();
!       else
!         call Leds.led0Off();
!     }
    }
  }



More information about the Tinyos-2-commits mailing list