Skip to content

For FTC 10107's control scheme system. Converts mapping files generated by a graphical controls editor to Java control schemes.

License

Notifications You must be signed in to change notification settings

MediumAutomaton/ctl2java

Repository files navigation

ctl2java

Version 1.0-0

Licensed under the BSD 3-clause license. For FTC 10107's control scheme system. Converts mapping files generated by a graphical controls editor to Java control schemes. Launch it on the command-line with ctl2java.py (--help to see available arguments), or use gui.py for a simple graphical interface.

Included here is the program itself, some example Action/Method/Setters libraries for it (10107's CenterStage libraries, which probably won't be directly useful to you but should serve as good examples to help you make your own), a controls State, test OpMode, and test mapping file to help test the program's output, and perhaps some extra info. and scripts scattered around.

The only graphical editor currently existing is CTLedit. CTLedit was made with Snap!, so it is accessed through your web browser: https://snap.berkeley.edu/project?username=michaelrw&projectname=CTLedit

CTLedit will generate JSON files which define the physical appearance of the controller in that program as well as all of the button mappings. CTL2Java, this program, takes a CTL file and generates a Java control scheme from it. Assuming you don't run into any bugs, this scheme should be able to be used as-is.

I'm more likely to port CTLedit to something else than I am CTL2Java, so I gave this program some extra smarts that should make those mapping files pretty easy to write. The graphical editor doesn't have to keep track of much of the technical stuff - this will figure that out later.

About

For FTC 10107's control scheme system. Converts mapping files generated by a graphical controls editor to Java control schemes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published