|
|
|
@ -62,7 +62,7 @@ extern float Kp,Ki,Kd,Kc;
|
|
|
|
|
FORCE_INLINE float degHotend0(){ return analog2temp(current_raw[TEMPSENSOR_HOTEND_0]);};
|
|
|
|
|
FORCE_INLINE float degHotend1(){ return analog2temp(current_raw[TEMPSENSOR_HOTEND_1]);};
|
|
|
|
|
FORCE_INLINE float degBed() { return analog2tempBed(current_raw[TEMPSENSOR_BED]);};
|
|
|
|
|
inline float degHotend(uint8_t extruder){
|
|
|
|
|
FORCE_INLINE float degHotend(uint8_t extruder){
|
|
|
|
|
if(extruder == 0) return analog2temp(current_raw[TEMPSENSOR_HOTEND_0]);
|
|
|
|
|
if(extruder == 1) return analog2temp(current_raw[TEMPSENSOR_HOTEND_1]);
|
|
|
|
|
};
|
|
|
|
@ -74,7 +74,7 @@ inline float degTargetHotend(uint8_t extruder){
|
|
|
|
|
if(extruder == 1) return analog2temp(target_raw[TEMPSENSOR_HOTEND_1]);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
inline float degTargetBed() { return analog2tempBed(target_raw[TEMPSENSOR_BED]);};
|
|
|
|
|
FORCE_INLINE float degTargetBed() { return analog2tempBed(target_raw[TEMPSENSOR_BED]);};
|
|
|
|
|
|
|
|
|
|
FORCE_INLINE void setTargetHotend0(const float &celsius)
|
|
|
|
|
{
|
|
|
|
@ -84,27 +84,27 @@ FORCE_INLINE void setTargetHotend0(const float &celsius)
|
|
|
|
|
#endif //PIDTEMP
|
|
|
|
|
};
|
|
|
|
|
FORCE_INLINE void setTargetHotend1(const float &celsius) { target_raw[TEMPSENSOR_HOTEND_1]=temp2analog(celsius);};
|
|
|
|
|
inline float setTargetHotend(const float &celcius, uint8_t extruder){
|
|
|
|
|
FORCE_INLINE float setTargetHotend(const float &celcius, uint8_t extruder){
|
|
|
|
|
if(extruder == 0) setTargetHotend0(celcius);
|
|
|
|
|
if(extruder == 1) setTargetHotend1(celcius);
|
|
|
|
|
};
|
|
|
|
|
inline void setTargetBed(const float &celsius) { target_raw[TEMPSENSOR_BED ]=temp2analogBed(celsius);};
|
|
|
|
|
FORCE_INLINE void setTargetBed(const float &celsius) { target_raw[TEMPSENSOR_BED ]=temp2analogBed(celsius);};
|
|
|
|
|
|
|
|
|
|
FORCE_INLINE bool isHeatingHotend0() {return target_raw[TEMPSENSOR_HOTEND_0] > current_raw[TEMPSENSOR_HOTEND_0];};
|
|
|
|
|
FORCE_INLINE bool isHeatingHotend1() {return target_raw[TEMPSENSOR_HOTEND_1] > current_raw[TEMPSENSOR_HOTEND_1];};
|
|
|
|
|
inline float isHeatingHotend(uint8_t extruder){
|
|
|
|
|
FORCE_INLINE float isHeatingHotend(uint8_t extruder){
|
|
|
|
|
if(extruder == 0) return target_raw[TEMPSENSOR_HOTEND_0] > current_raw[TEMPSENSOR_HOTEND_0];
|
|
|
|
|
if(extruder == 1) return target_raw[TEMPSENSOR_HOTEND_1] > current_raw[TEMPSENSOR_HOTEND_1];
|
|
|
|
|
};
|
|
|
|
|
inline bool isHeatingBed() {return target_raw[TEMPSENSOR_BED] > current_raw[TEMPSENSOR_BED];};
|
|
|
|
|
FORCE_INLINE bool isHeatingBed() {return target_raw[TEMPSENSOR_BED] > current_raw[TEMPSENSOR_BED];};
|
|
|
|
|
|
|
|
|
|
FORCE_INLINE bool isCoolingHotend0() {return target_raw[TEMPSENSOR_HOTEND_0] < current_raw[TEMPSENSOR_HOTEND_0];};
|
|
|
|
|
FORCE_INLINE bool isCoolingHotend1() {return target_raw[TEMPSENSOR_HOTEND_1] < current_raw[TEMPSENSOR_HOTEND_1];};
|
|
|
|
|
inline float isCoolingHotend(uint8_t extruder){
|
|
|
|
|
FORCE_INLINE float isCoolingHotend(uint8_t extruder){
|
|
|
|
|
if(extruder == 0) return target_raw[TEMPSENSOR_HOTEND_0] < current_raw[TEMPSENSOR_HOTEND_0];
|
|
|
|
|
if(extruder == 1) return target_raw[TEMPSENSOR_HOTEND_1] < current_raw[TEMPSENSOR_HOTEND_1];
|
|
|
|
|
};
|
|
|
|
|
inline bool isCoolingBed() {return target_raw[TEMPSENSOR_BED] < current_raw[TEMPSENSOR_BED];};
|
|
|
|
|
FORCE_INLINE bool isCoolingBed() {return target_raw[TEMPSENSOR_BED] < current_raw[TEMPSENSOR_BED];};
|
|
|
|
|
|
|
|
|
|
void disable_heater();
|
|
|
|
|
void setWatch();
|
|
|
|
|