]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/tests/cc2420/LplBroadcastCountToLeds/RadioCountToLedsC.nc
use app am ids
[tinyos-2.x.git] / apps / tests / cc2420 / LplBroadcastCountToLeds / RadioCountToLedsC.nc
index 0032148769c0feba76470dbe91193c71a77097db..71fd0279aeb0a6b67d79209ccdfd5bce9f6835f7 100644 (file)
  * every time it gets updated. A RadioCountToLeds node that hears a counter 
  * displays the bottom three bits on its LEDs. This application is a useful 
  * test to show that basic AM communication and timers work.
+ * <p>
+ * This version uses low-power listening.
  *
  * @author Philip Levis
- * @date   June 6 2005
+ * @date   June 24 2008
  */
 
 module RadioCountToLedsC {
@@ -88,7 +90,7 @@ implementation {
       return;
     }
     else {
-      radio_count_msg_t* rcm = (radio_count_msg_t*)call Packet.getPayload(&packet, NULL);
+      radio_count_msg_t* rcm = (radio_count_msg_t*)call Packet.getPayload(&packet, sizeof(radio_count_msg_t));
       if (call Packet.maxPayloadLength() < sizeof(radio_count_msg_t)) {
         return;
       }