AP_Scheduler: show slips only for SCHED_DEBUG>1

this allows us to see PERF reports in copter without console writes
slowing things down
This commit is contained in:
Andrew Tridgell 2013-10-08 22:08:19 +11:00
parent cdf813697a
commit cfa1b5353f

View File

@ -70,7 +70,7 @@ void AP_Scheduler::run(uint16_t time_available)
if (dt >= interval_ticks*2) {
// we've slipped a whole run of this task!
if (_debug != 0) {
if (_debug > 1) {
hal.console->printf_P(PSTR("Scheduler slip task[%u] (%u/%u/%u)\n"),
(unsigned)i,
(unsigned)dt,
@ -95,7 +95,7 @@ void AP_Scheduler::run(uint16_t time_available)
if (time_taken > _task_time_allowed) {
// the event overran!
if (_debug > 1) {
if (_debug > 2) {
hal.console->printf_P(PSTR("Scheduler overrun task[%u] (%u/%u)\n"),
(unsigned)i,
(unsigned)time_taken,