Add whole-degree accessors, simplify some temperature-related features (#21685)
This commit is contained in:
@ -525,10 +525,10 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const
|
||||
FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char prefix, const bool blink) {
|
||||
#if HAS_HEATED_BED
|
||||
const bool isBed = TERN(HAS_HEATED_CHAMBER, heater_id == H_BED, heater_id < 0);
|
||||
const celsius_t t1 = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater_id)),
|
||||
const celsius_t t1 = (isBed ? thermalManager.wholeDegBed() : thermalManager.wholeDegHotend(heater_id)),
|
||||
t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id));
|
||||
#else
|
||||
const celsius_t t1 = thermalManager.degHotend(heater_id), t2 = thermalManager.degTargetHotend(heater_id);
|
||||
const celsius_t t1 = thermalManager.wholeDegHotend(heater_id), t2 = thermalManager.degTargetHotend(heater_id);
|
||||
#endif
|
||||
|
||||
if (prefix >= 0) lcd_put_wchar(prefix);
|
||||
@ -557,11 +557,11 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char pr
|
||||
|
||||
#if HAS_COOLER
|
||||
FORCE_INLINE void _draw_cooler_status(const char prefix, const bool blink) {
|
||||
const float t1 = thermalManager.degCooler(), t2 = thermalManager.degTargetCooler();
|
||||
const celsius_t t2 = thermalManager.degTargetCooler();
|
||||
|
||||
if (prefix >= 0) lcd_put_wchar(prefix);
|
||||
|
||||
lcd_put_u8str(i16tostr3rj(t1 + 0.5));
|
||||
lcd_put_u8str(i16tostr3rj(thermalManager.wholeDegCooler()));
|
||||
lcd_put_wchar('/');
|
||||
|
||||
#if !HEATER_IDLE_HANDLER
|
||||
@ -574,7 +574,7 @@ FORCE_INLINE void _draw_cooler_status(const char prefix, const bool blink) {
|
||||
}
|
||||
else
|
||||
#endif
|
||||
lcd_put_u8str(i16tostr3left(t2 + 0.5));
|
||||
lcd_put_u8str(i16tostr3left(t2));
|
||||
|
||||
if (prefix >= 0) {
|
||||
lcd_put_wchar(LCD_STR_DEGREE[0]);
|
||||
|
@ -434,10 +434,10 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char *p
|
||||
uint8_t pic_hot_bits;
|
||||
#if HAS_HEATED_BED
|
||||
const bool isBed = heater_id < 0;
|
||||
const celsius_t t1 = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater_id)),
|
||||
const celsius_t t1 = (isBed ? thermalManager.wholeDegBed() : thermalManager.wholeDegHotend(heater_id)),
|
||||
t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id));
|
||||
#else
|
||||
const celsius_t t1 = thermalManager.degHotend(heater_id), t2 = thermalManager.degTargetHotend(heater_id);
|
||||
const celsius_t t1 = thermalManager.wholeDegHotend(heater_id), t2 = thermalManager.degTargetHotend(heater_id);
|
||||
#endif
|
||||
|
||||
#if HOTENDS < 2
|
||||
@ -803,7 +803,7 @@ void MarlinUI::draw_status_screen() {
|
||||
if (!PanelDetected) return;
|
||||
lcd.setCursor((LCD_WIDTH - 14) / 2, row + 1);
|
||||
lcd.write(LCD_STR_THERMOMETER[0]); lcd_put_u8str_P(PSTR(" E")); lcd.write('1' + extruder); lcd.write(' ');
|
||||
lcd.print(i16tostr3rj(thermalManager.degHotend(extruder))); lcd.write(LCD_STR_DEGREE[0]); lcd.write('/');
|
||||
lcd.print(i16tostr3rj(thermalManager.wholeDegHotend(extruder))); lcd.write(LCD_STR_DEGREE[0]); lcd.write('/');
|
||||
lcd.print(i16tostr3rj(thermalManager.degTargetHotend(extruder))); lcd.write(LCD_STR_DEGREE[0]);
|
||||
lcd.print_line();
|
||||
}
|
||||
|
@ -324,7 +324,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
lcd_put_wchar(LCD_PIXEL_WIDTH - 11 * (MENU_FONT_WIDTH), row_y2, 'E');
|
||||
lcd_put_wchar((char)('1' + extruder));
|
||||
lcd_put_wchar(' ');
|
||||
lcd_put_u8str(i16tostr3rj(thermalManager.degHotend(extruder)));
|
||||
lcd_put_u8str(i16tostr3rj(thermalManager.wholeDegHotend(extruder)));
|
||||
lcd_put_wchar('/');
|
||||
|
||||
if (get_blink() || !thermalManager.heater_idle[extruder].timed_out)
|
||||
|
@ -213,7 +213,7 @@ FORCE_INLINE void _draw_centered_temp(const celsius_t temp, const uint8_t tx, co
|
||||
|
||||
const uint8_t tx = STATUS_HOTEND_TEXT_X(heater_id);
|
||||
|
||||
const celsius_t temp = thermalManager.degHotend(heater_id),
|
||||
const celsius_t temp = thermalManager.wholeDegHotend(heater_id),
|
||||
target = thermalManager.degTargetHotend(heater_id);
|
||||
|
||||
#if DISABLED(STATUS_HOTEND_ANIM)
|
||||
@ -310,7 +310,7 @@ FORCE_INLINE void _draw_centered_temp(const celsius_t temp, const uint8_t tx, co
|
||||
|
||||
const uint8_t tx = STATUS_BED_TEXT_X;
|
||||
|
||||
const celsius_t temp = thermalManager.degBed(),
|
||||
const celsius_t temp = thermalManager.wholeDegBed(),
|
||||
target = thermalManager.degTargetBed();
|
||||
|
||||
#if ENABLED(STATUS_HEAT_PERCENT) || DISABLED(STATUS_BED_ANIM)
|
||||
@ -380,14 +380,14 @@ FORCE_INLINE void _draw_centered_temp(const celsius_t temp, const uint8_t tx, co
|
||||
_draw_centered_temp(thermalManager.degTargetChamber(), STATUS_CHAMBER_TEXT_X, 7);
|
||||
#endif
|
||||
if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1))
|
||||
_draw_centered_temp(thermalManager.degChamber(), STATUS_CHAMBER_TEXT_X, 28);
|
||||
_draw_centered_temp(thermalManager.wholeDegChamber(), STATUS_CHAMBER_TEXT_X, 28);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if DO_DRAW_COOLER
|
||||
FORCE_INLINE void _draw_cooler_status() {
|
||||
if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1))
|
||||
_draw_centered_temp(thermalManager.degCooler(), STATUS_COOLER_TEXT_X, 28);
|
||||
_draw_centered_temp(thermalManager.wholeDegCooler(), STATUS_COOLER_TEXT_X, 28);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -721,14 +721,14 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) {
|
||||
const duration_t elapsed = print_job_timer.duration();
|
||||
duration_t remaining = TERN0(USE_M73_REMAINING_TIME, ui.get_remaining_time());
|
||||
const uint16_t feedrate_perc = feedrate_percentage;
|
||||
const celsius_t extruder_1_temp = thermalManager.degHotend(0),
|
||||
const celsius_t extruder_1_temp = thermalManager.wholeDegHotend(0),
|
||||
extruder_1_target = thermalManager.degTargetHotend(0);
|
||||
#if HAS_MULTI_HOTEND
|
||||
const celsius_t extruder_2_temp = thermalManager.degHotend(1),
|
||||
const celsius_t extruder_2_temp = thermalManager.wholeDegHotend(1),
|
||||
extruder_2_target = thermalManager.degTargetHotend(1);
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
const celsius_t bed_temp = thermalManager.degBed(),
|
||||
const celsius_t bed_temp = thermalManager.wholeDegBed(),
|
||||
bed_target = thermalManager.degTargetBed();
|
||||
#endif
|
||||
|
||||
|
@ -1583,7 +1583,7 @@ void _draw_xyz_position(const bool force) {
|
||||
void update_variable() {
|
||||
#if HAS_HOTEND
|
||||
static celsius_t _hotendtemp = 0, _hotendtarget = 0;
|
||||
const celsius_t hc = thermalManager.degHotend(0),
|
||||
const celsius_t hc = thermalManager.wholeDegHotend(0),
|
||||
ht = thermalManager.degTargetHotend(0);
|
||||
const bool _new_hotend_temp = _hotendtemp != hc,
|
||||
_new_hotend_target = _hotendtarget != ht;
|
||||
@ -1592,7 +1592,7 @@ void update_variable() {
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
static celsius_t _bedtemp = 0, _bedtarget = 0;
|
||||
const celsius_t bc = thermalManager.degBed(),
|
||||
const celsius_t bc = thermalManager.wholeDegBed(),
|
||||
bt = thermalManager.degTargetBed();
|
||||
const bool _new_bed_temp = _bedtemp != bc,
|
||||
_new_bed_target = _bedtarget != bt;
|
||||
@ -1880,7 +1880,7 @@ void Draw_Status_Area(const bool with_update) {
|
||||
|
||||
#if HAS_HOTEND
|
||||
DWIN_ICON_Show(ICON, ICON_HotendTemp, 10, 383);
|
||||
DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 28, 384, thermalManager.degHotend(0));
|
||||
DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 28, 384, thermalManager.wholeDegHotend(0));
|
||||
DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 384, F("/"));
|
||||
DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 25 + 4 * STAT_CHR_W + 6, 384, thermalManager.degTargetHotend(0));
|
||||
|
||||
@ -1891,7 +1891,7 @@ void Draw_Status_Area(const bool with_update) {
|
||||
|
||||
#if HAS_HEATED_BED
|
||||
DWIN_ICON_Show(ICON, ICON_BedTemp, 10, 416);
|
||||
DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 28, 417, thermalManager.degBed());
|
||||
DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 28, 417, thermalManager.wholeDegBed());
|
||||
DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 417, F("/"));
|
||||
DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 25 + 4 * STAT_CHR_W + 6, 417, thermalManager.degTargetBed());
|
||||
#endif
|
||||
@ -2709,7 +2709,7 @@ void HMI_AxisMove() {
|
||||
case 4: // Extruder
|
||||
// window tips
|
||||
#ifdef PREVENT_COLD_EXTRUSION
|
||||
if (thermalManager.degHotend(0) < EXTRUDE_MINTEMP) {
|
||||
if (thermalManager.wholeDegHotend(0) < (EXTRUDE_MINTEMP)) {
|
||||
HMI_flag.ETempTooLow_flag = true;
|
||||
Popup_Window_ETempTooLow();
|
||||
DWIN_UpdateLCD();
|
||||
|
@ -486,7 +486,7 @@ void lv_draw_dialog(uint8_t type) {
|
||||
|
||||
void filament_sprayer_temp() {
|
||||
char buf[20] = {0};
|
||||
sprintf(buf, preheat_menu.value_state, thermalManager.degHotend(uiCfg.extruderIndex), thermalManager.degTargetHotend(uiCfg.extruderIndex));
|
||||
sprintf(buf, preheat_menu.value_state, thermalManager.wholeDegHotend(uiCfg.extruderIndex), thermalManager.degTargetHotend(uiCfg.extruderIndex));
|
||||
|
||||
strcpy(public_buf_l, uiCfg.extruderIndex < 1 ? extrude_menu.ext1 : extrude_menu.ext2);
|
||||
strcat_P(public_buf_l, PSTR(": "));
|
||||
@ -522,7 +522,7 @@ void filament_dialog_handle() {
|
||||
}
|
||||
|
||||
if (uiCfg.filament_load_heat_flg) {
|
||||
const celsius_t diff = thermalManager.degHotend(uiCfg.extruderIndex) - gCfgItems.filament_limit_temp;
|
||||
const celsius_t diff = thermalManager.wholeDegHotend(uiCfg.extruderIndex) - gCfgItems.filament_limit_temp;
|
||||
if (abs(diff) < 2 || diff > 0) {
|
||||
uiCfg.filament_load_heat_flg = false;
|
||||
lv_clear_dialog();
|
||||
@ -538,7 +538,7 @@ void filament_dialog_handle() {
|
||||
}
|
||||
|
||||
if (uiCfg.filament_unload_heat_flg) {
|
||||
const celsius_t diff = thermalManager.degHotend(uiCfg.extruderIndex) - gCfgItems.filament_limit_temp;
|
||||
const celsius_t diff = thermalManager.wholeDegHotend(uiCfg.extruderIndex) - gCfgItems.filament_limit_temp;
|
||||
if (abs(diff) < 2 || diff > 0) {
|
||||
uiCfg.filament_unload_heat_flg = false;
|
||||
lv_clear_dialog();
|
||||
|
@ -195,7 +195,7 @@ void disp_ext_speed() {
|
||||
|
||||
void disp_hotend_temp() {
|
||||
char buf[20] = {0};
|
||||
sprintf(buf, extrude_menu.temp_value, (int)thermalManager.degHotend(uiCfg.extruderIndex), (int)thermalManager.degTargetHotend(uiCfg.extruderIndex));
|
||||
sprintf(buf, extrude_menu.temp_value, thermalManager.wholeDegHotend(uiCfg.extruderIndex), thermalManager.degTargetHotend(uiCfg.extruderIndex));
|
||||
strcpy(public_buf_l, extrude_menu.temper_text);
|
||||
strcat(public_buf_l, buf);
|
||||
lv_label_set_text(tempText, public_buf_l);
|
||||
|
@ -50,8 +50,8 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
||||
switch (obj->mks_obj_id) {
|
||||
case ID_FILAMNT_IN:
|
||||
uiCfg.filament_load_heat_flg = true;
|
||||
if (abs(thermalManager.degTargetHotend(uiCfg.extruderIndex) - thermalManager.degHotend(uiCfg.extruderIndex)) <= 1
|
||||
|| gCfgItems.filament_limit_temp <= thermalManager.degHotend(uiCfg.extruderIndex)) {
|
||||
if (abs(thermalManager.degTargetHotend(uiCfg.extruderIndex) - thermalManager.wholeDegHotend(uiCfg.extruderIndex)) <= 1
|
||||
|| gCfgItems.filament_limit_temp <= thermalManager.wholeDegHotend(uiCfg.extruderIndex)) {
|
||||
lv_clear_filament_change();
|
||||
lv_draw_dialog(DIALOG_TYPE_FILAMENT_HEAT_LOAD_COMPLETED);
|
||||
}
|
||||
@ -67,8 +67,8 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) {
|
||||
case ID_FILAMNT_OUT:
|
||||
uiCfg.filament_unload_heat_flg = true;
|
||||
if (thermalManager.degTargetHotend(uiCfg.extruderIndex)
|
||||
&& (abs((int)(thermalManager.degTargetHotend(uiCfg.extruderIndex) - thermalManager.degHotend(uiCfg.extruderIndex))) <= 1
|
||||
|| thermalManager.degHotend(uiCfg.extruderIndex) >= gCfgItems.filament_limit_temp)
|
||||
&& (abs(thermalManager.degTargetHotend(uiCfg.extruderIndex) - thermalManager.wholeDegHotend(uiCfg.extruderIndex)) <= 1
|
||||
|| thermalManager.wholeDegHotend(uiCfg.extruderIndex) >= gCfgItems.filament_limit_temp)
|
||||
) {
|
||||
lv_clear_filament_change();
|
||||
lv_draw_dialog(DIALOG_TYPE_FILAMENT_HEAT_UNLOAD_COMPLETED);
|
||||
@ -154,7 +154,7 @@ void disp_filament_temp() {
|
||||
public_buf_l[0] = '\0';
|
||||
|
||||
strcat(public_buf_l, uiCfg.extruderIndex < 1 ? preheat_menu.ext1 : preheat_menu.ext2);
|
||||
sprintf(buf, preheat_menu.value_state, (int)thermalManager.degHotend(uiCfg.extruderIndex), (int)thermalManager.degTargetHotend(uiCfg.extruderIndex));
|
||||
sprintf(buf, preheat_menu.value_state, thermalManager.wholeDegHotend(uiCfg.extruderIndex), thermalManager.degTargetHotend(uiCfg.extruderIndex));
|
||||
|
||||
strcat_P(public_buf_l, PSTR(": "));
|
||||
strcat(public_buf_l, buf);
|
||||
|
@ -216,12 +216,12 @@ void disp_desire_temp() {
|
||||
|
||||
if (uiCfg.curTempType == 0) {
|
||||
strcat(public_buf_l, uiCfg.extruderIndex < 1 ? preheat_menu.ext1 : preheat_menu.ext2);
|
||||
sprintf(buf, preheat_menu.value_state, (int)thermalManager.degHotend(uiCfg.extruderIndex), (int)thermalManager.degTargetHotend(uiCfg.extruderIndex));
|
||||
sprintf(buf, preheat_menu.value_state, thermalManager.wholeDegHotend(uiCfg.extruderIndex), thermalManager.degTargetHotend(uiCfg.extruderIndex));
|
||||
}
|
||||
else {
|
||||
#if HAS_HEATED_BED
|
||||
strcat(public_buf_l, preheat_menu.hotbed);
|
||||
sprintf(buf, preheat_menu.value_state, (int)thermalManager.degBed(), (int)thermalManager.degTargetBed());
|
||||
sprintf(buf, preheat_menu.value_state, thermalManager.wholeDegBed(), thermalManager.degTargetBed());
|
||||
#endif
|
||||
}
|
||||
strcat_P(public_buf_l, PSTR(": "));
|
||||
|
@ -219,18 +219,18 @@ void lv_draw_printing() {
|
||||
}
|
||||
|
||||
void disp_ext_temp() {
|
||||
sprintf(public_buf_l, printing_menu.temp1, (int)thermalManager.degHotend(0), (int)thermalManager.degTargetHotend(0));
|
||||
sprintf(public_buf_l, printing_menu.temp1, thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0));
|
||||
lv_label_set_text(labelExt1, public_buf_l);
|
||||
|
||||
#if HAS_MULTI_EXTRUDER
|
||||
sprintf(public_buf_l, printing_menu.temp1, (int)thermalManager.degHotend(1), (int)thermalManager.degTargetHotend(1));
|
||||
sprintf(public_buf_l, printing_menu.temp1, thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1));
|
||||
lv_label_set_text(labelExt2, public_buf_l);
|
||||
#endif
|
||||
}
|
||||
|
||||
void disp_bed_temp() {
|
||||
#if HAS_HEATED_BED
|
||||
sprintf(public_buf_l, printing_menu.bed_temp, (int)thermalManager.degBed(), (int)thermalManager.degTargetBed());
|
||||
sprintf(public_buf_l, printing_menu.bed_temp, thermalManager.wholeDegBed(), thermalManager.degTargetBed());
|
||||
lv_label_set_text(labelBed, public_buf_l);
|
||||
#endif
|
||||
}
|
||||
|
@ -104,14 +104,14 @@ void disp_det_error() {
|
||||
lv_obj_t *e1, *e2, *e3, *bed;
|
||||
void mks_disp_test() {
|
||||
char buf[30] = {0};
|
||||
sprintf_P(buf, PSTR("e1:%d"), (int)thermalManager.degHotend(0));
|
||||
sprintf_P(buf, PSTR("e1:%d"), thermalManager.wholeDegHotend(0));
|
||||
lv_label_set_text(e1, buf);
|
||||
#if HAS_MULTI_HOTEND
|
||||
sprintf_P(buf, PSTR("e2:%d"), (int)thermalManager.degHotend(1));
|
||||
sprintf_P(buf, PSTR("e2:%d"), thermalManager.wholeDegHotend(1));
|
||||
lv_label_set_text(e2, buf);
|
||||
#endif
|
||||
#if HAS_HEATED_BED
|
||||
sprintf_P(buf, PSTR("bed:%d"), (int)thermalManager.degBed());
|
||||
sprintf_P(buf, PSTR("bed:%d"), thermalManager.wholeDegBed());
|
||||
lv_label_set_text(bed, buf);
|
||||
#endif
|
||||
}
|
||||
@ -138,20 +138,20 @@ void lv_draw_ready_print() {
|
||||
|
||||
e1 = lv_label_create_empty(scr);
|
||||
lv_obj_set_pos(e1, 20, 20);
|
||||
sprintf_P(buf, PSTR("e1: %d"), (int)thermalManager.degHotend(0));
|
||||
sprintf_P(buf, PSTR("e1: %d"), thermalManager.wholeDegHotend(0));
|
||||
lv_label_set_text(e1, buf);
|
||||
|
||||
#if HAS_MULTI_HOTEND
|
||||
e2 = lv_label_create_empty(scr);
|
||||
lv_obj_set_pos(e2, 20, 45);
|
||||
sprintf_P(buf, PSTR("e1: %d"), (int)thermalManager.degHotend(1));
|
||||
sprintf_P(buf, PSTR("e1: %d"), thermalManager.wholeDegHotend(1));
|
||||
lv_label_set_text(e2, buf);
|
||||
#endif
|
||||
|
||||
#if HAS_HEATED_BED
|
||||
bed = lv_label_create_empty(scr);
|
||||
lv_obj_set_pos(bed, 20, 95);
|
||||
sprintf_P(buf, PSTR("bed: %d"), (int)thermalManager.degBed());
|
||||
sprintf_P(buf, PSTR("bed: %d"), thermalManager.wholeDegBed());
|
||||
lv_label_set_text(bed, buf);
|
||||
#endif
|
||||
|
||||
@ -219,7 +219,7 @@ void lv_draw_ready_print() {
|
||||
itoa(thermalManager.degHotend(0), buf, 10);
|
||||
lv_label_set_text(labelExt1, buf);
|
||||
lv_obj_align(labelExt1, buttonExt1, LV_ALIGN_CENTER, 0, LABEL_MOD_Y);
|
||||
sprintf_P(buf, PSTR("-> %d"), (int)thermalManager.degTargetHotend(0));
|
||||
sprintf_P(buf, PSTR("-> %d"), thermalManager.degTargetHotend(0));
|
||||
lv_label_set_text(labelExt1Target, buf);
|
||||
lv_obj_align(labelExt1Target, buttonExt1, LV_ALIGN_CENTER, 0, TARGET_LABEL_MOD_Y);
|
||||
|
||||
@ -227,7 +227,7 @@ void lv_draw_ready_print() {
|
||||
itoa(thermalManager.degHotend(1), buf, 10);
|
||||
lv_label_set_text(labelExt2, buf);
|
||||
lv_obj_align(labelExt2, buttonExt2, LV_ALIGN_CENTER, 0, LABEL_MOD_Y);
|
||||
sprintf_P(buf, PSTR("-> %d"), (int)thermalManager.degTargetHotend(1));
|
||||
sprintf_P(buf, PSTR("-> %d"), thermalManager.degTargetHotend(1));
|
||||
lv_label_set_text(labelExt2Target, buf);
|
||||
lv_obj_align(labelExt2Target, buttonExt2, LV_ALIGN_CENTER, 0, TARGET_LABEL_MOD_Y);
|
||||
#endif
|
||||
@ -236,7 +236,7 @@ void lv_draw_ready_print() {
|
||||
itoa(thermalManager.degBed(), buf, 10);
|
||||
lv_label_set_text(labelBed, buf);
|
||||
lv_obj_align(labelBed, buttonBedstate, LV_ALIGN_CENTER, 0, LABEL_MOD_Y);
|
||||
sprintf_P(buf, PSTR("-> %d"), (int)thermalManager.degTargetBed());
|
||||
sprintf_P(buf, PSTR("-> %d"), thermalManager.degTargetBed());
|
||||
lv_label_set_text(labelBedTarget, buf);
|
||||
lv_obj_align(labelBedTarget, buttonBedstate, LV_ALIGN_CENTER, 0, TARGET_LABEL_MOD_Y);
|
||||
#endif
|
||||
@ -257,15 +257,15 @@ void lv_draw_ready_print() {
|
||||
|
||||
void lv_temp_refr() {
|
||||
#if HAS_HEATED_BED
|
||||
sprintf(public_buf_l, printing_menu.bed_temp, (int)thermalManager.degBed(), (int)thermalManager.degTargetBed());
|
||||
sprintf(public_buf_l, printing_menu.bed_temp, thermalManager.wholeDegBed(), thermalManager.degTargetBed());
|
||||
lv_label_set_text(labelBed, public_buf_l);
|
||||
#endif
|
||||
|
||||
sprintf(public_buf_l, printing_menu.temp1, (int)thermalManager.degHotend(0), (int)thermalManager.degTargetHotend(0));
|
||||
sprintf(public_buf_l, printing_menu.temp1, thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0));
|
||||
lv_label_set_text(labelExt1, public_buf_l);
|
||||
|
||||
#if HAS_MULTI_EXTRUDER
|
||||
sprintf(public_buf_l, printing_menu.temp1, (int)thermalManager.degHotend(1), (int)thermalManager.degTargetHotend(1));
|
||||
sprintf(public_buf_l, printing_menu.temp1, thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1));
|
||||
lv_label_set_text(labelExt2, public_buf_l);
|
||||
#endif
|
||||
}
|
||||
|
@ -885,7 +885,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
|
||||
char *outBuf = (char *)tempBuf;
|
||||
char tbuf[34];
|
||||
|
||||
sprintf_P(tbuf, PSTR("%d /%d"), (int)thermalManager.degHotend(0), (int)thermalManager.degTargetHotend(0));
|
||||
sprintf_P(tbuf, PSTR("%d /%d"), thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0));
|
||||
|
||||
const int tlen = strlen(tbuf);
|
||||
|
||||
@ -895,7 +895,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
|
||||
strcpy_P(outBuf, PSTR(" B:"));
|
||||
outBuf += 3;
|
||||
#if HAS_HEATED_BED
|
||||
sprintf_P(outBuf, PSTR("%d /%d"), (int)thermalManager.degBed(), (int)thermalManager.degTargetBed());
|
||||
sprintf_P(outBuf, PSTR("%d /%d"), thermalManager.wholeDegBed(), thermalManager.degTargetBed());
|
||||
#else
|
||||
strcpy_P(outBuf, PSTR("0 /0"));
|
||||
#endif
|
||||
@ -908,7 +908,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
|
||||
strcat_P(outBuf, PSTR(" T1:"));
|
||||
outBuf += 4;
|
||||
#if HAS_MULTI_HOTEND
|
||||
sprintf_P(outBuf, PSTR("%d /%d"), (int)thermalManager.degHotend(1), (int)thermalManager.degTargetHotend(1));
|
||||
sprintf_P(outBuf, PSTR("%d /%d"), thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1));
|
||||
#else
|
||||
strcat_P(outBuf, PSTR("0 /0"));
|
||||
#endif
|
||||
@ -918,15 +918,15 @@ static void wifi_gcode_exec(uint8_t *cmd_line) {
|
||||
}
|
||||
else {
|
||||
sprintf_P((char *)tempBuf, PSTR("T:%d /%d B:%d /%d T0:%d /%d T1:%d /%d @:0 B@:0\r\n"),
|
||||
thermalManager.degHotend(0), thermalManager.degTargetHotend(0),
|
||||
thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0),
|
||||
#if HAS_HEATED_BED
|
||||
thermalManager.degBed(), thermalManager.degTargetBed(),
|
||||
thermalManager.wholeDegBed(), thermalManager.degTargetBed(),
|
||||
#else
|
||||
0, 0,
|
||||
#endif
|
||||
thermalManager.degHotend(0), thermalManager.degTargetHotend(0),
|
||||
thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0),
|
||||
#if HAS_MULTI_HOTEND
|
||||
thermalManager.degHotend(1), thermalManager.degTargetHotend(1)
|
||||
thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1)
|
||||
#else
|
||||
0, 0
|
||||
#endif
|
||||
|
@ -172,9 +172,9 @@ void process_lcd_eb_command(const char *command) {
|
||||
|
||||
sprintf_P(message_buffer,
|
||||
PSTR("{T0:%03i/%03i}{T1:000/000}{TP:%03i/%03i}{TQ:%03i}{TT:%s}"),
|
||||
int(thermalManager.degHotend(0)), thermalManager.degTargetHotend(0),
|
||||
thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0),
|
||||
#if HAS_HEATED_BED
|
||||
int(thermalManager.degBed()), thermalManager.degTargetBed(),
|
||||
thermalManager.wholeDegBed(), thermalManager.degTargetBed(),
|
||||
#else
|
||||
0, 0,
|
||||
#endif
|
||||
@ -303,9 +303,9 @@ void process_lcd_s_command(const char *command) {
|
||||
// temperature information
|
||||
char message_buffer[MAX_CURLY_COMMAND];
|
||||
sprintf_P(message_buffer, PSTR("{T0:%03i/%03i}{T1:000/000}{TP:%03i/%03i}"),
|
||||
int(thermalManager.degHotend(0)), thermalManager.degTargetHotend(0),
|
||||
thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0),
|
||||
#if HAS_HEATED_BED
|
||||
int(thermalManager.degBed()), thermalManager.degTargetBed()
|
||||
thermalManager.wholeDegBed(), thermalManager.degTargetBed()
|
||||
#else
|
||||
0, 0
|
||||
#endif
|
||||
|
@ -918,7 +918,7 @@ namespace ExtUI {
|
||||
thermalManager.updatePID();
|
||||
}
|
||||
|
||||
void startPIDTune(const_float_t temp, extruder_t tool) {
|
||||
void startPIDTune(const celsius_t temp, extruder_t tool) {
|
||||
thermalManager.PID_autotune(temp, (heater_id_t)tool, 8, true);
|
||||
}
|
||||
#endif
|
||||
@ -935,7 +935,7 @@ namespace ExtUI {
|
||||
thermalManager.updatePID();
|
||||
}
|
||||
|
||||
void startBedPIDTune(const_float_t temp) {
|
||||
void startBedPIDTune(const celsius_t temp) {
|
||||
thermalManager.PID_autotune(temp, H_BED, 4, true);
|
||||
}
|
||||
#endif
|
||||
|
@ -117,18 +117,18 @@ void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) {
|
||||
celsius_t currentTemperature, targetTemperature;
|
||||
|
||||
if (Heater >= 0) { // HotEnd
|
||||
currentTemperature = thermalManager.degHotend(Heater);
|
||||
currentTemperature = thermalManager.wholeDegHotend(Heater);
|
||||
targetTemperature = thermalManager.degTargetHotend(Heater);
|
||||
}
|
||||
#if HAS_HEATED_BED
|
||||
else if (Heater == H_BED) {
|
||||
currentTemperature = thermalManager.degBed();
|
||||
currentTemperature = thermalManager.wholeDegBed();
|
||||
targetTemperature = thermalManager.degTargetBed();
|
||||
}
|
||||
#endif
|
||||
#if HAS_TEMP_CHAMBER
|
||||
else if (Heater == H_CHAMBER) {
|
||||
currentTemperature = thermalManager.degChamber();
|
||||
currentTemperature = thermalManager.wholeDegChamber();
|
||||
#if HAS_HEATED_CHAMBER
|
||||
targetTemperature = thermalManager.degTargetChamber();
|
||||
#else
|
||||
@ -138,7 +138,7 @@ void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) {
|
||||
#endif
|
||||
#if HAS_TEMP_COOLER
|
||||
else if (Heater == H_COOLER) {
|
||||
currentTemperature = thermalManager.degCooler();
|
||||
currentTemperature = thermalManager.wholeDegCooler();
|
||||
targetTemperature = TERN(HAS_COOLER, thermalManager.degTargetCooler(), ABSOLUTE_ZERO);
|
||||
}
|
||||
#endif
|
||||
@ -451,7 +451,7 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const
|
||||
tft_string.add('E');
|
||||
tft_string.add((char)('1' + extruder));
|
||||
tft_string.add(' ');
|
||||
tft_string.add(i16tostr3rj(thermalManager.degHotend(extruder)));
|
||||
tft_string.add(i16tostr3rj(thermalManager.wholeDegHotend(extruder)));
|
||||
tft_string.add(LCD_STR_DEGREE);
|
||||
tft_string.add(" / ");
|
||||
tft_string.add(i16tostr3rj(thermalManager.degTargetHotend(extruder)));
|
||||
|
@ -117,18 +117,18 @@ void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) {
|
||||
celsius_t currentTemperature, targetTemperature;
|
||||
|
||||
if (Heater >= 0) { // HotEnd
|
||||
currentTemperature = thermalManager.degHotend(Heater);
|
||||
currentTemperature = thermalManager.wholeDegHotend(Heater);
|
||||
targetTemperature = thermalManager.degTargetHotend(Heater);
|
||||
}
|
||||
#if HAS_HEATED_BED
|
||||
else if (Heater == H_BED) {
|
||||
currentTemperature = thermalManager.degBed();
|
||||
currentTemperature = thermalManager.wholeDegBed();
|
||||
targetTemperature = thermalManager.degTargetBed();
|
||||
}
|
||||
#endif
|
||||
#if HAS_TEMP_CHAMBER
|
||||
else if (Heater == H_CHAMBER) {
|
||||
currentTemperature = thermalManager.degChamber();
|
||||
currentTemperature = thermalManager.wholeDegChamber();
|
||||
#if HAS_HEATED_CHAMBER
|
||||
targetTemperature = thermalManager.degTargetChamber();
|
||||
#else
|
||||
@ -138,7 +138,7 @@ void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) {
|
||||
#endif
|
||||
#if HAS_TEMP_COOLER
|
||||
else if (Heater == H_COOLER) {
|
||||
currentTemperature = thermalManager.degCooler();
|
||||
currentTemperature = thermalManager.wholeDegCooler();
|
||||
targetTemperature = TERN(HAS_COOLER, thermalManager.degTargetCooler(), ABSOLUTE_ZERO);
|
||||
}
|
||||
#endif
|
||||
@ -438,7 +438,7 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const
|
||||
tft_string.add('E');
|
||||
tft_string.add((char)('1' + extruder));
|
||||
tft_string.add(' ');
|
||||
tft_string.add(i16tostr3rj(thermalManager.degHotend(extruder)));
|
||||
tft_string.add(i16tostr3rj(thermalManager.wholeDegHotend(extruder)));
|
||||
tft_string.add(LCD_STR_DEGREE);
|
||||
tft_string.add(" / ");
|
||||
tft_string.add(i16tostr3rj(thermalManager.degTargetHotend(extruder)));
|
||||
|
@ -117,18 +117,18 @@ void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) {
|
||||
celsius_t currentTemperature, targetTemperature;
|
||||
|
||||
if (Heater >= 0) { // HotEnd
|
||||
currentTemperature = thermalManager.degHotend(Heater);
|
||||
currentTemperature = thermalManager.wholeDegHotend(Heater);
|
||||
targetTemperature = thermalManager.degTargetHotend(Heater);
|
||||
}
|
||||
#if HAS_HEATED_BED
|
||||
else if (Heater == H_BED) {
|
||||
currentTemperature = thermalManager.degBed();
|
||||
currentTemperature = thermalManager.wholeDegBed();
|
||||
targetTemperature = thermalManager.degTargetBed();
|
||||
}
|
||||
#endif
|
||||
#if HAS_TEMP_CHAMBER
|
||||
else if (Heater == H_CHAMBER) {
|
||||
currentTemperature = thermalManager.degChamber();
|
||||
currentTemperature = thermalManager.wholeDegChamber();
|
||||
#if HAS_HEATED_CHAMBER
|
||||
targetTemperature = thermalManager.degTargetChamber();
|
||||
#else
|
||||
@ -138,7 +138,7 @@ void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) {
|
||||
#endif
|
||||
#if HAS_TEMP_COOLER
|
||||
else if (Heater == H_COOLER) {
|
||||
currentTemperature = thermalManager.degCooler();
|
||||
currentTemperature = thermalManager.wholeDegCooler();
|
||||
targetTemperature = TERN(HAS_COOLER, thermalManager.degTargetCooler(), ABSOLUTE_ZERO);
|
||||
}
|
||||
#endif
|
||||
@ -438,7 +438,7 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const
|
||||
tft_string.add('E');
|
||||
tft_string.add((char)('1' + extruder));
|
||||
tft_string.add(' ');
|
||||
tft_string.add(i16tostr3rj(thermalManager.degHotend(extruder)));
|
||||
tft_string.add(i16tostr3rj(thermalManager.wholeDegHotend(extruder)));
|
||||
tft_string.add(LCD_STR_DEGREE);
|
||||
tft_string.add(" / ");
|
||||
tft_string.add(i16tostr3rj(thermalManager.degTargetHotend(extruder)));
|
||||
|
Reference in New Issue
Block a user