|
|
|
![]() |
|
|||||||
|
||||||||
this is my two-type throw program
19-02-2014 14:13
Alan Anderson
Are you actually using this code in Teleop? What I see would completely break the robot program if it were placed there.
19-02-2014 14:14
nxtmonkeysYes, 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. 
19-02-2014 14:24
Alan Anderson
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.
19-02-2014 14:26
nxtmonkeysHuh. It doesn't seem to do that when I run it in parallel with my other loops. I wonder why? 
19-02-2014 18:00
PaultTelepop 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.
19-02-2014 18:07
nxtmonkeysWell, 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.
19-02-2014 22:35
Alan Anderson
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.
20-02-2014 10:48
nxtmonkeysCan't right now. my younger brother kneeled on our programming computer and broke the screen, so...
