Heater for threaded program
Dependents: LEX_Threaded_Programming_V3
Diff: Heater.cpp
- Revision:
- 23:947850bbf325
- Parent:
- 20:2d34a03ae57e
- Child:
- 25:09a315a59956
diff -r 2d34a03ae57e -r 947850bbf325 Heater.cpp --- a/Heater.cpp Wed Aug 07 16:03:27 2019 +0000 +++ b/Heater.cpp Wed Aug 07 16:37:10 2019 +0000 @@ -74,7 +74,7 @@ //if (error*Kp > WIND_UP_LIMIT) {error_integrated += WIND_UP_LIMIT/Kp;} //else if (error*Kp < -WIND_UP_LIMIT) {error_integrated -= WIND_UP_LIMIT/Kp;} if (abs(error) < WIND_UP_LIMIT) {error_integrated += error;} - if (error_integrated < -0.0) {error_integrated = -0.0;} + if (error_integrated < 0.0) {error_integrated = 0.0;} }