
01-12-2006, 15:47
|
|
Registered User
AKA: !!Mitch!!
 FRC #1392
Team Role: Programmer
|
|
Join Date: Nov 2006
Rookie Year: 2006
Location: Ajax, Canada
Posts: 142
|
|
|
Re: Auto Mode!!! WHOA...what tha?
Quote:
|
Originally Posted by Alan Anderson
Unless something else assigns a different value to pwm01, that is correct.
Unless something else assigns a different value to pwm01, that is wrong.
You seem to be under the impression that "declaring" a variable works some magic that keeps setting it to a specific value. If you want pwm01 to always be 127 when the button is released, you'll have to do it yourself. Either
Code:
pwm01 = 127;
if (rc_dig_in01 == 0)
{
pwm01 = 0;
}
or
Code:
if (rc_dig_in01 == 0)
{
pwm01 = 0;
}
else
{
pwm01 = 127;
}
|
awesome thanxs alot
|