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

@ -236,7 +236,7 @@ void disp_bed_temp() {
}
void disp_fan_speed() {
sprintf_P(public_buf_l, PSTR("%d%%"), thermalManager.fanPercent(thermalManager.fan_speed[0]));
sprintf_P(public_buf_l, PSTR("%d%%"), thermalManager.fanSpeedPercent(0));
lv_label_set_text(labelFan, public_buf_l);
}

View File

@ -241,7 +241,7 @@ void lv_draw_ready_print() {
lv_obj_align(labelBedTarget, buttonBedstate, LV_ALIGN_CENTER, 0, TARGET_LABEL_MOD_Y);
#endif
sprintf_P(buf, PSTR("%d%%"), thermalManager.fanPercent(thermalManager.fan_speed[0]));
sprintf_P(buf, PSTR("%d%%"), (int)thermalManager.fanSpeedPercent(0));
lv_label_set_text(labelFan, buf);
lv_obj_align(labelFan, buttonFanstate, LV_ALIGN_CENTER, 0, LABEL_MOD_Y);
}

View File

@ -297,7 +297,7 @@ namespace ExtUI {
float getTargetFan_percent(const fan_t fan) {
#if HAS_FAN
return thermalManager.fanPercent(thermalManager.fan_speed[fan - FAN0]);
return thermalManager.fanSpeedPercent(fan - FAN0);
#else
UNUSED(fan);
return 0;
@ -306,7 +306,7 @@ namespace ExtUI {
float getActualFan_percent(const fan_t fan) {
#if HAS_FAN
return thermalManager.fanPercent(thermalManager.scaledFanSpeed(fan - FAN0));
return thermalManager.scaledFanSpeedPercent(fan - FAN0);
#else
UNUSED(fan);
return 0;