// if we lost connection then exit
void ConnHandler::disconnected(void)
{
  printf("Lost connection\n");
  myRobot->stopRunning();
  myJoydrive->stopRunning();
  Aria::exit(3);  // exit program with error code 3
}
// just exit if we failed to connect
void ConnHandler::connFail(void)
{
  printf("Failed to connect.\n");
  myRobot->stopRunning();
  myJoydrive->stopRunning();
  Aria::exit(2);  // exit program with error code 2
}
// if we lost connection then exit
void ConnHandler::disconnected(void)
{
  printf("Lost connection\n");
  myRobot->stopRunning();
  myJoydrive->stopRunning();
  Aria::shutdown();
  return;
}
// just exit if we failed to connect
void ConnHandler::connFail(void)
{
  printf("Failed to connect.\n");
  myRobot->stopRunning();
  myJoydrive->stopRunning();
  Aria::shutdown();
  return;
}