コード例 #1
0
  /*
   * Code to run ONCE when the driver hits INIT
   */
  @Override
  public void init() {

    if (debugmode) telemetry.addData("Status", "Initialized");

    /* eg: Initialize the hardware variables.          */
    // @todo add all additional initalization for hardware here
    robot.init(
        hardwareMap); // function for init drivetrain/servos **does not handle any sensors!!**
  }
コード例 #2
0
  /*
   * Code to run ONCE when the driver hits INIT
   */
  @Override
  public void init() {

    if (debugmode) telemetry.addData("Status", "Initialized");

    /* eg: Initialize the hardware variables.          */
    // @todo add all additional initalization for hardware here
    robot.init(
        hardwareMap); // function for init drivetrain/servos **does not handle any sensors!!**

    textToSpeech =
        new TextToSpeech(
            hardwareMap.appContext,
            new TextToSpeech.OnInitListener() {
              @Override
              public void onInit(int status) {
                if (status != TextToSpeech.ERROR) {
                  textToSpeech.setLanguage(Locale.US);
                }
              }
            });
  }