AP_Scheduler: compile warnings: format not a string literal, argument types not checked

PSTR() goofs things up when using hal.console->printf_P()
This commit is contained in:
Tom Pittenger 2015-05-03 00:39:12 -07:00 committed by Andrew Tridgell
parent bfd1b2b11a
commit d823541eb1

View File

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