|
@ -185,7 +185,10 @@ bool dwin_abort_flag = false; // Flag to reset feedrate, return to Home |
|
|
|
|
|
|
|
|
constexpr float default_max_feedrate[] = DEFAULT_MAX_FEEDRATE; |
|
|
constexpr float default_max_feedrate[] = DEFAULT_MAX_FEEDRATE; |
|
|
constexpr float default_max_acceleration[] = DEFAULT_MAX_ACCELERATION; |
|
|
constexpr float default_max_acceleration[] = DEFAULT_MAX_ACCELERATION; |
|
|
constexpr float default_max_jerk[] = { DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK, DEFAULT_EJERK }; |
|
|
|
|
|
|
|
|
#if HAS_CLASSIC_JERK |
|
|
|
|
|
constexpr float default_max_jerk[] = { DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK, DEFAULT_EJERK }; |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
uint8_t Percentrecord = 0; |
|
|
uint8_t Percentrecord = 0; |
|
|
uint16_t remain_time = 0; |
|
|
uint16_t remain_time = 0; |
|
@ -1492,8 +1495,8 @@ void HMI_MaxAccelerationXYZE() { |
|
|
if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Jerk)) { |
|
|
if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Jerk)) { |
|
|
checkkey = MaxJerk; |
|
|
checkkey = MaxJerk; |
|
|
EncoderRate.enabled = false; |
|
|
EncoderRate.enabled = false; |
|
|
if (WITHIN(HMI_flag.step_axis, X_AXIS, E_AXIS)) |
|
|
if (WITHIN(HMI_flag.jerk_axis, X_AXIS, E_AXIS)) |
|
|
planner.set_max_jerk(HMI_flag.step_axis, HMI_ValueStruct.Max_Jerk / 10); |
|
|
planner.set_max_jerk(HMI_flag.jerk_axis, HMI_ValueStruct.Max_Jerk / 10); |
|
|
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk); |
|
|
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -2955,75 +2958,77 @@ inline void Draw_Max_Accel_Menu() { |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
inline void Draw_Max_Jerk_Menu() { |
|
|
#if HAS_CLASSIC_JERK |
|
|
Clear_Main_Window(); |
|
|
inline void Draw_Max_Jerk_Menu() { |
|
|
|
|
|
Clear_Main_Window(); |
|
|
|
|
|
|
|
|
if (HMI_IsChinese()) { |
|
|
if (HMI_IsChinese()) { |
|
|
DWIN_Frame_TitleCopy(1, 1, 16, 28, 28); // "Jerk"
|
|
|
DWIN_Frame_TitleCopy(1, 1, 16, 28, 28); // "Jerk"
|
|
|
|
|
|
|
|
|
DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(1)); |
|
|
DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(1)); |
|
|
DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(1) + 1); |
|
|
DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(1) + 1); |
|
|
DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(1)); |
|
|
DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(1)); |
|
|
DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 83, MBASE(1)); // Max Jerk speed X
|
|
|
DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 83, MBASE(1)); // Max Jerk speed X
|
|
|
DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(2)); |
|
|
DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(2)); |
|
|
DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(2) + 1); |
|
|
DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(2) + 1); |
|
|
DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(2)); |
|
|
DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(2)); |
|
|
DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 83, MBASE(2) + 3); // Max Jerk speed Y
|
|
|
DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 83, MBASE(2) + 3); // Max Jerk speed Y
|
|
|
DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(3)); |
|
|
DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(3)); |
|
|
DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(3) + 1); |
|
|
DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(3) + 1); |
|
|
DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(3)); |
|
|
DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(3)); |
|
|
DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 83, MBASE(3) + 3); // Max Jerk speed Z
|
|
|
DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 83, MBASE(3) + 3); // Max Jerk speed Z
|
|
|
#if HAS_HOTEND |
|
|
|
|
|
DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(4)); |
|
|
|
|
|
DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(4) + 1); |
|
|
|
|
|
DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(4)); |
|
|
|
|
|
DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 83, MBASE(4) + 3); // Max Jerk speed E
|
|
|
|
|
|
#endif |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
#ifdef USE_STRING_HEADINGS |
|
|
|
|
|
Draw_Title(GET_TEXT_F(MSG_JERK)); |
|
|
|
|
|
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(1), F("Max Jerk X")); |
|
|
|
|
|
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(2), F("Max Jerk Y")); |
|
|
|
|
|
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(3), F("Max Jerk Z")); |
|
|
|
|
|
#if HAS_HOTEND |
|
|
#if HAS_HOTEND |
|
|
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(4), F("Max Jerk E")); |
|
|
DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(4)); |
|
|
|
|
|
DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(4) + 1); |
|
|
|
|
|
DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(4)); |
|
|
|
|
|
DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 83, MBASE(4) + 3); // Max Jerk speed E
|
|
|
#endif |
|
|
#endif |
|
|
#else |
|
|
} |
|
|
DWIN_Frame_TitleCopy(1, 144, 16, 189, 26); // "Jerk"
|
|
|
else { |
|
|
draw_max_en(MBASE(1)); // "Max"
|
|
|
#ifdef USE_STRING_HEADINGS |
|
|
draw_jerk_en(MBASE(1)); // "Jerk"
|
|
|
Draw_Title(GET_TEXT_F(MSG_JERK)); |
|
|
draw_speed_en(72, MBASE(1)); // "Speed"
|
|
|
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(1), F("Max Jerk X")); |
|
|
say_x(115, MBASE(1)); // "X"
|
|
|
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(2), F("Max Jerk Y")); |
|
|
|
|
|
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(3), F("Max Jerk Z")); |
|
|
draw_max_en(MBASE(2)); // "Max"
|
|
|
#if HAS_HOTEND |
|
|
draw_jerk_en(MBASE(2)); // "Jerk"
|
|
|
DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(4), F("Max Jerk E")); |
|
|
draw_speed_en(72, MBASE(2)); // "Speed"
|
|
|
#endif |
|
|
say_y(115, MBASE(2)); // "Y"
|
|
|
#else |
|
|
|
|
|
DWIN_Frame_TitleCopy(1, 144, 16, 189, 26); // "Jerk"
|
|
|
draw_max_en(MBASE(3)); // "Max"
|
|
|
draw_max_en(MBASE(1)); // "Max"
|
|
|
draw_jerk_en(MBASE(3)); // "Jerk"
|
|
|
draw_jerk_en(MBASE(1)); // "Jerk"
|
|
|
draw_speed_en(72, MBASE(3)); // "Speed"
|
|
|
draw_speed_en(72, MBASE(1)); // "Speed"
|
|
|
say_z(115, MBASE(3)); // "Z"
|
|
|
say_x(115, MBASE(1)); // "X"
|
|
|
|
|
|
|
|
|
|
|
|
draw_max_en(MBASE(2)); // "Max"
|
|
|
|
|
|
draw_jerk_en(MBASE(2)); // "Jerk"
|
|
|
|
|
|
draw_speed_en(72, MBASE(2)); // "Speed"
|
|
|
|
|
|
say_y(115, MBASE(2)); // "Y"
|
|
|
|
|
|
|
|
|
|
|
|
draw_max_en(MBASE(3)); // "Max"
|
|
|
|
|
|
draw_jerk_en(MBASE(3)); // "Jerk"
|
|
|
|
|
|
draw_speed_en(72, MBASE(3)); // "Speed"
|
|
|
|
|
|
say_z(115, MBASE(3)); // "Z"
|
|
|
|
|
|
|
|
|
#if HAS_HOTEND |
|
|
#if HAS_HOTEND |
|
|
draw_max_en(MBASE(4)); // "Max"
|
|
|
draw_max_en(MBASE(4)); // "Max"
|
|
|
draw_jerk_en(MBASE(4)); // "Jerk"
|
|
|
draw_jerk_en(MBASE(4)); // "Jerk"
|
|
|
draw_speed_en(72, MBASE(4)); // "Speed"
|
|
|
draw_speed_en(72, MBASE(4)); // "Speed"
|
|
|
say_e(115, MBASE(4)); // "E"
|
|
|
say_e(115, MBASE(4)); // "E"
|
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Draw_Back_First(); |
|
|
|
|
|
LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MaxSpeedJerkX + i); |
|
|
|
|
|
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(1), planner.max_jerk[X_AXIS] * MINUNITMULT); |
|
|
|
|
|
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(2), planner.max_jerk[Y_AXIS] * MINUNITMULT); |
|
|
|
|
|
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(3), planner.max_jerk[Z_AXIS] * MINUNITMULT); |
|
|
|
|
|
#if HAS_HOTEND |
|
|
|
|
|
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(4), planner.max_jerk[E_AXIS] * MINUNITMULT); |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
#endif |
|
|
Draw_Back_First(); |
|
|
|
|
|
LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MaxSpeedJerkX + i); |
|
|
|
|
|
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(1), planner.max_jerk[X_AXIS] * MINUNITMULT); |
|
|
|
|
|
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(2), planner.max_jerk[Y_AXIS] * MINUNITMULT); |
|
|
|
|
|
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(3), planner.max_jerk[Z_AXIS] * MINUNITMULT); |
|
|
|
|
|
#if HAS_HOTEND |
|
|
|
|
|
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(4), planner.max_jerk[E_AXIS] * MINUNITMULT); |
|
|
|
|
|
#endif |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
inline void Draw_Steps_Menu() { |
|
|
inline void Draw_Steps_Menu() { |
|
|
Clear_Main_Window(); |
|
|
Clear_Main_Window(); |
|
@ -3636,7 +3641,9 @@ void DWIN_HandleScreen() { |
|
|
#endif |
|
|
#endif |
|
|
case MaxSpeed: HMI_MaxSpeed(); break; |
|
|
case MaxSpeed: HMI_MaxSpeed(); break; |
|
|
case MaxAcceleration: HMI_MaxAcceleration(); break; |
|
|
case MaxAcceleration: HMI_MaxAcceleration(); break; |
|
|
case MaxJerk: HMI_MaxJerk(); break; |
|
|
#if HAS_CLASSIC_JERK |
|
|
|
|
|
case MaxJerk: HMI_MaxJerk(); break; |
|
|
|
|
|
#endif |
|
|
case Step: HMI_Step(); break; |
|
|
case Step: HMI_Step(); break; |
|
|
case Move_X: HMI_Move_X(); break; |
|
|
case Move_X: HMI_Move_X(); break; |
|
|
case Move_Y: HMI_Move_Y(); break; |
|
|
case Move_Y: HMI_Move_Y(); break; |
|
@ -3657,7 +3664,9 @@ void DWIN_HandleScreen() { |
|
|
case PrintSpeed: HMI_PrintSpeed(); break; |
|
|
case PrintSpeed: HMI_PrintSpeed(); break; |
|
|
case MaxSpeed_value: HMI_MaxFeedspeedXYZE(); break; |
|
|
case MaxSpeed_value: HMI_MaxFeedspeedXYZE(); break; |
|
|
case MaxAcceleration_value: HMI_MaxAccelerationXYZE(); break; |
|
|
case MaxAcceleration_value: HMI_MaxAccelerationXYZE(); break; |
|
|
case MaxJerk_value: HMI_MaxJerkXYZE(); break; |
|
|
#if HAS_CLASSIC_JERK |
|
|
|
|
|
case MaxJerk_value: HMI_MaxJerkXYZE(); break; |
|
|
|
|
|
#endif |
|
|
case Step_value: HMI_StepXYZE(); break; |
|
|
case Step_value: HMI_StepXYZE(); break; |
|
|
default: break; |
|
|
default: break; |
|
|
} |
|
|
} |
|
|