示例#1
0
void PlayField::auxMenuDone()
{
    qDebug() << "aux menu done";
    SimpleMenu* menu = qobject_cast<SimpleMenu*>(sender());
    if (menu) {
        delete m_menu;
        m_menu = menu;
        setupController();
    }
}
示例#2
0
void PlayField::newGame()
{
    endGame();
    delete m_menu;
    
    Kg::difficulty()->setGameRunning(false);
    
    m_chat->hide();
    m_seaView->screen(Sea::Player(0))->show();
    m_seaView->screen(Sea::Player(1))->show();
    
    m_menu = new SimpleMenu(this, m_seaView->screen(Sea::Player(0)));
    connect(m_menu, SIGNAL(done()), this, SLOT(setupController()));
    m_status_bar->showMessage(QLatin1String(""));
    emit welcomeScreen();
}
MotorTorqueController::MotorTorqueController(std::string _jname, double _ke, double _kd, double _tc, double _dt)
{
  setupController(_ke, _kd, _tc, _dt);
  setupControllerCommon(_jname, _dt);
}
MotorTorqueController::MotorTorqueController(std::string _jname, double _alpha, double _beta, double _ki, double _tc, double _dt)
{
  setupController(_alpha, _beta, _ki, _tc, _dt);
  setupControllerCommon(_jname, _dt);
}
MotorTorqueController::MotorTorqueController()
{
  // default constructor: _jname = "", _ke = _tc = _dt = 0.0
  setupController(0.0, 0.0, 0.0);
  setupControllerCommon("", 0.0);
}