apsua
Member level 3
Because it also happens in another place, too, I thought it is no more necessary to attach the function itself. I am attaching it below:
And as a note:
Some unnecessary codes are also available in it, written to test.
Anyway, I have just started a test by commenting the following lines, will see what will happen:
By the way, what is the problem with the "enable_interrupts(GLOBAL);" in the interrupt routine?
Code:
int1 IsRecordOnCurFloor()
{
int8 temp;
temp = recordsIn;
if(recordsIn != 0) {
if(!b_duplicateCounterPreventFlag3) {
invalidDataCounter2+=10;
WriteEeprom(invalidDataCtr2E2, invalidDataCounter2);
b_duplicateCounterPreventFlag3 = 1;
}
}
else {
b_duplicateCounterPreventFlag3 = 0;
}
if(temp &= ~floorControl[currentPosition]) {
return 1; // Şu anki kata kayıt var
}
else {
return 0; // Şu anki kata kayıt yok
}
}
Code:
void WriteEeprom(int8 adr, int8 data)
{
disable_interrupts(GLOBAL);
write_eeprom(adr, data);
enable_interrupts(GLOBAL);
}
Anyway, I have just started a test by commenting the following lines, will see what will happen:
Code:
#device HIGH_INTS = TRUE
disable_interrupts(GLOBAL);
enable_interrupts(GLOBAL);