|
@ -165,14 +165,9 @@ typedef struct { |
|
|
} select_t; |
|
|
} select_t; |
|
|
|
|
|
|
|
|
select_t select_page{0}, select_file{0}, select_print{0}, select_prepare{0} |
|
|
select_t select_page{0}, select_file{0}, select_print{0}, select_prepare{0} |
|
|
, select_control{0}, select_axis{0}, select_temp{0}, select_motion{0}, select_tune{0} |
|
|
, select_control{0}, select_axis{0}, select_temp{0}, select_motion{0}, select_tune{0} |
|
|
, select_advset{0}, select_PLA{0}, select_ABS{0} |
|
|
, select_advset{0}, select_PLA{0}, select_ABS{0} |
|
|
, select_speed{0} |
|
|
, select_speed{0}, select_acc{0}, select_jerk{0}, select_step{0}, select_item{0}; |
|
|
, select_acc{0} |
|
|
|
|
|
, select_jerk{0} |
|
|
|
|
|
, select_step{0} |
|
|
|
|
|
, select_item{0} |
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
uint8_t index_file = MROWS, |
|
|
uint8_t index_file = MROWS, |
|
|
index_prepare = MROWS, |
|
|
index_prepare = MROWS, |
|
@ -700,7 +695,7 @@ void Item_Prepare_Home(const uint8_t row) { |
|
|
|
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if HAS_HOTEND |
|
|
#if HAS_PREHEAT |
|
|
void Item_Prepare_PLA(const uint8_t row) { |
|
|
void Item_Prepare_PLA(const uint8_t row) { |
|
|
if (HMI_IsChinese()) |
|
|
if (HMI_IsChinese()) |
|
|
Item_AreaCopy(100, 89, 151, 101, row); |
|
|
Item_AreaCopy(100, 89, 151, 101, row); |
|
@ -715,22 +710,22 @@ void Item_Prepare_Home(const uint8_t row) { |
|
|
Draw_Menu_Line(row, ICON_PLAPreheat); |
|
|
Draw_Menu_Line(row, ICON_PLAPreheat); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void Item_Prepare_ABS(const uint8_t row) { |
|
|
#if PREHEAT_COUNT > 1 |
|
|
if (HMI_IsChinese()) |
|
|
void Item_Prepare_ABS(const uint8_t row) { |
|
|
Item_AreaCopy(180, 89, 233, 100, row); |
|
|
if (HMI_IsChinese()) |
|
|
else { |
|
|
Item_AreaCopy(180, 89, 233, 100, row); |
|
|
#ifdef USE_STRING_TITLES |
|
|
else { |
|
|
DWIN_Draw_Label(row, F("Preheat " PREHEAT_2_LABEL)); |
|
|
#ifdef USE_STRING_TITLES |
|
|
#else |
|
|
DWIN_Draw_Label(row, F("Preheat " PREHEAT_2_LABEL)); |
|
|
Item_AreaCopy(108, 76, 155, 87, row); // "Preheat"
|
|
|
#else |
|
|
say_abs_en(52, row); // "ABS"
|
|
|
Item_AreaCopy(108, 76, 155, 87, row); // "Preheat"
|
|
|
#endif |
|
|
say_abs_en(52, row); // "ABS"
|
|
|
|
|
|
#endif |
|
|
|
|
|
} |
|
|
|
|
|
Draw_Menu_Line(row, ICON_ABSPreheat); |
|
|
} |
|
|
} |
|
|
Draw_Menu_Line(row, ICON_ABSPreheat); |
|
|
#endif |
|
|
} |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if HAS_PREHEAT |
|
|
|
|
|
void Item_Prepare_Cool(const uint8_t row) { |
|
|
void Item_Prepare_Cool(const uint8_t row) { |
|
|
if (HMI_IsChinese()) |
|
|
if (HMI_IsChinese()) |
|
|
Item_AreaCopy(1, 104, 56, 117, row); |
|
|
Item_AreaCopy(1, 104, 56, 117, row); |
|
@ -785,11 +780,11 @@ void Draw_Prepare_Menu() { |
|
|
#if HAS_ZOFFSET_ITEM |
|
|
#if HAS_ZOFFSET_ITEM |
|
|
if (PVISI(PREPARE_CASE_ZOFF)) Item_Prepare_Offset(PSCROL(PREPARE_CASE_ZOFF)); // Edit Z-Offset / Babystep / Set Home Offset
|
|
|
if (PVISI(PREPARE_CASE_ZOFF)) Item_Prepare_Offset(PSCROL(PREPARE_CASE_ZOFF)); // Edit Z-Offset / Babystep / Set Home Offset
|
|
|
#endif |
|
|
#endif |
|
|
#if HAS_HOTEND |
|
|
|
|
|
if (PVISI(PREPARE_CASE_PLA)) Item_Prepare_PLA(PSCROL(PREPARE_CASE_PLA)); // Preheat PLA
|
|
|
|
|
|
if (PVISI(PREPARE_CASE_ABS)) Item_Prepare_ABS(PSCROL(PREPARE_CASE_ABS)); // Preheat ABS
|
|
|
|
|
|
#endif |
|
|
|
|
|
#if HAS_PREHEAT |
|
|
#if HAS_PREHEAT |
|
|
|
|
|
if (PVISI(PREPARE_CASE_PLA)) Item_Prepare_PLA(PSCROL(PREPARE_CASE_PLA)); // Preheat PLA
|
|
|
|
|
|
#if PREHEAT_COUNT > 1 |
|
|
|
|
|
if (PVISI(PREPARE_CASE_ABS)) Item_Prepare_ABS(PSCROL(PREPARE_CASE_ABS)); // Preheat ABS
|
|
|
|
|
|
#endif |
|
|
if (PVISI(PREPARE_CASE_COOL)) Item_Prepare_Cool(PSCROL(PREPARE_CASE_COOL)); // Cooldown
|
|
|
if (PVISI(PREPARE_CASE_COOL)) Item_Prepare_Cool(PSCROL(PREPARE_CASE_COOL)); // Cooldown
|
|
|
#endif |
|
|
#endif |
|
|
if (PVISI(PREPARE_CASE_LANG)) Item_Prepare_Lang(PSCROL(PREPARE_CASE_LANG)); // Language CN/EN
|
|
|
if (PVISI(PREPARE_CASE_LANG)) Item_Prepare_Lang(PSCROL(PREPARE_CASE_LANG)); // Language CN/EN
|
|
@ -1425,25 +1420,34 @@ void HMI_Move_Z() { |
|
|
uint8_t temp_line; |
|
|
uint8_t temp_line; |
|
|
switch (HMI_ValueStruct.show_mode) { |
|
|
switch (HMI_ValueStruct.show_mode) { |
|
|
case -1: temp_line = TEMP_CASE_TEMP; break; |
|
|
case -1: temp_line = TEMP_CASE_TEMP; break; |
|
|
case -2: temp_line = PREHEAT_CASE_TEMP; break; |
|
|
#if HAS_PREHEAT |
|
|
case -3: temp_line = PREHEAT_CASE_TEMP; break; |
|
|
case -2: temp_line = PREHEAT_CASE_TEMP; break; |
|
|
|
|
|
#if PREHEAT_COUNT > 1 |
|
|
|
|
|
case -3: temp_line = PREHEAT_CASE_TEMP; break; |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
default: temp_line = TUNE_CASE_TEMP + MROWS - index_tune; |
|
|
default: temp_line = TUNE_CASE_TEMP + MROWS - index_tune; |
|
|
} |
|
|
} |
|
|
if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.E_Temp)) { |
|
|
if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.E_Temp)) { |
|
|
EncoderRate.enabled = false; |
|
|
EncoderRate.enabled = false; |
|
|
if (HMI_ValueStruct.show_mode == -2) { |
|
|
#if HAS_PREHEAT |
|
|
checkkey = PLAPreheat; |
|
|
if (HMI_ValueStruct.show_mode == -2) { |
|
|
ui.material_preset[0].hotend_temp = HMI_ValueStruct.E_Temp; |
|
|
checkkey = PLAPreheat; |
|
|
Draw_Edit_Integer3(temp_line, ui.material_preset[0].hotend_temp); |
|
|
ui.material_preset[0].hotend_temp = HMI_ValueStruct.E_Temp; |
|
|
return; |
|
|
Draw_Edit_Integer3(temp_line, ui.material_preset[0].hotend_temp); |
|
|
} |
|
|
return; |
|
|
else if (HMI_ValueStruct.show_mode == -3) { |
|
|
} |
|
|
checkkey = ABSPreheat; |
|
|
#if PREHEAT_COUNT > 1 |
|
|
ui.material_preset[1].hotend_temp = HMI_ValueStruct.E_Temp; |
|
|
if (HMI_ValueStruct.show_mode == -3) { |
|
|
Draw_Edit_Integer3(temp_line, ui.material_preset[1].hotend_temp); |
|
|
checkkey = ABSPreheat; |
|
|
return; |
|
|
ui.material_preset[1].hotend_temp = HMI_ValueStruct.E_Temp; |
|
|
} |
|
|
Draw_Edit_Integer3(temp_line, ui.material_preset[1].hotend_temp); |
|
|
else if (HMI_ValueStruct.show_mode == -1) // Temperature
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
if (HMI_ValueStruct.show_mode == -1) // Temperature
|
|
|
checkkey = TemperatureID; |
|
|
checkkey = TemperatureID; |
|
|
else |
|
|
else |
|
|
checkkey = Tune; |
|
|
checkkey = Tune; |
|
@ -1467,28 +1471,33 @@ void HMI_Move_Z() { |
|
|
uint8_t bed_line; |
|
|
uint8_t bed_line; |
|
|
switch (HMI_ValueStruct.show_mode) { |
|
|
switch (HMI_ValueStruct.show_mode) { |
|
|
case -1: bed_line = TEMP_CASE_BED; break; |
|
|
case -1: bed_line = TEMP_CASE_BED; break; |
|
|
case -2: bed_line = PREHEAT_CASE_BED; break; |
|
|
#if HAS_PREHEAT |
|
|
case -3: bed_line = PREHEAT_CASE_BED; break; |
|
|
case -2: bed_line = PREHEAT_CASE_BED; break; |
|
|
|
|
|
#if PREHEAT_COUNT > 1 |
|
|
|
|
|
case -3: bed_line = PREHEAT_CASE_BED; break; |
|
|
|
|
|
#endif |
|
|
|
|
|
#endif |
|
|
default: bed_line = TUNE_CASE_BED + MROWS - index_tune; |
|
|
default: bed_line = TUNE_CASE_BED + MROWS - index_tune; |
|
|
} |
|
|
} |
|
|
if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Bed_Temp)) { |
|
|
if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Bed_Temp)) { |
|
|
EncoderRate.enabled = false; |
|
|
EncoderRate.enabled = false; |
|
|
if (HMI_ValueStruct.show_mode == -2) { |
|
|
#if HAS_PREHEAT |
|
|
checkkey = PLAPreheat; |
|
|
if (HMI_ValueStruct.show_mode == -2) { |
|
|
ui.material_preset[0].bed_temp = HMI_ValueStruct.Bed_Temp; |
|
|
checkkey = PLAPreheat; |
|
|
Draw_Edit_Integer3(bed_line, ui.material_preset[0].bed_temp); |
|
|
ui.material_preset[0].bed_temp = HMI_ValueStruct.Bed_Temp; |
|
|
return; |
|
|
Draw_Edit_Integer3(bed_line, ui.material_preset[0].bed_temp); |
|
|
} |
|
|
return; |
|
|
else if (HMI_ValueStruct.show_mode == -3) { |
|
|
} |
|
|
checkkey = ABSPreheat; |
|
|
#if PREHEAT_COUNT > 1 |
|
|
ui.material_preset[1].bed_temp = HMI_ValueStruct.Bed_Temp; |
|
|
if (HMI_ValueStruct.show_mode == -3) { |
|
|
Draw_Edit_Integer3(bed_line, ui.material_preset[1].bed_temp); |
|
|
checkkey = ABSPreheat; |
|
|
return; |
|
|
ui.material_preset[1].bed_temp = HMI_ValueStruct.Bed_Temp; |
|
|
} |
|
|
Draw_Edit_Integer3(bed_line, ui.material_preset[1].bed_temp); |
|
|
else if (HMI_ValueStruct.show_mode == -1) |
|
|
return; |
|
|
checkkey = TemperatureID; |
|
|
} |
|
|
else |
|
|
#endif |
|
|
checkkey = Tune; |
|
|
#endif |
|
|
|
|
|
checkkey = HMI_ValueStruct.show_mode == -1 ? TemperatureID : Tune; |
|
|
Draw_Edit_Integer3(bed_line, HMI_ValueStruct.Bed_Temp); |
|
|
Draw_Edit_Integer3(bed_line, HMI_ValueStruct.Bed_Temp); |
|
|
thermalManager.setTargetBed(HMI_ValueStruct.Bed_Temp); |
|
|
thermalManager.setTargetBed(HMI_ValueStruct.Bed_Temp); |
|
|
return; |
|
|
return; |
|
@ -1522,16 +1531,15 @@ void HMI_Move_Z() { |
|
|
Draw_Edit_Integer3(fan_line, ui.material_preset[0].fan_speed); |
|
|
Draw_Edit_Integer3(fan_line, ui.material_preset[0].fan_speed); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
else if (HMI_ValueStruct.show_mode == -3) { |
|
|
#if PREHEAT_COUNT > 1 |
|
|
checkkey = ABSPreheat; |
|
|
if (HMI_ValueStruct.show_mode == -3) { |
|
|
ui.material_preset[1].fan_speed = HMI_ValueStruct.Fan_speed; |
|
|
checkkey = ABSPreheat; |
|
|
Draw_Edit_Integer3(fan_line, ui.material_preset[1].fan_speed); |
|
|
ui.material_preset[1].fan_speed = HMI_ValueStruct.Fan_speed; |
|
|
return; |
|
|
Draw_Edit_Integer3(fan_line, ui.material_preset[1].fan_speed); |
|
|
} |
|
|
return; |
|
|
else if (HMI_ValueStruct.show_mode == -1) |
|
|
} |
|
|
checkkey = TemperatureID; |
|
|
#endif |
|
|
else |
|
|
checkkey = HMI_ValueStruct.show_mode == -1 ? TemperatureID : Tune; |
|
|
checkkey = Tune; |
|
|
|
|
|
Draw_Edit_Integer3(fan_line, HMI_ValueStruct.Fan_speed); |
|
|
Draw_Edit_Integer3(fan_line, HMI_ValueStruct.Fan_speed); |
|
|
thermalManager.set_fan_speed(0, HMI_ValueStruct.Fan_speed); |
|
|
thermalManager.set_fan_speed(0, HMI_ValueStruct.Fan_speed); |
|
|
return; |
|
|
return; |
|
@ -3068,7 +3076,7 @@ void HMI_Temperature() { |
|
|
EncoderRate.enabled = true; |
|
|
EncoderRate.enabled = true; |
|
|
break; |
|
|
break; |
|
|
#endif |
|
|
#endif |
|
|
#if HAS_HOTEND |
|
|
#if HAS_PREHEAT |
|
|
case TEMP_CASE_PLA: { |
|
|
case TEMP_CASE_PLA: { |
|
|
checkkey = PLAPreheat; |
|
|
checkkey = PLAPreheat; |
|
|
select_PLA.reset(); |
|
|
select_PLA.reset(); |
|
@ -3145,7 +3153,8 @@ void HMI_Temperature() { |
|
|
Draw_Menu_Line(++i, ICON_WriteEEPROM); |
|
|
Draw_Menu_Line(++i, ICON_WriteEEPROM); |
|
|
#endif |
|
|
#endif |
|
|
} break; |
|
|
} break; |
|
|
|
|
|
#endif |
|
|
|
|
|
#if PREHEAT_COUNT > 1 |
|
|
case TEMP_CASE_ABS: { // ABS preheat setting
|
|
|
case TEMP_CASE_ABS: { // ABS preheat setting
|
|
|
checkkey = ABSPreheat; |
|
|
checkkey = ABSPreheat; |
|
|
select_ABS.reset(); |
|
|
select_ABS.reset(); |
|
|