Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Inconsistant Joystick (http://www.chiefdelphi.com/forums/showthread.php?t=25585)

bstempi 18-02-2004 22:57

Inconsistant Joystick
 
Here's my problem:
I have an arm that rotates, and inside of it, there is another arm that pokes out. What I wanted to do was use the second joystick to control it. I use p2_y to control the rotation of the arm on pwm04. I use the hat on p2 (p2_wheel) to retract/extend the arm by pressing up or down. In defaultroutine, pwm04 = p2_y. For some reason, the hat will work. It will tell the arm to do what I want it to. The kick in the but comes here: when using dashboard, it tells me that pwm04 is always 127. Sometimes it works, and sometimes it doesn't. It doens't matter what joystick I use, it just randomly decides to work. Anyone else experience this? Should I invest in a new controler? Many thanks.
~Brian Stempin
Captain, Team 708

KenWittlief 18-02-2004 23:03

Re: Inconsistant Joystick
 
is the command sending Pwm4 out to the dashboard before the command that sets it to the joystick value?

search on pwm4 in your code and make sure its not getting equated to something twice.

Astronouth7303 19-02-2004 07:30

Re: Inconsistant Joystick
 
Are you using basicly the default code? Or did you rewrite the Default_Routine? Check below the pwm assignments, and comment out the stuff with pwm04. I had the same problem, and that fixed it. I think its limit switches, but I can't remember.

bstempi 19-02-2004 09:50

Re: Inconsistant Joystick
 
Quote:

Originally Posted by Astronouth7303
Are you using basicly the default code? Or did you rewrite the Default_Routine? Check below the pwm assignments, and comment out the stuff with pwm04. I had the same problem, and that fixed it. I think its limit switches, but I can't remember.

Truth, when I did that, it worked. That was the only time it worked. After that, it went back to behaving as before, but I'll be sure to double check it. It's possible that someone changed the code without my knowing. Other than the limit switch default stuff, pwm04 isn't used anywhere else. Just out of curiosity, should the limit switch stuff matter? I browsed through it and haven't taken the time to pick it apart, but I thought the default was set so that a certain set of pwms didn't operate is a digital input was set to 1. Thank you both for your input.
~Bstempi


All times are GMT -5. The time now is 04:17.

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