stop() method

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

stop() method

Postby airglide » Sat May 12, 2012 1:18 pm

hello everyone

I'm having problem with the stop() method, because the two motors don't stop at the same time, and so the robot moves a bit...

If I call the forward() method and than thread.Delay() this doesn't happen

has someone a solution for me?

I thought turning down the speed would decrease the fault but it isn't a very pretty thing ;)

thank you for your help ;)

airglide ;)
airglide
New User
 
Posts: 19
Joined: Sun Mar 04, 2012 2:09 pm

Re: stop() method

Postby skoehler » Sat May 12, 2012 1:34 pm

skoehler
leJOS Team Member
 
Posts: 1405
Joined: Thu Oct 30, 2008 4:54 pm

Re: stop() method

Postby airglide » Sat May 19, 2012 1:05 pm

sorry, I don't get what do you want to say ;) do I have to use the method which uses a boolean as a parameter?

airglide
airglide
New User
 
Posts: 19
Joined: Sun Mar 04, 2012 2:09 pm

Re: stop() method

Postby skoehler » Sat May 19, 2012 1:07 pm

Read the documentation more carefully! If you pass true to that method, it will return instantly, not waiting for the motor to actually stop. Also note, that stop() is equivalent to stop(false), which means that Motor.A.stop(); Motor.B.stop(); makes Motor B stop after Motor A has really stopped - which is not what you want.
skoehler
leJOS Team Member
 
Posts: 1405
Joined: Thu Oct 30, 2008 4:54 pm

Re: stop() method

Postby airglide » Sat May 19, 2012 10:35 pm

now i get it ;) thank you very much
airglide
New User
 
Posts: 19
Joined: Sun Mar 04, 2012 2:09 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 5 guests

more stuff