|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Does the periodic in java need to execute in 20ms. If so is there a Periodic tasks in Java?
|
|
#2
|
|||
|
|||
|
Re: Coding in a sequence.
oh ok. thank you guys!
|
|
#3
|
|||
|
|||
|
Re: Coding in a sequence.
So the command will still execute correctly in Periodic Tasks, right?
|
|
#4
|
|||||
|
|||||
|
Re: Coding in a sequence.
Yes.
You just need to enclose your code in a While loop that runs forever (and a little delay to keep from hogging the CPU). You can pretty much do anything that you'd do in Teleop. |
|
#5
|
||||
|
||||
|
Re: Coding in a sequence.
Quote:
|
|
#6
|
||||||
|
||||||
|
Re: Coding in a sequence.
Quote:
There are a few things you can do to work around this. 1) Use the Simple Robot template 2) Use a state machine. 2a) Switch to the command framework (which uses a state machine). See http://wpilib.screenstepslive.com/s/...nomous-program 3) Run the code in a new Task. This would be equivalent to Periodic Tasks in LabVIEW. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|