View Single Post
  #6   Spotlight this post!  
Unread 16-01-2017, 16:16
jlindquist74's Avatar
jlindquist74 jlindquist74 is offline
WOPR Software Integration Lead
FRC #1622
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 1337
Location: Poway, CA
Posts: 51
jlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant futurejlindquist74 has a brilliant future
Re: CTRE Toolsuite with Command-Based C++

Quote:
Originally Posted by Thomas DeSilva View Post
The error says that MotorSafetyHelper is trying to check the FPGA time before the FPGA is initialized, which may be because you're calling CANTalon::SetSafetyEnabled() in the constructor for your subsystem. It may help to move that call to a later point in time, but I don't know how it works under the covers
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. That's the kind of thing that worries me, "it may work today, but it may change in the next update.

I advise them to put those calls in the Init methods. By the time the Init()s are called, the hardware *must* be configured for our use. (Otherwise, what's the point?)

If you give that a try, or if you find another solution, would you please let us know how it goes? Your experience will surely be helpful to other teams!
Reply With Quote