|
Try this...
Posted by Nate Smith at 2/10/2001 3:07 PM EST
Other on team #66, Frostbite, from Willow Run High School and GM Powertrain.
In Reply to: Re: Need help in creating program to use servo's to shift dr
Posted by Chris Orimoto on 2/10/2001 2:31 PM EST:
: If that is the case, then you COULD program the
: operator interface LED's to respond when the
: joysticks are in the "dead zone". That's what we
: did last year...sorry, but I don't remember the code
: off hand.
: Just my personal thoughts...
: Chris, #368
Here's something that should work...
1. Define a bit variable to keep track of whether or not it is safe to shift.
shiftOK VAR bit
2. After your deadstick routine(if you don't have one, i'd highly recommend it), put in code to check if your PWM outputs are 127(off) and set your shiftOK to 1 if they BOTH are, 0 otherwise...(yes, i know this isn't the best code for doing this, but anyway...)
shiftOK = 0
if PWM1 = 127 then check2
goto cantshift
check2:
if PWM2 = 127 then setshift
goto cantshift
setshift:
shiftOK = 1
cantshift:
3. Then, check the value of shiftOK when determining if you want to shift or not...
Nate
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
|