code:
Code: Select all
char data[256][128];
readFrame(data,opf); //the line giving the error
Code: Select all
void readFrame(int buffer[256][128], OpticalFlow &opf);
Code: Select all
void readFrame(int buffer[256][128], OpticalFlow &opf) {
if (init_type == 1) {
readLogFrame(buffer, opf);
} else {
readLinFrame(buffer, opf);
}
}
Code: Select all
void readLogFrame(int buffer[256][128], OpticalFlow &opf) {
int x;
int y;
int tmp;
for (y = 0; y < 128; y++) {
sendToOpticFlow(ROWSEL, y, opf); // Select row
delay(3);
for (x = 0; x < 256; x++) {
sendToOpticFlow(ADCOP, 0, opf); // Reset ADC
sendToOpticFlow(COLSEL, x, opf); // Select column
delay_us(3);
sendToOpticFlow(ADCOP, 1, opf); // Start ADC conversion
tmp = readOpticFlow(opf);
buffer[x][y] = tmp;
}
}
}