View Single Post
  #1   Spotlight this post!  
Unread 12-02-2009, 21:25
dboisvert dboisvert is offline
Registered User
AKA: Dan Boisvert
FRC #2405 (Divided by Zero)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Michigan
Posts: 57
dboisvert is an unknown quantity at this point
Micro Switch Code

Declared 2 Micro Switches

Code:
DigitalInput *flipperdoorright;
DigitalInput *flipperdoorleft;
Where I want the variables to get data from

Code:
flipperdoorleft = new DigitalInput(1);
flipperdoorright = new DigitalInput(2);
What I want it do with those variables

Code:
			if (m_leftStick->GetRawButton(5) == 1 && flipperdoorright == 1 ) {
				flipperdoor->Set(Relay::kForward);
				//delay(10);
			} else if (m_leftStick->GetRawButton(4) == 1 && flipperdoorleft == 1 ){
				flipperdoor->Set(Relay::kReverse);
				//delay(10);
			}
			else{
				flipperdoor->Set(Relay::kOff);
			}

(The Error shows up on the if and else if lines)
Error: ISO C++ forbids comparison between pointer and integer

I only included the lines giving me the errors and those that are relative to the question.

So what am I doing wrong?
Reply With Quote