diff --git a/libraries/AP_HAL_ESP32/Scheduler.cpp b/libraries/AP_HAL_ESP32/Scheduler.cpp index 8b683b6e34dc3..39413f9331b2b 100644 --- a/libraries/AP_HAL_ESP32/Scheduler.cpp +++ b/libraries/AP_HAL_ESP32/Scheduler.cpp @@ -565,7 +565,9 @@ void IRAM_ATTR Scheduler::_main_thread(void *arg) sched->delay_microseconds(250); // run stats periodically +#ifdef SCHEDDEBUG sched->print_stats(); +#endif sched->print_main_loop_rate(); if (ESP_OK != esp_task_wdt_reset()) {