Browse Source

SITL: fixed SITL for example sketches

cope with no SITL object
master
Andrew Tridgell 10 years ago
parent
commit
c5e4e8f035
  1. 2
      libraries/AP_HAL_AVR_SITL/Scheduler.cpp

2
libraries/AP_HAL_AVR_SITL/Scheduler.cpp

@ -209,7 +209,7 @@ void SITLScheduler::system_initialized() { @@ -209,7 +209,7 @@ void SITLScheduler::system_initialized() {
panic(
PSTR("PANIC: scheduler system initialized called more than once"));
}
if (_sitlState->_sitl->float_exception) {
if (_sitlState->_sitl == NULL || _sitlState->_sitl->float_exception) {
feenableexcept(FE_INVALID | FE_OVERFLOW | FE_DIVBYZERO);
} else {
feclearexcept(FE_INVALID | FE_OVERFLOW | FE_DIVBYZERO);

Loading…
Cancel
Save