View Single Post
  #15   Spotlight this post!  
Unread 01-12-2006, 15:47
teh_pwnerer795 teh_pwnerer795 is offline
Registered User
AKA: !!Mitch!!
FRC #1392
Team Role: Programmer
 
Join Date: Nov 2006
Rookie Year: 2006
Location: Ajax, Canada
Posts: 142
teh_pwnerer795 is just really niceteh_pwnerer795 is just really niceteh_pwnerer795 is just really niceteh_pwnerer795 is just really nice
Send a message via MSN to teh_pwnerer795 Send a message via Yahoo to teh_pwnerer795
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