|
@@ -50,13 +50,12 @@ Temperature thermalManager;
|
50
|
50
|
|
51
|
51
|
// public:
|
52
|
52
|
|
53
|
|
-int Temperature::current_temperature_raw[HOTENDS] = { 0 };
|
54
|
|
-float Temperature::current_temperature[HOTENDS] = { 0.0 };
|
55
|
|
-int Temperature::target_temperature[HOTENDS] = { 0 };
|
56
|
|
-
|
57
|
|
-int Temperature::current_temperature_bed_raw = 0;
|
58
|
|
-float Temperature::current_temperature_bed = 0.0;
|
59
|
|
-int Temperature::target_temperature_bed = 0;
|
|
53
|
+float Temperature::current_temperature[HOTENDS] = { 0.0 },
|
|
54
|
+ Temperature::current_temperature_bed = 0.0;
|
|
55
|
+int Temperature::current_temperature_raw[HOTENDS] = { 0 },
|
|
56
|
+ Temperature::target_temperature[HOTENDS] = { 0 },
|
|
57
|
+ Temperature::current_temperature_bed_raw = 0,
|
|
58
|
+ Temperature::target_temperature_bed = 0;
|
60
|
59
|
|
61
|
60
|
#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
|
62
|
61
|
float Temperature::redundant_temperature = 0.0;
|
|
@@ -121,11 +120,11 @@ unsigned char Temperature::soft_pwm_bed;
|
121
|
120
|
volatile bool Temperature::temp_meas_ready = false;
|
122
|
121
|
|
123
|
122
|
#if ENABLED(PIDTEMP)
|
124
|
|
- float Temperature::temp_iState[HOTENDS] = { 0 };
|
125
|
|
- float Temperature::temp_dState[HOTENDS] = { 0 };
|
126
|
|
- float Temperature::pTerm[HOTENDS];
|
127
|
|
- float Temperature::iTerm[HOTENDS];
|
128
|
|
- float Temperature::dTerm[HOTENDS];
|
|
123
|
+ float Temperature::temp_iState[HOTENDS] = { 0 },
|
|
124
|
+ Temperature::temp_dState[HOTENDS] = { 0 },
|
|
125
|
+ Temperature::pTerm[HOTENDS],
|
|
126
|
+ Temperature::iTerm[HOTENDS],
|
|
127
|
+ Temperature::dTerm[HOTENDS];
|
129
|
128
|
|
130
|
129
|
#if ENABLED(PID_ADD_EXTRUSION_RATE)
|
131
|
130
|
float Temperature::cTerm[HOTENDS];
|
|
@@ -134,21 +133,21 @@ volatile bool Temperature::temp_meas_ready = false;
|
134
|
133
|
int Temperature::lpq_ptr = 0;
|
135
|
134
|
#endif
|
136
|
135
|
|
137
|
|
- float Temperature::pid_error[HOTENDS];
|
138
|
|
- float Temperature::temp_iState_min[HOTENDS];
|
139
|
|
- float Temperature::temp_iState_max[HOTENDS];
|
|
136
|
+ float Temperature::pid_error[HOTENDS],
|
|
137
|
+ Temperature::temp_iState_min[HOTENDS],
|
|
138
|
+ Temperature::temp_iState_max[HOTENDS];
|
140
|
139
|
bool Temperature::pid_reset[HOTENDS];
|
141
|
140
|
#endif
|
142
|
141
|
|
143
|
142
|
#if ENABLED(PIDTEMPBED)
|
144
|
|
- float Temperature::temp_iState_bed = { 0 };
|
145
|
|
- float Temperature::temp_dState_bed = { 0 };
|
146
|
|
- float Temperature::pTerm_bed;
|
147
|
|
- float Temperature::iTerm_bed;
|
148
|
|
- float Temperature::dTerm_bed;
|
149
|
|
- float Temperature::pid_error_bed;
|
150
|
|
- float Temperature::temp_iState_min_bed;
|
151
|
|
- float Temperature::temp_iState_max_bed;
|
|
143
|
+ float Temperature::temp_iState_bed = { 0 },
|
|
144
|
+ Temperature::temp_dState_bed = { 0 },
|
|
145
|
+ Temperature::pTerm_bed,
|
|
146
|
+ Temperature::iTerm_bed,
|
|
147
|
+ Temperature::dTerm_bed,
|
|
148
|
+ Temperature::pid_error_bed,
|
|
149
|
+ Temperature::temp_iState_min_bed,
|
|
150
|
+ Temperature::temp_iState_max_bed;
|
152
|
151
|
#else
|
153
|
152
|
millis_t Temperature::next_bed_check_ms;
|
154
|
153
|
#endif
|
|
@@ -157,10 +156,10 @@ unsigned long Temperature::raw_temp_value[4] = { 0 };
|
157
|
156
|
unsigned long Temperature::raw_temp_bed_value = 0;
|
158
|
157
|
|
159
|
158
|
// Init min and max temp with extreme values to prevent false errors during startup
|
160
|
|
-int Temperature::minttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_LO_TEMP , HEATER_1_RAW_LO_TEMP , HEATER_2_RAW_LO_TEMP, HEATER_3_RAW_LO_TEMP);
|
161
|
|
-int Temperature::maxttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_HI_TEMP , HEATER_1_RAW_HI_TEMP , HEATER_2_RAW_HI_TEMP, HEATER_3_RAW_HI_TEMP);
|
162
|
|
-int Temperature::minttemp[HOTENDS] = { 0 };
|
163
|
|
-int Temperature::maxttemp[HOTENDS] = ARRAY_BY_HOTENDS1(16383);
|
|
159
|
+int Temperature::minttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_LO_TEMP , HEATER_1_RAW_LO_TEMP , HEATER_2_RAW_LO_TEMP, HEATER_3_RAW_LO_TEMP),
|
|
160
|
+ Temperature::maxttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_RAW_HI_TEMP , HEATER_1_RAW_HI_TEMP , HEATER_2_RAW_HI_TEMP, HEATER_3_RAW_HI_TEMP),
|
|
161
|
+ Temperature::minttemp[HOTENDS] = { 0 },
|
|
162
|
+ Temperature::maxttemp[HOTENDS] = ARRAY_BY_HOTENDS1(16383);
|
164
|
163
|
|
165
|
164
|
#ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED
|
166
|
165
|
int Temperature::consecutive_low_temperature_error[HOTENDS] = { 0 };
|