ADAPTIVE_FAN_SLOWING extension to hotend thermal protection (#12853)
This commit is contained in:
committed by
Scott Lahteine
parent
459f4fef60
commit
082f6a27de
@ -180,7 +180,13 @@ namespace ExtUI {
|
||||
return thermalManager.degTargetHotend(extruder - E0);
|
||||
}
|
||||
|
||||
float getFan_percent(const fan_t fan) { return ((float(fan_speed[fan - FAN0]) + 1) * 100) / 256; }
|
||||
float getTargetFan_percent(const fan_t fan) {
|
||||
return thermalManager.fanPercent(thermalManager.fan_speed[fan - FAN0]);
|
||||
}
|
||||
|
||||
float getActualFan_percent(const fan_t fan) {
|
||||
return thermalManager.fanPercent((thermalManager.fan_speed[fan - FAN0] * uint16_t(thermalManager.fan_speed_scaler[fan - FAN0])) >> 7);
|
||||
}
|
||||
|
||||
float getAxisPosition_mm(const axis_t axis) {
|
||||
return flags.manual_motion ? destination[axis] : current_position[axis];
|
||||
@ -560,9 +566,9 @@ namespace ExtUI {
|
||||
thermalManager.setTargetHotend(clamp(value, 0, heater_maxtemp[e] - 15), e);
|
||||
}
|
||||
|
||||
void setFan_percent(float value, const fan_t fan) {
|
||||
void setTargetFan_percent(const float value, const fan_t fan) {
|
||||
if (fan < FAN_COUNT)
|
||||
fan_speed[fan - FAN0] = clamp(round(value * 255 / 100), 0, 255);
|
||||
thermalManager.set_fan_speed(fan - FAN0, map(value, 0, 100, 0, 255));
|
||||
}
|
||||
|
||||
void setFeedrate_percent(const float value) {
|
||||
|
Reference in New Issue
Block a user