|
Re: What is the purpose of RobotMap.java in CommandBased?
Quote:
Originally Posted by MrRoboSteve
3081 commonly creates a special SensorSubsystem that is the owner of nearly all of the sensors on the robot. SensorSubsystem has methods on it that allow other subsystems and commands to read sensor values. For example, suppose your elevator has a limit switch when your traveler is at the lowest desired position.
|
Why not put the sensor (limit switch from your example) in your "lift" subsystem. If other subsystems need the value, just provide an accessor?
__________________
Blake
Electrical, Programming and Design
Creator FRC Q&A 2017
Mass FRC Team 4909: The Bionics
Maine FRC Team 5122: The RobOTies (2014-2015)
Maine FRC Team 2648: Infinite Loop (2008-2011)
|