|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
pic: Programming is as easy as you make it.
Last edited by nxtmonkeys : 19-02-2014 at 11:59. Reason: I want to add to it. |
|
#2
|
|||||
|
|||||
|
Re: pic: Programming is as easy as you make it.
I had been told that it wan't possible to use while loops in Teleop. I guess I was wrong. This is cool!
|
|
#3
|
||||
|
||||
|
Re: pic: Programming is as easy as you make it.
I'm pretty sure that wouldn't be good for use in teleop
|
|
#4
|
|||||
|
|||||
|
Re: pic: Programming is as easy as you make it.
As long as it is in a separate thread its fine.
|
|
#5
|
||||
|
||||
|
Re: pic: Programming is as easy as you make it.
Oh, well I guess you could do that then |
|
#6
|
||||
|
||||
|
Re: pic: Programming is as easy as you make it.
Just wire something to the Loop Condition terminal so that it can end. While loops are useful for Autonomous too.
|
|
#7
|
||||
|
||||
|
Re: pic: Programming is as easy as you make it.
Timed actions are best processed in Periodic Tasks
They will slow down your TeleOp code if placed there Last edited by geomapguy : 19-02-2014 at 13:08. |
|
#8
|
|||||
|
|||||
|
Re: pic: Programming is as easy as you make it.
This example is good for use in Autonomous and Periodic Tasks.
As shown, this example cannot be placed in Teleop. |
|
#9
|
||||
|
||||
|
Re: pic: Programming is as easy as you make it.
I made this program up to help out someone who wanted to know if he did it right. based on all of your posts, I was able to help him a lot more. Thanks a ton!
![]() |
|
#10
|
||||
|
||||
|
Re: pic: Programming is as easy as you make it.
That is not the safest way to accomplish that task nor should it ever be in teleop. You should write the inputs from the joysticks to global variables and read them in period tasks in their appropriate loops.
|
|
#11
|
||||
|
||||
|
Re: pic: Programming is as easy as you make it.
Yeah, I told him that. I haven't gotten a reply yet, though.
|
|
#12
|
||||
|
||||
|
Re: pic: Programming is as easy as you make it.
Quote:
You can just reference the joystick in Periodic Tasks |
|
#13
|
||||
|
||||
|
Re: pic: Programming is as easy as you make it.
Well, I'M not using the program. I recently uploaded a few pictures of my teleop program.
![]() ![]() ![]() |
|
#14
|
||||
|
||||
|
Re: pic: Programming is as easy as you make it.
Quote:
...But if you do you can manipulate those variables in autonomous. |
|
#15
|
||||
|
||||
|
Re: pic: Programming is as easy as you make it.
I'm just happy that the code WORKS.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|