Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   FIRST Tech Challenge (http://www.chiefdelphi.com/forums/forumdisplay.php?f=146)
-   -   [FTC]: Improved(?) SDK Interface (http://www.chiefdelphi.com/forums/showthread.php?t=137968)

maths222 13-08-2015 10:19

[FTC]: Improved(?) SDK Interface
 
I have created a modified version of the SDK files which I think would be useful. It can be found here:
https://github.com/illinois-ftc/demo_hphs_robot,
with documentation here: http://illinois-ftc.github.io/demo_hphs_robot/

The notable changes from the existing SDK are the following:
  • FtcOpModeRegister.java should never need to be edited-instead, the ActiveOpMode annotation is used to mark a class for display in the menu, with a title, like so:
    Code:

    @ActiveOpMode("TeleOp17")
    public class DemoAuto ...

  • Motor/servo/sensor initialization code is not duplicated across op modes-instead a single RobotHardware class is created, with public properties and an initalizeHardware method to set the properties. Class declaration looks the following:
    Code:

    public class DemoAuto extends RobotLinearOpMode<DemoRobot> ...
    //or
    public class DemoTeleop extends RobotOpMode<DemoRobot> ...

  • Servo/sensor initialization is consistent between linear and loop op modes:
    Code:

    public void initializeRobot() {
     ...
    }



Please let me know what you think of these modifications, and any changes/improvements you would like to see. I also plan to create a tool which is able to automatically generate the subclass of RobotHardware based on a robot XML file.

skatefriday 18-08-2015 11:55

Re: [FTC]: Improved(?) SDK Interface
 
The active opmode annotation is a nice idea.

It's along the same lines that I was trying to
do with the library fork of the SDK.


All times are GMT -5. The time now is 17:24.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi