|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
teleopContinuous() not getting called. Who calls it?
Greetings,
It's my understanding that teleopContinuous() runs as often as possible while teleopPeriodic() is called approximately once every 20ms. Our robot extends IterativeRobot and overrides teleopPeriodic(), which seems to be working. Our teleopContinuous() doesn't seem to be getting called, and I also noticed it doesn't seem to be declared in either IterativeRobot or RobotBase. What am I missing here? Thanks very much for any help clearing up this mystery! David Dobervich |
|
#2
|
|||
|
|||
|
Re: teleopContinuous() not getting called. Who calls it?
The continuous functions have been removed from the Iterative template. See the Changes for C++ and Java section of the 2013 Software Notes.
|
|
#3
|
|||
|
|||
|
Re: teleopContinuous() not getting called. Who calls it?
We found that teams were using the continuous functions with compute-bound code that would swamp the cRIO. It even caused problems with at least two of the Einstein teams from last year.
So we took it out. If a team really needs the continuous functions, then they can start a thread running in the teleopInit() or autonomousInit() methods that will do the continuous running loop. Brad |
|
#4
|
|||
|
|||
|
Re: teleopContinuous() not getting called. Who calls it?
Brad,
Could you be more specific about how create such a thread or point me to some resources? Thanks |
|
#5
|
||||
|
||||
|
Re: teleopContinuous() not getting called. Who calls it?
Quote:
go back a few pages to see how threading works |
|
#6
|
||||||
|
||||||
|
Re: teleopContinuous() not getting called. Who calls it?
The PIDController class creates a thread with a configurable rate. That would be a good example to follow.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|