View Single Post
  #4   Spotlight this post!  
Unread 14-02-2013, 09:16
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: Stopping all motors

Quote:
Originally Posted by Ilya122 View Post
Hmm It's kind of an Emegency stop button.
Then use the space bar. That will stop ALL motors!
Quote:
I want to stop everything so it wont stuck.. For example. Im running in a loop and any other code wont work because I'm in a loop.
Then get rid of the loops.
THERE SHOULD BE NO LOOPS IN YOUR TELEOP.
Quote:
I want to exit the loop and stop every action with a single press..?
The space bar will do that.
Quote:
As I described it's still some sort of duplication.. anyhow I'l need to put it in 15 loops which is kind of silly.
Either rework your architecture to get rid of the time grabbing loops or put a Joy Stick Get in each loop to kill the loops.
Quote:
I'm not an amatuer programmer and I know about duplication code and every bad habit of coding. I know about our drawbacks of coding. If I was the lead programmer I would change everything. Because of the time and waste of other's time I don't want to do that.?
No comment.
Quote:
So how do I make a stop button for everything without stucking the robot with running code?
I do not understand this question. I do not know how to add a stop button without adding or "stucking the robot with running code". We do not have some magic trick for you without adding "running code" to your code.

A "professional" programmer would have planed out the correct architecture before wiring the first node on the block diagram and avoided endless loops that block the rest of the code from running.
__________________
Omar
Reply With Quote