414,7 → 414,6 |
static u32 logtimer = 0; |
static logfilestate_t logstate = LOGFILE_IDLE; |
|
|
if(SD_SWITCH) // a card is in slot |
{ |
if(CheckDelay(logtimer)) |
422,7 → 421,7 |
logtimer = SetDelay(10); // faster makes no sense |
// call the logger handlers if no error has occured |
if(logstate != LOGFILE_ERROR) |
{ // run oonly one logging handler per loop |
{ // run only one logging handler per loop |
switch(logmodule++) |
{ |
case 0: |
438,7 → 437,9 |
} |
} |
else // a logging error has occured |
{ // try to reinitialize sd-card when motors are not running |
{ |
/* |
// try to reinitialize sd-card when motors are not running |
if(!(FC.MKFlags & MKFLAG_MOTOR_RUN)) |
{ |
if(Fat16_IsValid()) // wait for reinizialization of fat16 from outside |
452,6 → 453,7 |
logtimer = SetDelay(5000); // try again in 5 sec |
} |
} // EOF motors are not running |
*/ |
} //EOF logfile error |
} // EOF CheckDelay |
}// EOF Card in Slot |