Add fan percent accessors
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user