Update K1 => PID_K1

This commit is contained in:
Scott Lahteine 2017-12-05 19:31:27 -06:00
parent b1f3dfab28
commit 794f8f1329
42 changed files with 132 additions and 133 deletions

View file

@ -96,6 +96,17 @@ enum ADCSensorState {
#define ACTUAL_ADC_SAMPLES max(int(MIN_ADC_ISR_LOOPS), int(SensorsReady))
#if HAS_PID_HEATING
#define PID_K2 (1.0-PID_K1)
#define PID_dT ((OVERSAMPLENR * float(ACTUAL_ADC_SAMPLES)) / (F_CPU / 64.0 / 256.0))
// Apply the scale factors to the PID values
#define scalePID_i(i) ( (i) * PID_dT )
#define unscalePID_i(i) ( (i) / PID_dT )
#define scalePID_d(d) ( (d) / PID_dT )
#define unscalePID_d(d) ( (d) * PID_dT )
#endif
#if !HAS_HEATER_BED
constexpr int16_t target_temperature_bed = 0;
#endif
@ -124,10 +135,6 @@ class Temperature {
soft_pwm_count_fan[FAN_COUNT];
#endif
#if ENABLED(PIDTEMP) || ENABLED(PIDTEMPBED)
#define PID_dT ((OVERSAMPLENR * float(ACTUAL_ADC_SAMPLES)) / (F_CPU / 64.0 / 256.0))
#endif
#if ENABLED(PIDTEMP)
#if ENABLED(PID_PARAMS_PER_HOTEND) && HOTENDS > 1
@ -148,12 +155,6 @@ class Temperature {
#endif // PID_PARAMS_PER_HOTEND
// Apply the scale factors to the PID values
#define scalePID_i(i) ( (i) * PID_dT )
#define unscalePID_i(i) ( (i) / PID_dT )
#define scalePID_d(d) ( (d) / PID_dT )
#define unscalePID_d(d) ( (d) * PID_dT )
#endif
#if ENABLED(PIDTEMPBED)