maths222
13-08-2015, 10:19
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:
@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:
public class DemoAuto extends RobotLinearOpMode<DemoRobot> ...
//or
public class DemoTeleop extends RobotOpMode<DemoRobot> ...
Servo/sensor initialization is consistent between linear and loop op modes:
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.
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:
@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:
public class DemoAuto extends RobotLinearOpMode<DemoRobot> ...
//or
public class DemoTeleop extends RobotOpMode<DemoRobot> ...
Servo/sensor initialization is consistent between linear and loop op modes:
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.