|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
pic: Another Teleop while loop
|
|
#2
|
|||||
|
|||||
|
Re: pic: Another Teleop while loop
Are you actually using this code in Teleop? What I see would completely break the robot program if it were placed there.
|
|
#3
|
||||
|
||||
|
Re: pic: Another Teleop while loop
Yes, I am. It works too. I wonder why people keep telling me that there's something wrong? Please tell me if I am missing anything.
![]() |
|
#4
|
|||||
|
|||||
|
Re: pic: Another Teleop while loop
If "stop" isn't true, then putting that while loop in Teleop will keep the rest of the robot program from running. I would expect to see communication issues indicated on the Driver Station.
Since you don't have any sort of delay in the loop, it will also use up all of the CPU time setting the motor output as fast as it can. |
|
#5
|
||||
|
||||
|
Re: pic: Another Teleop while loop
Huh. It doesn't seem to do that when I run it in parallel with my other loops. I wonder why?
![]() |
|
#6
|
||||
|
||||
|
Re: pic: Another Teleop while loop
Telepop itself is in a loop. Adding a while loop inside it is, at the very least, redundant. Although I can see why others think it might cause problems as well.
|
|
#7
|
||||
|
||||
|
Re: pic: Another Teleop while loop
Well, I pretty much have a few while loops which execute at the same time. I have the loops so that I can fire until the battery dies (if I wanted to). I didn't know that teleop was a loop. Huh. Thanks.
|
|
#8
|
|||||
|
|||||
|
Re: pic: Another Teleop while loop
Teleop isn't exactly in a loop. It's called by the Robot Main vi whenever the Driver Station sends new data, and if your Teleop code doesn't finish before the next data packet arrives you'll start tripping the communication watchdog. Putting a neverending loop inside Teleop is a sure way to break your code.
Can you post your Teleop.vi file? I'm curious what you've done that lets the robot work even with the collection of unthrottled and unterminated while loops you say you've put there. |
|
#9
|
||||
|
||||
|
Can't right now. my younger brother kneeled on our programming computer and broke the screen, so...
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|