From d387deb2f5e66f0b7268617c5c709c89fbe9c478 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 18 Feb 2016 02:32:09 -0200 Subject: [PATCH] PID: fix example using wrong type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pid.imax() has type int16_t ../../libraries/PID/examples/pid/pid.cpp:36:53: warning: format ‘%f’ expects argument of type ‘double’, but argument 6 has type ‘int’ [-Wformat=] pid.kP(), pid.kI(), pid.kD(), pid.imax()); ^ --- libraries/PID/examples/pid/pid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/PID/examples/pid/pid.cpp b/libraries/PID/examples/pid/pid.cpp index 2b825ae56a..51e1413cc9 100644 --- a/libraries/PID/examples/pid/pid.cpp +++ b/libraries/PID/examples/pid/pid.cpp @@ -32,7 +32,7 @@ void setup() pid.imax(0); pid.load_gains(); hal.console->printf( - "P %f I %f D %f imax %f\n", + "P %f I %f D %f imax %d\n", pid.kP(), pid.kI(), pid.kD(), pid.imax()); }