Sections
You are here: Home Forum Development Discussion mchelper src - delayed sending commands

mchelper src - delayed sending commands

Up to Development Discussion

mchelper src - delayed sending commands

Posted by Tim Broyles at August 13. 2008

I have added some command buttons to mchelper using the trolltech QT tool and have good results, however often the command that I send is not sent until the second time I give it.


IE: Here is the button function. It works but sometimes the command does not get sent (or received) until the next time I push the button. THANKS!

void McHelperWindow::blowerButtonEvent( )
{
  Board* board = getCurrentBoard( );
  if( board == NULL )
      return;

  setBlowerRPM(blowerSpeed);
  QString cmd = "/sss/blower ";

  if (blowerVal == 1)
      cmd.append("0");
  else
      cmd.append("1");

  messageThreadSafe( cmd, MessageEvent::Command, board->locationString() );
  board->sendMessage( cmd );
}

Re: mchelper src - delayed sending commands

Posted by Liam Staskawicz at August 13. 2008
If you drop a printf in there, can you confirm your function is being called every time you think it is?
Powered by Ploneboard
Document Actions