brewco/pid.c

changeset 473
fdd30e935079
parent 454
78242696c15a
equal deleted inserted replaced
472:55bcbf92ecab 473:fdd30e935079
64 pid->lastInput = *pid->myInput; 64 pid->lastInput = *pid->myInput;
65 if (pid->ITerm > pid->outMax) 65 if (pid->ITerm > pid->outMax)
66 pid->ITerm = pid->outMax; 66 pid->ITerm = pid->outMax;
67 else if (pid->ITerm < pid->outMin) 67 else if (pid->ITerm < pid->outMin)
68 pid->ITerm = pid->outMin; 68 pid->ITerm = pid->outMin;
69 /*
70 * If turned to manual, turn output off.
71 */
72 if (Mode == P_MANUAL)
73 *pid->myOutput = pid->outMin;
69 } 74 }
70 pid->inAuto = newAuto; 75 pid->inAuto = newAuto;
71 } 76 }
72 77
73 78

mercurial