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 |