Quote:
Originally Posted by Chris_Elston
Greg, so I don't wanna hi-jack but I sort of have the same question here because the period tasks are new in the 2012 framework compared to the 2011, 2010 and 2009 framework.
If there is a button on a joystick that is pressed to turn on a motor setting, you're saying it's best to place this in periodic tasks? Rather than place the motor set output in telop?
Should we only put robot drive code or joystick to robot drive in teleop and let's say all other components in period tasks?
thanks.
Chris
|
*I have not actually seen the 2012 framework and I am going off of my programming work in 2011*
What I would do is put the motor setting in periodic and the control for it in teleop. you connect the two with a global variable. (teleop writes to it, periodic reads it)
Likewise, you write to the global variable in autonomous as well.
Hope that helps.
__________________
Dean's List Semi-finalist 2010
1747 Harrison Boiler Robotics 2008-2010, 2783 Engineers of Tomorrow 2011, Event Volunteer 2012-current
DISCLAIMER: Any opinions/comments posted are solely my personal opinion and does not reflect the views/opinions of FIRST, IndianaFIRST, or any other organization.