Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Camera Code in main thread + watchdog = twitching servo? (http://www.chiefdelphi.com/forums/showthread.php?t=83393)

Joohoo 22-02-2010 15:24

Camera Code in main thread + watchdog = twitching servo?
 
Ok here is a problem that we are finding when we combined the default circle tracker code, with some modifications to remove the pan/tilt servos.

When we add this code into our moderately sized project, we find that our first servo that we instantiate twitches. This happens regardless of where which pwm port we plug it into.

My thoughts were that since the watchdog is running in the background and there are a few Thread.yield() calls in the canned code we got. We are confusing the watchdog making it start it's shtf shutdown sequence, starting with the first servo it can find, the one w/ the lowest address. Then after the thread stops yielding, it recovers and sets the servo to the specific value that it was before the thread yielded.

Is this a reasonable explanation or is this not possible with the way the watchdog works. Is this what happens when you yield the main robot thread?

Bart 22-02-2010 16:26

Re: Camera Code in main thread + watchdog = twitching servo?
 
Team 2625 here, we have the exact problem here, I think its probably because the camera takes too much time to process and the watchdog dies before it's fed.


All times are GMT -5. The time now is 09:26.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi