Heater for threaded program
Dependents: LEX_Threaded_Programming
Diff: Heater.cpp
- Revision:
- 23:947850bbf325
- Parent:
- 20:2d34a03ae57e
- Child:
- 25:09a315a59956
--- 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;} }