karinfahraeus / homeeasyhacking

Automatically exported from code.google.com/p/homeeasyhacking
0 stars 0 forks source link

Send a signal when receiving one #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If i modify the library example like this:

void printSimpleResult(unsigned int sender, unsigned int recipient, bool on)
{
homeEasy.sendSimpleProtocolMessage(3, 2, 1);
}

It doesnt send the message.

Am i doing something wrong?

Original issue reported on code.google.com by jokkakim on 17 Sep 2010 at 11:16

GoogleCodeExporter commented 8 years ago
Hmm, that's a little odd.  I take it calling the simpleProtocolMessage with the 
same details outside of the printSimpleResult works?

If so, my best guess is it may be down to the receiver interrupt handler not 
being cleaned up before the sending interrupt handler is initialized.  

You could try setting a variable from within printSimpleResult (eg doSend = 
true), then checking (and clearing) that variable in the loop() block and send 
the result from there (perhaps after a short delay to allow the cleanup to 
complete).

Original comment by lstg7...@gmail.com on 24 Sep 2010 at 7:33

GoogleCodeExporter commented 8 years ago
Thank you, that worked perfectly  =)

Original comment by jokkakim on 27 Sep 2010 at 4:55

GoogleCodeExporter commented 8 years ago

Original comment by lstg7...@gmail.com on 28 Sep 2010 at 7:17