|
Re: What is the purpose of RobotMap.java in CommandBased?
We use RobotMap to store all "robot-wide" constants - i.e. any values that the entire robot would care about.
Stuff like wiring channels (can't double-book a PWM channel), robot-wide deadzone values, etc.
It gives an added benefit of one easy place anyone wiring/inspecting wiring of the robot to look to see how things should be, or were in the past.
This year we also started using static subclasses in RobotMap to make things more readable, especially with the new PD monitoring features.
Ex. we now do
RobotMap.PWMChannels.FRONT_LEFT_DRIVE
RobotMap.PDChannels.FRONT_LEFT_DRIVE
instead of
RobotMap.FRONT_LEFT_DRIVE_PWM_CHANNEL
RobotMap.FRONT_LEFT_DRIVE_PD_CHANNEL
Last edited by BigJ : 13-02-2015 at 12:31.
|