![]() |
Re: Network Tables
Quote:
Wow! you can do that in labview? Or did you make the switch to c++? This Main.cpp is how we setup. There is only one member variable that is always instantiated between autonomous and teleop. Back when I started in 2011 I instantiated everything in auton and redid this in teleop... that wrecked havoc on teleop where we lost controls (our first match ever... went down like that). I found that for best results keep everything ready to go in between modes. When looking at this code, you can see how the loops happen within the Autonomous() and OperatorControl() callbacks. I can see now from your response that I could have one loop... and these callbacks simply signal what just happened... that is a cool idea. :) |
Re: Network Tables
Quote:
Within the Robot Status VI (the one that returns an enum teleop enabled/auton enabled/teleop disabled...) is a read to a bit register which has an auton bit, enabled bit, and test bit. I read this directly and do a bit of boolean logic to output an 'auton enabled' and 'reinit' flag. Whenever we are not auton enabled we run the driver control code, when whenever the enabled bit goes from low to high we reinit. Reinit resets the state machines to their initial (safe) states, and clears the integrators of all of the control loops. We no longer use any of the FRC provided framework, or the majority of the libraries, and the code has gotten a lot simpler and cleaner since we did that. |
| All times are GMT -5. The time now is 22:01. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi