View Single Post
  #4   Spotlight this post!  
Unread 11-02-2012, 20:15
LukeS LukeS is offline
4272 mentor, 1024 alumnus
AKA: Luke Shumaker
FRC #4272
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Indianapolis, IN
Posts: 60
LukeS is an unknown quantity at this point
Re: one sensor multiple subsystems

If the sensor isn't truly part of a subsystem, I don't make it part of one. I just declare it as public static final in CommandBase and access it from there.

Most of my raw hardware things are declared this way in CommandBase; It seemed more elegant to me to give CAN/DIO/AIO IDs or SpeedController objects to subsystems' constructors. This way CommandBase basically acts like RobotMap (I deleted RobotMap).

Last edited by LukeS : 11-02-2012 at 20:16. Reason: clarify
Reply With Quote