PID: fix compile warnings re float constants

This commit is contained in:
Tom Pittenger 2015-04-24 14:01:39 +09:00 committed by Randy Mackay
parent 91476d78ae
commit f3d13656ba
2 changed files with 4 additions and 4 deletions

View File

@ -16,9 +16,9 @@
class PID { class PID {
public: public:
PID(const float & initial_p = 0.0, PID(const float & initial_p = 0.0f,
const float & initial_i = 0.0, const float & initial_i = 0.0f,
const float & initial_d = 0.0, const float & initial_d = 0.0f,
const int16_t & initial_imax = 0) const int16_t & initial_imax = 0)
{ {
AP_Param::setup_object_defaults(this, var_info); AP_Param::setup_object_defaults(this, var_info);

View File

@ -32,7 +32,7 @@ void setup()
pid.kP(1); pid.kP(1);
pid.kI(0); pid.kI(0);
pid.kD(0.5); pid.kD(0.5f);
pid.imax(50); pid.imax(50);
pid.save_gains(); pid.save_gains();
pid.kP(0); pid.kP(0);