|
|
|
@ -226,7 +226,7 @@ void PID_Calc() // pid calc
|
|
|
|
float t_out = pid.set_tem - pid.out_tem; // 7
|
|
|
|
float t_out = pid.set_tem - pid.out_tem; // 7
|
|
|
|
float t_in = pid.set_tem - pid.now_tem; // 1.1
|
|
|
|
float t_in = pid.set_tem - pid.now_tem; // 1.1
|
|
|
|
float hp_base = -0.003125 * t_out * t_out + 0.1875 * t_out;
|
|
|
|
float hp_base = -0.003125 * t_out * t_out + 0.1875 * t_out;
|
|
|
|
pid.hp = (6 - hp_base) / 3 * t_in + hp_base;
|
|
|
|
pid.hp = (6 - hp_base) / 2 * t_in + hp_base;
|
|
|
|
if (pid.hp < 0) {
|
|
|
|
if (pid.hp < 0) {
|
|
|
|
pid.hp = 0;
|
|
|
|
pid.hp = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|