Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Converting a iterative robot project to a command based project (http://www.chiefdelphi.com/forums/showthread.php?t=154654)

YairZiv 03-02-2017 13:05

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.

thecoopster20 03-02-2017 21:49

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.

YairZiv 04-02-2017 05:10

Re: Converting a iterative robot project to a command based project
 
Quote:

Originally Posted by thecoopster20 (Post 1640159)
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.

Maybe I should have explained it a bit better
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.

demosthenes2k8 04-02-2017 12:39

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.


All times are GMT -5. The time now is 09:55.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi