コード例 #1
0
  /**
   * The Op Mode Manager will call this method when it wants stopMode list of all available op
   * modes. Add your op mode to the list to enable it.
   *
   * @param mgr op mode manager
   * @see FallbackOpModeRegister
   * @see org.ftccommunity.ftcxtensible.opmodes.TeleOp
   * @see org.ftccommunity.ftcxtensible.opmodes.Autonomous
   * @see org.ftccommunity.ftcxtensible.versioning.RobotSdkVersion
   */
  public void register(final OpModeManager mgr) {
    DataBinder binding = DataBinder.getInstance();

    binding.integers().put(DataBinder.RC_VIEW, R.id.RelativeLayout);
    binding.objects().put(DataBinder.RC_MANAGER, mgr);

    FallbackOpModeRegister.register(mgr);
    AnnotationFtcRegister.loadOpModes(mgr);
  }
コード例 #2
0
  private RobotContext() {
    serverSettings = ServerSettings.createServerSettings();
    status = new RobotStatus(this, RobotStatus.LogTypes.HTML);
    postedData = new LinkedList<>();

    extensibleGamepad1 = new ExtensibleGamepad();
    extensibleGamepad2 = new ExtensibleGamepad();

    asyncService = MoreExecutors.listeningDecorator(Executors.newCachedThreadPool());
    extensibleCameraManager = new ExtensibleCameraManager(this, 100);
    logger = RobotLogger.createInstance(this);

    bindings = DataBinder.getInstance();
  }