View Single Post
  #1   Spotlight this post!  
Unread 13-08-2015, 10:19
maths222 maths222 is offline
FTC FTA
AKA: Jacob Burroughs
no team
 
Join Date: Nov 2011
Rookie Year: 2010
Location: United States
Posts: 148
maths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to behold
[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.
__________________
--Jacob
Illinois FTC FTA
Reply With Quote