for you that don't know I grew up writing C code. So my Code Base has multiple files currently working on my Landing Gear for my sim.
I have the following files in the LandingGear directory:
LandingGear.ino
isr1.c through isr5.c
lamps.c
and landingGear.h
so in lamps.c i have my code for the lamp test.
void lampTest( int state ){
for( int count = 0; count < 10; count++;) {
digitalWrite( Lamps.pin[count] ); }
}
it is called from isr4 (isr4.c)
it is also declared in landingGear.h
#define TRUE 1
#define FALSE -1
#define ON 1
#define OFF 0
/************************** Prototypes *****************************/
void lampTest( int state );
void lamp( Lamps.pin[count], int state );
void blink( Lamps.pin[count] );
typedef struct Lamps{
char name[];
char name[];
lamp} Lamps[] = {
{22, "RIGHT", "RED"}, {23, "NOSE", "RED"}, {24, "LEFT", "RED"},
{25, "RIGHT", "GREEN"}, {26, "NOSE", "GREEN"}, {27, "LEFT", "GREEN"},
{28, "WARNnose", "GREEN"}, {29, "WARNgear, "ORANGE"}, {30, "WARNnoseDis, "BLUE"}, {31, "WARNskid", "RED"}};
and pucks with this isr4.c:2:12: error: ‘ON’ undeclared (first use in this function) lampTest( ON );
cam anybody give me a straight answer why this happens???
~~ thanks C Harrison