1347 fprintf(stdout, "sp=%.2f pv=%.2f err_old=%.2f err=%.2f P_err=%.2f I_err=%.2f D_err=%.2f Out=%.2f\n", |
1347 fprintf(stdout, "sp=%.2f pv=%.2f err_old=%.2f err=%.2f P_err=%.2f I_err=%.2f D_err=%.2f Out=%.2f\n", |
1348 sp, pv, unit->PID_err_old, err, P_err, unit->PID_I_err, D_err, Out); |
1348 sp, pv, unit->PID_err_old, err, P_err, unit->PID_I_err, D_err, Out); |
1349 syslog(LOG_NOTICE, "sp=%.2f pv=%.2f err_old=%.2f err=%.2f P_err=%.2f I_err=%.2f D_err=%.2f Out=%.2f", |
1349 syslog(LOG_NOTICE, "sp=%.2f pv=%.2f err_old=%.2f err=%.2f P_err=%.2f I_err=%.2f D_err=%.2f Out=%.2f", |
1350 sp, pv, unit->PID_err_old, err, P_err, unit->PID_I_err, D_err, Out); |
1350 sp, pv, unit->PID_err_old, err, P_err, unit->PID_I_err, D_err, Out); |
1351 } |
1351 } |
|
1352 unit->PID_err_old = err; |
|
1353 |
1352 if (unit->heater_address) { |
1354 if (unit->heater_address) { |
1353 if (Out >= 2) { |
1355 if (Out >= 2) { |
1354 if (unit->heater_wait < unit->heater_delay) { |
1356 if (unit->heater_wait < unit->heater_delay) { |
1355 unit->heater_wait++; |
1357 unit->heater_wait++; |
1356 syslog(LOG_NOTICE, "heater_wait + %d/%d", unit->heater_wait, unit->heater_delay); |
1358 syslog(LOG_NOTICE, "heater_wait + %d/%d", unit->heater_wait, unit->heater_delay); |