Browse Source

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());
                                                     ^
master
Lucas De Marchi 9 years ago
parent
commit
d387deb2f5
  1. 2
      libraries/PID/examples/pid/pid.cpp

2
libraries/PID/examples/pid/pid.cpp

@ -32,7 +32,7 @@ void setup() @@ -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());
}

Loading…
Cancel
Save