FRC2706 / 2017-2706-Robot-Code

The main robot code for our 2017 Steamworks robot.
3 stars 3 forks source link

2017-2706-Robot-Code

The main robot code for the Merge Robotics (2706) robot.

Want to help write robot code?

We have a lot of programmers on the team this year, so we've split the code out into chunks so each group can be in charge of a piece. Talk to you group's mentor or project leader to see which chunk you can work on.

Code Structure

Styling

We use Google's code styling standard. To use the Eclipse's autoformatter, go open the source file to be formatted, and press Ctrl + Shift + F.

Subsystems

Subsystems classes are for the lowest end things like gyro, direct communication with motors, camera etc. These classes will typically be owned by the group working with the hardware, such as the Controls group for motors and sensors, Vision group for cameras, etc.

Commands

The Commands folder / package is split into two types of commands:

Autonomous Commands:

The autonomous code is split into 3 parts, based on how low down the code is:

Teleop commands:

The code for teleop mode will build off the same subsystem classes as the auto mode and may borrow some of the simple plays as "macros".

The main goal of writing teleop code is handling joystick / button input and making the robot as easy to drive as possible. Things that may include could be:

We didn't do very much of this last year, so lots of room for creativity!