View Single Post
  #7   Spotlight this post!  
Unread 18-01-2017, 01:56
Thomas DeSilva's Avatar
Thomas DeSilva Thomas DeSilva is offline
Programming Fury
FRC #1983 (Skunkworks)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2009
Location: Des Moines, WA
Posts: 22
Thomas DeSilva is on a distinguished road
Re: CTRE Toolsuite with Command-Based C++

Quote:
Originally Posted by jlindquist74 View Post
I strongly discourage our programming team from making any calls that might communicate with hardware in their constructors. To do so assumes that the "under the covers" initialization done by WPILib is complete and the hardware can be reached at the time the constructor executes.
I agree. In this case, I was actually more worried about the EnableControl() call than the SetSafetyEnabled() call, but figured it was outside the scope of this question. You raise a good point, though.
__________________
Programmer 2009-2011
Driver 2011
WPI Class of 2015
Reply With Quote