[Tinyos-2-commits] CVS: tinyos-2.x/apps/MultihopOscilloscopeLqi
MultihopOscilloscopeC.nc, 1.1, 1.2
Phil Levis
scipio at users.sourceforge.net
Thu Sep 13 16:10:53 PDT 2007
Update of /cvsroot/tinyos/tinyos-2.x/apps/MultihopOscilloscopeLqi
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27056/apps/MultihopOscilloscopeLqi
Modified Files:
MultihopOscilloscopeC.nc
Log Message:
The big interface switchover for Packet, Send, Receive, and AMSend.
Index: MultihopOscilloscopeC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/MultihopOscilloscopeLqi/MultihopOscilloscopeC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MultihopOscilloscopeC.nc 13 Apr 2007 00:10:28 -0000 1.1
--- MultihopOscilloscopeC.nc 13 Sep 2007 23:10:20 -0000 1.2
***************
*** 129,134 ****
oscilloscope_t* out;
if (uartbusy == FALSE) {
! out = (oscilloscope_t*)call SerialSend.getPayload(&uartbuf);
! if (len != sizeof(oscilloscope_t)) {
return msg;
}
--- 129,135 ----
oscilloscope_t* out;
if (uartbusy == FALSE) {
! out = (oscilloscope_t*)call SerialSend.getPayload(&uartbuf, sizeof(oscilloscope_t));
! if (out == NULL) {
! fatal_problem();
return msg;
}
***************
*** 149,153 ****
//Prepare message to be sent over the uart
! out = (oscilloscope_t*)call SerialSend.getPayload(newmsg);
memcpy(out, in, sizeof(oscilloscope_t));
--- 150,158 ----
//Prepare message to be sent over the uart
! out = (oscilloscope_t*)call SerialSend.getPayload(newmsg, sizeof(oscilloscope_t));
! if (out == NULL) {
! fatal_problem();
! return msg;
! }
memcpy(out, in, sizeof(oscilloscope_t));
***************
*** 225,229 ****
if (reading == NREADINGS) {
if (!sendbusy) {
! oscilloscope_t *o = (oscilloscope_t *)call Send.getPayload(&sendbuf);
memcpy(o, &local, sizeof(local));
if (call Send.send(&sendbuf, sizeof(local)) == SUCCESS)
--- 230,238 ----
if (reading == NREADINGS) {
if (!sendbusy) {
! oscilloscope_t *o = (oscilloscope_t *)call Send.getPayload(&sendbuf, sizeof(oscilloscope_t));
! if (o == NULL) {
! fatal_problem();
! return;
! }
memcpy(o, &local, sizeof(local));
if (call Send.send(&sendbuf, sizeof(local)) == SUCCESS)
More information about the Tinyos-2-commits
mailing list