View Single Post
  #6   Spotlight this post!  
Unread 22-05-2016, 11:40
Lireal Lireal is offline
Registered User
AKA: Alex Colello
FRC #2141 (Spartonics)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Concord, California
Posts: 102
Lireal has a spectacular aura aboutLireal has a spectacular aura aboutLireal has a spectacular aura about
Re: Code Review: Semi-Novice

Quote:
Originally Posted by jreneew2 View Post
I create MotorControllers and Sensor in RobotMap all the time, in fact, I try to create a reference to each physical device (besides the roborio) in RobotMap. This way you have one common point where you can set up the controllers and change constants if need be. Then, in the subsystems is where I have a pointer to the RobotMap version. This makes it so that each member in a subsystem can be directly accessed while having all of the ugly stuff in robotmap.

This is the way RobotBuilder does it, so when I was learning I always just used that format. Your way is not wrong, but it would be inconvenient for me personally looking through multiple files and trying to find things.
I see. We just use the RobotMap to store all of the channel numbers of the various motor controllers and sensors, and point to them in the subsystems. Either way though, if you look at the OP's code, the subsystems should not be blank.
Reply With Quote