|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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. Last edited by schleprock : 25-02-2016 at 19:11. Reason: better grammar |
|
#2
|
||||
|
||||
|
Re: robotbuilder overwrites parameters on commands that have parameters
RobotBuilder will create a button on the SmartDashboard for every preset for every command. So if you have a preset called 'Turn 90' that sets the parameter to 90, it will generate a button for that. It sounds like you're not creating any presets, or even setting the command to take parameters (it only generates a parameterless button on the SD if the command itself hasn't been set up to take parameters). I think it would be good to take a closer look at the Robotbuilder documentation.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|