예제 #1
0
파일: Init.java 프로젝트: Canardou/ptut
  /**
   * Initialise divers paramètre
   *
   * @see Param#VOLUME
   * @see Param#SPEED_CRUISE
   * @see Param#RSPEED_CRUISE
   * @see Param#RSPEED_SONARMOTOR
   */
  private void init(ThreadRobot tRobot) {
    Sound.setVolume(VOLUME);
    tRobot.getMov().getDiffPilot().setTravelSpeed(Movement.SPEED_CRUISE);
    tRobot.getMov().getDiffPilot().setRotateSpeed(Movement.RSPEED_CRUISE);
    tRobot.getSonarMotor().setSpeed(Movement.RSPEED_SONARMOTOR);

    tRobot.getEnv().setInitValues(10, 10, 0); // A faire depuis la com
  }
예제 #2
0
파일: Init.java 프로젝트: Canardou/ptut
  /** Fonction d'initialisation test */
  public static void initTest(ThreadRobot tRobot) {
    Sound.setVolume(VOLUME);
    tRobot.getMov().getDiffPilot().setTravelSpeed(Movement.SPEED_CRUISE);
    tRobot.getMov().getDiffPilot().setRotateSpeed(Movement.RSPEED_CRUISE);
    tRobot.getSonarMotor().setSpeed(Movement.RSPEED_SONARMOTOR);

    tRobot.getEnv().setInitValues(10, 10, 0);

    tRobot.getOrder().add(Order.WAITBUTTON);
    tRobot.getOrder().chooseInsecurely();
    tRobot.getOrder().execute();
    tRobot.getOrder().add(Order.WAIT1SEC);
    tRobot.getOrder().chooseInsecurely();
    tRobot.getOrder().execute();
    tRobot.getOrder().add(Order.SETPOSITION);
    tRobot.getOrder().chooseInsecurely();
    tRobot.getOrder().execute();
    tRobot.getOrder().add(Order.SAVEREFANGLE);
    tRobot.getOrder().chooseInsecurely();
    tRobot.getOrder().execute();
    tRobot.getOrder().add(Order.CHECKFIRSTCASE);
    tRobot.getOrder().chooseInsecurely();
    tRobot.getOrder().execute();
  }