|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Converting a iterative robot project to a command based project
Is it possible? We have programmed in iterative for this season and we're thinking about changing to command based. Is it possible to convert the same project to a command based without having to create a new one? Because creating a new one means that we'll need to open a new git and convert some other stuff like that.
If not then not problem but we'd rather use this project. |
|
#2
|
|||
|
|||
|
Re: Converting a iterative robot project to a command based project
While there isn't a magical converter tool, you can use the robot builder to generate the skeleton code for all of your subsystems, motors, and sensors.
|
|
#3
|
||||
|
||||
|
Re: Converting a iterative robot project to a command based project
Quote:
I want to use the code I have now, but will is work if I use subsystems and commands in the same way as if I created a Command Based project. |
|
#4
|
||||
|
||||
|
Re: Converting a iterative robot project to a command based project
A command-based robot has specific `Robot.java` contents - the periodic functions call `Scheduler.getInstance().run();`, and the constructor creates instances of each subsystem. The other thing you'll need to make sure to examine is the `OI` class, to make sure that triggers are set up appropriately.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|