User Tools

Site Tools


training:software:adding_a_subsystem_to_the_software

This is an old revision of the document!


Adding a Subsystem to the Software

The mechanisms that the software controls are organized into subsystems and the software structure follows this same organization. The steps to add a new subsystem to the robot template or a repository based on the template are as follows:

  1. Add the subsystem class including setup and control of associated hardware, logging of subsystem data and public methods to control and monitor the subsystem. The file goes in robot/subsystems.
  2. Add subsystem specific constants including preferences to the constants.java file in the robot folder.
  3. Edit the RobotContainer.java file to instantiate the new subsystem, connect operator controller inputs to subsystem commands. We also need a method for other classes to get a reference to the subsystem - this is primarily for data logging and simulation.
  4. Add a subsystem model class to the sim folder for simulation and modify the top level RobotModel to run the new subsystem model. Add any new simulation constants to the sim/constants file.
  5. Modify DataLogging.java to display the subsystem data including commands using the sendable interface and add any other data that should be automatically display to the operators.
  6. Modify RobotPreferences.java to add the subsystem to the resetPreferences() function if the subsystem has preferences.
  7. Add unit tests for the subsystem to the test/java/frc/robot folder.

Discussion

Enter your comment:
K N D E L
 
training/software/adding_a_subsystem_to_the_software.1710092866.txt.gz · Last modified: by Brian Utterback

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki