'P_ON_M' was not declared in this scope
Closed this issue · 2 comments
Trying to compile latest aArtisanQ_PID for TC4+ and running into this error
Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "Arduino Uno"
D:\git\TC4-shield\applications\Artisan\aArtisan_PID\trunk\src\aArtisanQ_PID\cmndreader.cpp: In member function 'virtual boolean pidCmnd::doCommand(CmndParser*)':
cmndreader.cpp:601:39: error: 'P_ON_M' was not declared in this scope
myPID.SetTunings( kp, ki, kd, P_ON_M ); // Proportional on Measurement
^~~~~~
cmndreader.cpp:603:39: error: 'P_ON_E' was not declared in this scope
myPID.SetTunings( kp, ki, kd, P_ON_E ); // Proportional on Error
^~~~~~
aArtisanQ_PID:256:46: error: 'P_ON_E' was not declared in this scope
PID myPID(&Input, &Output, &Setpoint,2,5,1,P_ON_E,DIRECT);
^~~~~~
D:\git\TC4-shield\applications\Artisan\aArtisan_PID\trunk\src\aArtisanQ_PID\aArtisanQ_PID.ino: In function 'void setup()':
aArtisanQ_PID:1488:35: error: 'P_ON_E' was not declared in this scope
myPID.SetTunings(PRO, INT, DER, P_ON_E); // set initial PID tuning values and set Proportional on Error mode
^~~~~~
exit status 1
'P_ON_M' was not declared in this scope
PID library is not updated to the Proportional On Measurement version V1.2.1
Check this line to confirm: https://github.com/br3ttb/Arduino-PID-Library/blob/master/PID_v1.h#L3
If true, you can get it from: https://github.com/br3ttb/Arduino-PID-Library
Thank you
That fixed it