Add Special Menu BLTouch HighSpeed Mode selection

This commit is contained in:
Knutwurst
2023-06-07 12:39:56 +02:00
parent c48395f801
commit 588f703684
2 changed files with 30 additions and 3 deletions

View File

@@ -450,8 +450,7 @@
) { ) {
SERIAL_ECHOLNPGM("Special Menu: Disable Filament Sensor"); SERIAL_ECHOLNPGM("Special Menu: Disable Filament Sensor");
injectCommands(F("M412 H0 S0\nM500")); injectCommands(F("M412 H0 S0\nM500"));
BUZZ(105, 1108); BUZZ(210, 1661);
BUZZ(105, 1108);
BUZZ(105, 1108); BUZZ(105, 1108);
} }
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EN_FILSENS_L)) != NULL) else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EN_FILSENS_L)) != NULL)
@@ -460,7 +459,7 @@
SERIAL_ECHOLNPGM("Special Menu: Enable Filament Sensor"); SERIAL_ECHOLNPGM("Special Menu: Enable Filament Sensor");
injectCommands(F("M412 H0 S1\nM500")); injectCommands(F("M412 H0 S1\nM500"));
BUZZ(105, 1108); BUZZ(105, 1108);
BUZZ(105, 1108); BUZZ(210, 1661);
} }
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EXIT_L)) != NULL) else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EXIT_L)) != NULL)
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EXIT_S)) != NULL) || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EXIT_S)) != NULL)
@@ -534,6 +533,22 @@
SERIAL_ECHOLNPGM("Special Menu: Offset Down"); SERIAL_ECHOLNPGM("Special Menu: Offset Down");
probe.offset.z -= 0.01F; probe.offset.z -= 0.01F;
} }
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_HS_ENABLE_L)) != NULL)
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_HS_ENABLE_S)) != NULL)
) {
SERIAL_ECHOLNPGM("Special Menu: HighSpeed Mode ENABLED");
injectCommands(F("M401 S1\nM500"));
BUZZ(105, 1108);
BUZZ(210, 1661);
}
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_HS_DISABLE_L)) != NULL)
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_HS_DISABLE_S)) != NULL)
) {
SERIAL_ECHOLNPGM("Special Menu: HighSpeed Mode DISABLED!");
injectCommands(F("M401 S0\nM500"));
BUZZ(210, 1661);
BUZZ(105, 1108);
}
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_EXIT_L)) != NULL) else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_EXIT_L)) != NULL)
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_EXIT_S)) != NULL) || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_EXIT_S)) != NULL)
) { ) {
@@ -544,6 +559,8 @@
BUZZ(210, 1661); BUZZ(210, 1661);
BLTouchMenu = false; BLTouchMenu = false;
} }
#endif #endif
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_MENU_L)) != NULL) else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_MENU_L)) != NULL)
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_MENU_S)) != NULL) || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_MENU_S)) != NULL)
@@ -738,6 +755,10 @@ void AnycubicTouchscreenClass::RenderSpecialMenu(uint16_t selectedNumber) {
break; break;
case 4: // Page 2 case 4: // Page 2
SENDLINE_PGM(SM_HS_ENABLE_S);
SENDLINE_PGM(SM_HS_ENABLE_L);
SENDLINE_PGM(SM_HS_DISABLE_S);
SENDLINE_PGM(SM_HS_DISABLE_L);
SENDLINE_PGM(SM_BLTZ_EXIT_S); SENDLINE_PGM(SM_BLTZ_EXIT_S);
SENDLINE_PGM(SM_BLTZ_EXIT_L); SENDLINE_PGM(SM_BLTZ_EXIT_L);
break; break;

View File

@@ -98,6 +98,8 @@ enum AnycubicMediaPauseState {
#define SM_BLTZ_UP_S "<UPOFFZ0.GCO" #define SM_BLTZ_UP_S "<UPOFFZ0.GCO"
#define SM_BLTZ_DN_S "<DOWNOFZ.GCO" #define SM_BLTZ_DN_S "<DOWNOFZ.GCO"
#define SM_BLTZ_EXIT_S "<EXTABLM.GCO" #define SM_BLTZ_EXIT_S "<EXTABLM.GCO"
#define SM_HS_DISABLE_S "<HSDISAB.GCO"
#define SM_HS_ENABLE_S "<HSENABL.GCO"
#if DISABLED(KNUTWURST_DGUS2_TFT) #if DISABLED(KNUTWURST_DGUS2_TFT)
@@ -141,6 +143,8 @@ enum AnycubicMediaPauseState {
#define SM_BLTZ_UP_L "<Up>" #define SM_BLTZ_UP_L "<Up>"
#define SM_BLTZ_DN_L "<Down>" #define SM_BLTZ_DN_L "<Down>"
#define SM_BLTZ_EXIT_L "<SAVE and EXIT>" #define SM_BLTZ_EXIT_L "<SAVE and EXIT>"
#define SM_HS_DISABLE_L "<Disable HiSpeed Mode>"
#define SM_HS_ENABLE_L "<Enable HiSpeed Mode>"
#endif // !KNUTWURST_DGUS2_TFT #endif // !KNUTWURST_DGUS2_TFT
#if ENABLED(KNUTWURST_DGUS2_TFT) #if ENABLED(KNUTWURST_DGUS2_TFT)
@@ -184,6 +188,8 @@ enum AnycubicMediaPauseState {
#define SM_BLTZ_UP_L "<Up> .gcode" #define SM_BLTZ_UP_L "<Up> .gcode"
#define SM_BLTZ_DN_L "<Down> .gcode" #define SM_BLTZ_DN_L "<Down> .gcode"
#define SM_BLTZ_EXIT_L "<SAVE and EXIT> .gcode" #define SM_BLTZ_EXIT_L "<SAVE and EXIT> .gcode"
#define SM_HS_DISABLE_L "<Disable HiSpeed> .gcode"
#define SM_HS_ENABLE_L "<Enable HiSpeed> .gcode"
#endif // KNUTWURST_DGUS2_TFT #endif // KNUTWURST_DGUS2_TFT
class AnycubicTouchscreenClass { class AnycubicTouchscreenClass {