PID: fix example using wrong type

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());
                                                     ^
This commit is contained in:
Lucas De Marchi 2016-02-18 02:32:09 -02:00
parent edd3e3c34a
commit d387deb2f5
1 changed files with 1 additions and 1 deletions

View File

@ -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());
}