View Single Post
  #2   Spotlight this post!  
Unread 13-02-2015, 12:29
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 945
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
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.
Reply With Quote