# this looks wrong (maybe be correct behavior, it's messy either-way)
EasyBroadcastMsg* msg = (EasyBroadcastMsg*)(call
RadioPacket.getPayload(&packet,NULL));
getPayload(ptr, size_to_ensure)
# this is wrong. the return from receive "releases" the message.
# (but you feed it into another send)
event message_t * Receive.receive(message_t* msg, void * payload,
uint8_t len) {
call Leds.led1Toggle();
forwardMessage(msg);
return msg;
}
# code as presented will not compile (newPacket not defined)
1) timer never fired (you increment before the send in the timer fire)
2) timer only fired when the send is busy (you increment before the
send in the timer fired)
3) message clobber (see above + other problems)
HTH,
Paul
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help