schleprock
25-02-2016, 19:10
i really like the new addition to commands in robotbuilder that supports parameters. the only problem is that when the kids regenerate the Java code, robotbuilder deletes the arguments in the constructor calls in OI.java that puts command buttons on the dashboard. for example we have a command:
TurnRobotWithGyro that takes a parameter: headingDegrees
in OI.java the robotbuilder generates the following for the dashboard button:
SmartDashboard.putData("TurnRobotWithGyro", new TurnRobotWithGyro());
we then add an argument:
SmartDashboard.putData("TurnRobotWithGyro", new TurnRobotWithGyro(90));
if we regenerate the code using robotbuilder, robotbuilder deletes the '90' in the constructor call. for commands that take parameters, i would very much like robotbuilder to ignore whatever is in the argument list when it regenerates the code.
TurnRobotWithGyro that takes a parameter: headingDegrees
in OI.java the robotbuilder generates the following for the dashboard button:
SmartDashboard.putData("TurnRobotWithGyro", new TurnRobotWithGyro());
we then add an argument:
SmartDashboard.putData("TurnRobotWithGyro", new TurnRobotWithGyro(90));
if we regenerate the code using robotbuilder, robotbuilder deletes the '90' in the constructor call. for commands that take parameters, i would very much like robotbuilder to ignore whatever is in the argument list when it regenerates the code.