|
|
|
|
566
|
temp_dState_bed = pid_input;
|
566
|
temp_dState_bed = pid_input;
|
567
|
|
567
|
|
568
|
pid_output = pTerm_bed + iTerm_bed - dTerm_bed;
|
568
|
pid_output = pTerm_bed + iTerm_bed - dTerm_bed;
|
569
|
- if (pid_output > MAX_BED_PID) {
|
|
|
|
|
569
|
+ if (pid_output > MAX_BED_POWER) {
|
570
|
if (pid_error_bed > 0 ) temp_iState_bed -= pid_error_bed; // conditional un-integration
|
570
|
if (pid_error_bed > 0 ) temp_iState_bed -= pid_error_bed; // conditional un-integration
|
571
|
pid_output=PID_MAX;
|
571
|
pid_output=PID_MAX;
|
572
|
} else if (pid_output < 0){
|
572
|
} else if (pid_output < 0){
|