]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Bugfix. Now works with MicaZ nodes as the PacketParrot
authorprabal <prabal>
Thu, 19 Apr 2007 07:39:18 +0000 (07:39 +0000)
committerprabal <prabal>
Thu, 19 Apr 2007 07:39:18 +0000 (07:39 +0000)
apps/tutorials/PacketParrot/PacketParrotP.nc
apps/tutorials/PacketParrot/README.txt

index 730cfd6838a14786f88678243b3397734d916d17..926dca3d652fa13537a18f322a3dc8688933467f 100644 (file)
@@ -64,10 +64,9 @@ implementation {
 
   event void AMControl.startDone(error_t err) {
     if (err == SUCCESS) {
-      error_t e;
-      do {
-        e = call LogRead.read(&m_entry, sizeof(logentry_t));
-      } while (e != SUCCESS);
+      if (call LogRead.read(&m_entry, sizeof(logentry_t)) != SUCCESS) {
+       // Handle error.
+      }
     }
     else {
       call AMControl.start();
@@ -97,11 +96,10 @@ implementation {
   event void Send.sendDone(message_t* msg, error_t err) {
     call Leds.led1Off();
     if ( (err == SUCCESS) && (msg == &m_entry.msg) ) {
-      error_t e;
       call Packet.clear(&m_entry.msg);
-      do {
-        e = call LogRead.read(&m_entry, sizeof(logentry_t));
-      } while (e != SUCCESS);
+      if (call LogRead.read(&m_entry, sizeof(logentry_t)) != SUCCESS) {
+       // Handle error.
+      }
     }
     else {
       call Timer0.startOneShot(INTER_PACKET_INTERVAL);
index 184dfa3b926487c691c9f980d10ba3b41b9d2a43..57d8e2158e1ef7a99ee95e5aa25e7c50d5f8f72a 100644 (file)
@@ -55,6 +55,4 @@ Tools:
 Known bugs/limitations:
 
   Only works on motes with the CC2420 radio.  Tested and verified with
-  TelosB and Tmote nodes.  Also works with MicaZ (as the BlinkToRadio
-  node) and TelosB/Tmote as the parrot node.  Currently, using a MicaZ
-  as the parrot does not work and needs to be debugged.
+  TelosB, Tmote, and MicaZ nodes.