[Tinyos-2-commits] CVS: tinyos-2.x/apps/tosthreads/apps/TestCollection TestCollectionC.nc, 1.1, 1.2

Kevin Klues klueska at users.sourceforge.net
Wed Jun 18 07:48:58 PDT 2008


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

Modified Files:
	TestCollectionC.nc 
Log Message:
Update to TestCollection apps for tosthreads to send correct payload for displaying sensor values

Index: TestCollectionC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tosthreads/apps/TestCollection/TestCollectionC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestCollectionC.nc	16 Jun 2008 18:38:28 -0000	1.1
--- TestCollectionC.nc	18 Jun 2008 14:48:56 -0000	1.2
***************
*** 74,78 ****
        for (;;) {
          if (call BlockingReceive.receive(&recvbuf, 0) == SUCCESS) {
!           call SerialBlockingSend.send(AM_BROADCAST_ADDR, &recvbuf, sizeof(local));
            report_received();
          }
--- 74,81 ----
        for (;;) {
          if (call BlockingReceive.receive(&recvbuf, 0) == SUCCESS) {
!           oscilloscope_t *recv_o = (oscilloscope_t *) call BlockingReceive.getPayload(&recvbuf, sizeof(oscilloscope_t));
!           oscilloscope_t *send_o = (oscilloscope_t *) call SerialBlockingSend.getPayload(&sendbuf, sizeof(oscilloscope_t));
!           memcpy(send_o, recv_o, sizeof(oscilloscope_t));
!           call SerialBlockingSend.send(AM_BROADCAST_ADDR, &sendbuf, sizeof(oscilloscope_t));
            report_received();
          }
***************
*** 83,94 ****
        for (;;) {
          if (reading == NREADINGS) {
!           oscilloscope_t *o = o;
!           o = (oscilloscope_t *)call BlockingSend.getPayload(&sendbuf, sizeof(oscilloscope_t));
            if (o == NULL) {
              fatal_problem();
              return;
            }
!           memcpy(o, &local, sizeof(local));
!           if (call BlockingSend.send(&sendbuf, sizeof(local)) == SUCCESS) {
              report_sent();
            } else {
--- 86,96 ----
        for (;;) {
          if (reading == NREADINGS) {
!           oscilloscope_t *o = (oscilloscope_t *) call BlockingSend.getPayload(&sendbuf, sizeof(oscilloscope_t));
            if (o == NULL) {
              fatal_problem();
              return;
            }
!           memcpy(o, &local, sizeof(oscilloscope_t));
!           if (call BlockingSend.send(&sendbuf, sizeof(oscilloscope_t)) == SUCCESS) {
              report_sent();
            } else {



More information about the Tinyos-2-commits mailing list