Add fan percent accessors

This commit is contained in:
Scott Lahteine
2021-04-13 04:00:39 -05:00
parent 4e314ef6d4
commit fd99ea09ec
9 changed files with 32 additions and 33 deletions

View File

@ -696,7 +696,7 @@ void MarlinUI::draw_status_screen() {
c = '*';
}
#endif
lcd_put_u8str(STATUS_FAN_TEXT_X, STATUS_FAN_TEXT_Y, i16tostr3rj(thermalManager.fanPercent(spd)));
lcd_put_u8str(STATUS_FAN_TEXT_X, STATUS_FAN_TEXT_Y, i16tostr3rj(thermalManager.pwmToPercent(spd)));
lcd_put_wchar(c);
}
}

View File

@ -733,14 +733,12 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) {
TERN_(HAS_MULTI_HOTEND, draw_extruder_2_temp(extruder_2_temp, extruder_2_target, forceUpdate));
TERN_(HAS_HEATED_BED, draw_bed_temp(bed_temp, bed_target, forceUpdate));
uint16_t spd = thermalManager.fan_speed[0];
uint8_t spd = thermalManager.fan_speed[0];
#if ENABLED(ADAPTIVE_FAN_SLOWING)
if (!blink && thermalManager.fan_speed_scaler[0] < 128)
spd = thermalManager.scaledFanSpeed(0, spd);
#endif
draw_fan_speed(thermalManager.fanPercent(spd));
draw_fan_speed(thermalManager.pwmToPercent(spd));
// Draw elapsed/remaining time
const bool show_remaining = ENABLED(SHOW_REMAINING_TIME) && (DISABLED(ROTATE_PROGRESS_DISPLAY) || blink);