Galaxia5987 / robot-2019

Control code for the 2019 FRC season, Destination: Deep Space robot
0 stars 0 forks source link

Implement Superstructre #17

Open katzuv opened 5 years ago

katzuv commented 5 years ago

Superstructure, or SS in short, controls them all. It knows about all the systems, to keep each system independent of other ones. Superstructure can get all the inputs from and control all the outputs of all the systems.

Usage example

The Driver commands the robot to drive to the third level of the Rocket and place a Hatch Panel there. Superstructure commands the Drivetrain to get to the coordinate gotten from Network Tables. Superstructure checks constantly whether the Drivetrain has less than two meters left to drive to the Rocket, with information gotten from the Drivetrain. When this condition is met, Superstructure commands the Elevator to get to the height of the third level of the Rocket. When all systems reached their desitnations, Superstructure commands the Intake to release the Hatch Panel it's holding. No subsystem in this command had any knowledge about any other subsystem.