What do you do in your Timer1.fired event? Is that where you try to
change the freq? Changing it every 5 seconds?

Regards,

        Harri

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Ruoshui Liu
Sent: Wednesday, November 21, 2007 2:51 AM
To: [email protected]
Subject: [Tinyos-help] Timer isn't working when called in
SendMsg.sendDone()!

Dear all,

I am trying to make the Transmitter to make the Tx frequency after
receiving the ack from the receiver. I implemented this by writing the
code like this:

  event result_t SendMsg.sendDone(TOS_MsgPtr msg, result_t success)
  {
    if (!(msg->ack)){
        m_int--;
        }
    else
        call Timer1.start( TIMER_REPEAT, 5120 );                        
                                                          
    m_sending = FALSE;
    return SUCCESS;
  }

The Timer1 here is the timer for frequency change. However, the
Transmitter is not working as I expected. It won't change frequency even
it did receive the ack from the receiver. Is there something wrong with
the code or my logic? Any suggestions?

Thanks a lot!

Ruoshui Liu
_______________________________________________
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

Reply via email to