View Single Post
  #8   Spotlight this post!  
Unread 13-02-2015, 17:20
MrRoboSteve MrRoboSteve is offline
Mentor
AKA: Steve Peterson
FRC #3081 (Kennedy RoboEagles)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Bloomington, MN
Posts: 578
MrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond repute
Re: What is the purpose of RobotMap.java in CommandBased?

Craig's notion of using static methods to expose the sensors is another approach that's worth considering. Note that we don't expose the sensor object directly in our sensor subsystem; we have getter methods that return higher level states, based on the sensor state.

notmattlythgoe's example is a good one. In general, one category is where you have two subsystems that occupy the same space, and one subsystem wants to verify that the other subsystem isn't present.

Another example might be a sonar that points out of the front of the robot. The robot's drive train uses the sonar as an input to slow down as it approaches an object. The robot might also have a light that flashes that indicates an object is close.

Or your elevator keeps track of the number of totes in the elevator, and you change drive train behavior based on the number of totes.
__________________
2016-17 events: 10000 Lakes Regional, Northern Lights Regional, FTC Burnsville Qualifying Tournament

2011 - present · FRC 3081 Kennedy RoboEagles mentor
2013 - present · event volunteer at 10000 Lakes Regional, Northern Lights Regional, North Star Regional, Lake Superior Regional, Minnesota State Tournament, PNW District 4 Glacier Peak, MN FTC, CMP
http://twitter.com/MrRoboSteve · www.linkedin.com/in/speterson
Reply With Quote