Arduino-PID-Library icon indicating copy to clipboard operation
Arduino-PID-Library copied to clipboard

Error while compiling the example

Open set4up opened this issue 6 years ago • 2 comments

I downloaded and installed the library, and on all examples gives an error: C:\YandexDisk\arduino-1.0.6\libraries\PID_v1\PID_v1.cpp: In constructor 'PID::PID(double*, double*, double*, double, double, double, int)': C:\YandexDisk\arduino-1.0.6\libraries\PID_v1\PID_v1.cpp:46: error: type 'PID' is not a direct base of 'PID'

set4up avatar Sep 14 '18 05:09 set4up

same problem

Jai-wei avatar Nov 30 '19 18:11 Jai-wei

This helps (46 line in cpp lib file), i.e. not declare as code definition (not works seems) but just run

/Constructor (...)********************************************************

  • To allow backwards compatability for v1.1, or for people that just want
  • to use Proportional on Error without explicitly saying so ***************************************************************************/

PID::PID(double* Input, double* Output, double* Setpoint, double Kp, double Ki, double Kd, int ControllerDirection) { PID(Input, Output, Setpoint, Kp, Ki, Kd, P_ON_E, ControllerDirection);

}

softm39 avatar Dec 06 '21 11:12 softm39