|
@@ -41,6 +41,7 @@ int temp2analogBed(int celsius);
|
41
|
41
|
float analog2temp(int raw);
|
42
|
42
|
float analog2tempBed(int raw);
|
43
|
43
|
extern int target_raw[3];
|
|
44
|
+extern int heatingtarget_raw[3];
|
44
|
45
|
extern int current_raw[3];
|
45
|
46
|
extern float Kp,Ki,Kd,Kc;
|
46
|
47
|
|
|
@@ -79,6 +80,7 @@ FORCE_INLINE float degTargetBed() { return analog2tempBed(target_raw[TEMPSENSO
|
79
|
80
|
FORCE_INLINE void setTargetHotend0(const float &celsius)
|
80
|
81
|
{
|
81
|
82
|
target_raw[TEMPSENSOR_HOTEND_0]=temp2analog(celsius);
|
|
83
|
+ heatingtarget_raw[TEMPSENSOR_HOTEND_0]=temp2analog(celsius-HEATING_EARLY_FINISH_DEG_OFFSET);
|
82
|
84
|
#ifdef PIDTEMP
|
83
|
85
|
pid_setpoint = celsius;
|
84
|
86
|
#endif //PIDTEMP
|
|
@@ -90,10 +92,10 @@ FORCE_INLINE float setTargetHotend(const float &celcius, uint8_t extruder){
|
90
|
92
|
};
|
91
|
93
|
FORCE_INLINE void setTargetBed(const float &celsius) { target_raw[TEMPSENSOR_BED ]=temp2analogBed(celsius);};
|
92
|
94
|
|
93
|
|
-FORCE_INLINE bool isHeatingHotend0() {return target_raw[TEMPSENSOR_HOTEND_0] > current_raw[TEMPSENSOR_HOTEND_0];};
|
|
95
|
+FORCE_INLINE bool isHeatingHotend0() {return heatingtarget_raw[TEMPSENSOR_HOTEND_0] > current_raw[TEMPSENSOR_HOTEND_0];};
|
94
|
96
|
FORCE_INLINE bool isHeatingHotend1() {return target_raw[TEMPSENSOR_HOTEND_1] > current_raw[TEMPSENSOR_HOTEND_1];};
|
95
|
97
|
FORCE_INLINE float isHeatingHotend(uint8_t extruder){
|
96
|
|
- if(extruder == 0) return target_raw[TEMPSENSOR_HOTEND_0] > current_raw[TEMPSENSOR_HOTEND_0];
|
|
98
|
+ if(extruder == 0) return heatingtarget_raw[TEMPSENSOR_HOTEND_0] > current_raw[TEMPSENSOR_HOTEND_0];
|
97
|
99
|
if(extruder == 1) return target_raw[TEMPSENSOR_HOTEND_1] > current_raw[TEMPSENSOR_HOTEND_1];
|
98
|
100
|
};
|
99
|
101
|
FORCE_INLINE bool isHeatingBed() {return target_raw[TEMPSENSOR_BED] > current_raw[TEMPSENSOR_BED];};
|