![]() |
define irswitch?
how do you define the ir board commands in the program.
this is what we have but we don't know if it is right #define IRswitch1 #define IRswitch2 #define IRswitch3 #define IRswitch4 or can someone post how they defined the IRswitch? |
Re: define irswitch?
You need to use #define to assign a value to the IRswtich things. They are only placeholders, the compiler will go through and replace all "IRswitch1" with whatever you put after it. So it would like:
Code:
#define IRswitch1 rc_dig_in01Code:
if (!IRswitch1) //If the IR has been pressedCode:
// IR Inputs |
Re: define irswitch?
We NOT our digital ins right there at the macro. Like what psy_wombats said, but I think that it reads better in the if statements. Digital inputs become false when the circuit is closed. =)
Code:
#define IRswitch1 !rc_dig_in01 |
Re: define irswitch?
Quote:
|
| All times are GMT -5. The time now is 18:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi