diff --git a/PID_v1/PID_v1.cpp b/PID_v1/PID_v1.cpp index fa67494..a5a76ae 100644 --- a/PID_v1/PID_v1.cpp +++ b/PID_v1/PID_v1.cpp @@ -46,7 +46,7 @@ void PID::Compute() { if(!inAuto) return; unsigned long now = millis(); - int timeChange = (now - lastTime); + unsigned long timeChange = (now - lastTime); if(timeChange>=SampleTime) { /*Compute all the working error variables*/