HAL_SITL: don't run IO procs in examples

This commit is contained in:
Andrew Tridgell 2024-02-23 11:59:06 +11:00
parent d0cec297a8
commit a74dab8c0a
1 changed files with 1 additions and 1 deletions

View File

@ -301,7 +301,7 @@ void Scheduler::_run_io_procs()
void Scheduler::stop_clock(uint64_t time_usec)
{
_stopped_clock_usec = time_usec;
if (time_usec - _last_io_run > 10000) {
if (_sitlState->_sitl != nullptr && time_usec - _last_io_run > 10000) {
_last_io_run = time_usec;
_run_io_procs();
}