I have this problem whenever i try to "build" my project ..
Call signature does not match the function definition
my code is as follow:
Code: Select all
void RSSI (int, int, int, int, int);
void Align(int, int, int, int, int);
void main ()
{
int Motors [] = { 0x01, 0x02, 0x04, 0x08 }; // array for contolling the motors
int c;
int x, r, l, SR;
ADCON1 = 7; // configure PORTA as Digital
TRISA = 1; // A ports as inputs
TRISB = 0; // B ports as outputs for right motor 4-bits
TRISC = 0; // C ports as outputs for left motor 4-bits
TRISD = 0; // D ports as outputs for antenna motor 4-bits
PORTA = 0; // initialize PORTA
PORTB = 0; // initialize PORTB
PORTC = 0; // initialize PORTC
PORTD = 0; // initialize PORTD
S1: // start of main loop
for (c = 1, x = 1 ; c <= 36 ; c++)
{
A:
//if (PORTA.F2 == 1) goto S3;
if (x >= 4) x = 0;
PORTB = Motors [x];
PORTC = Motors [x];
PORTD = Motors [x];
Delay_ms (1000);
RSSI(c, x, r, l, SR);
x++;
} //end of main loop
goto S1;
}
void RSSI (int c, int x, int r, int l, int SR)
{
unsigned int ARSSI, BRSSI;
ADCON1 = 0x80; // Configure analog inputs and Vref
ARSSI = Adc_Read (1);
Delay_us(10);
BRSSI = Adc_Read (2);
Delay_us(10);
if (ARSSI == BRSSI) Align(c, x, r, l, SR);
}
Align (int c, int x, int r, int l, int SR)
{
int Motors [] = { 0x01, 0x02, 0x04, 0x08 }; // array for contolling the motors
//ADCON1 = 7; // configure PORTA as Digital
if ( c >= 1 && c <= 18 )
{
for ( r = x,l = x ; c <= 1; c--)
{
r--;
l++;
if (r <= -1) r = 3;
if (l >= 4) l = 0;
PORTB = Motors [r];
PORTC = Motors [l];
PORTD = Motors [r];
Delay_ms (1000);
} //end of loop where C >= 18
} //end of 1st statement of IF
{
for ( r = x,l = x ; c <= 36; c++ )
{
r++;
l--;
if (l <= -1) l = 3;
if (r >= 4) r = 0;
PORTB = Motors [r];
PORTC = Motors [l];
PORTD = Motors [r];
Delay_ms (1000);
} // end of loop where C > 18
} //end of 2nd statment of 2nd IF
}
if (ARSSI == BRSSI) Align(c, x, r, l, SR);
also , i get the msg in purple :
Result is not defined in function: 'Align' Beta.c
please help me as soon as possible ..
thx in advance