Hi! I think, I had one similar issue: https://www.millennium.berkeley.edu/pipermail/tinyos-help/2008-June/034400.html
I've used printf in a loop and there was no action at all! Although my question was not answered, I'm thinking meanwhile that some functions in TinyOS being scheduled, so if your calling function doesn't finish, the scheduler can't switch to run your send() or my printf(). So one have to release the control flow to allow other called functions to get running. So you could remove the loop and in sendDone start the function that calls send() again. I can assume it is better than to call send() without to be sure sendDone was signaled. It's a pity that the compiler can't check whether the called function can get finish without the calling part have to release the control flow or not. Or there are any parameters I can pass to? Can anyone point to the description, how one can distinguish between these 2 types of functions? Andrey P.S. I had a couple of days ago bad experience with compiler checks. My program in C for atmega64 didn't work. After some time I've figured out what was wrong. I've forgotten to declare a function to handle a timer interrupt. There were no compiler warnings/errors, I'm missing a such critical function!.. Hazem Al- Ojeh wrote: > > Hi all, > > I am using TinyOS 2.x and using Tossim to test my results > I was wondering if there is a command that may allow me to make a loop sleep > so > I can send something over the radio to another mote? > > What I have is a loop that keeps running, then within the loop, I may choose > to > send a message over the radio to another mote, the problem is I don't want to > break out of the loop, what I would like to do is to send the message then > continue the loop from where I stopped last! > > What is actually happening is, the loop keeps running till the end, and then > sends the message. > > I would be thankful for any hints.... > > Thank you. > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > > _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
