Fix non-BLT build

This commit is contained in:
Knutwurst
2021-09-04 13:12:33 +02:00
parent 01a8239da3
commit 1729115a07

View File

@@ -830,41 +830,36 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
SERIAL_ECHOLNPGM("Special Menu: Exit Flow Menu"); SERIAL_ECHOLNPGM("Special Menu: Exit Flow Menu");
FlowMenu = false; FlowMenu = false;
} }
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZMENU_L)) != NULL)
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZMENU_S)) != NULL))
{
SERIAL_ECHOLNPGM("Special Menu: Enter BLTouch Menu");
BLTouchMenu = true;
}
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_UP_L)) != NULL)
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_UP_S)) != NULL))
{
SERIAL_ECHOLNPGM("Special Menu: Offset UP");
probe.offset.z += 0.01F;
//char value[30]; #if ENABLED(KNUTWURST_BLTOUCH)
//sprintf_P(value, PSTR("M851 Z%i"), float(probe.offset.z)); else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZMENU_L)) != NULL)
//queue.enqueue_one_now(value); || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZMENU_S)) != NULL))
} {
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_DN_L)) != NULL) SERIAL_ECHOLNPGM("Special Menu: Enter BLTouch Menu");
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_DN_S)) != NULL)) BLTouchMenu = true;
{ }
SERIAL_ECHOLNPGM("Special Menu: Offset Down"); else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_UP_L)) != NULL)
probe.offset.z -= 0.01F; || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_UP_S)) != NULL))
{
//char value[30]; SERIAL_ECHOLNPGM("Special Menu: Offset UP");
//sprintf_P(value, PSTR("M851 Z%i"), float(probe.offset.z)); probe.offset.z += 0.01F;
//queue.enqueue_one_now(value); }
} else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_DN_L)) != NULL)
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_EXIT_L)) != NULL) || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_DN_S)) != NULL))
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_EXIT_S)) != NULL)) {
{ SERIAL_ECHOLNPGM("Special Menu: Offset Down");
SERIAL_ECHOLNPGM("Special Menu: Exit BLTouch Menu & Save EEPROM"); probe.offset.z -= 0.01F;
settings.save(); // M500 }
buzzer.tone(105, 1108); else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_EXIT_L)) != NULL)
buzzer.tone(210, 1661); || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_EXIT_S)) != NULL))
BLTouchMenu = false; {
} SERIAL_ECHOLNPGM("Special Menu: Exit BLTouch Menu & Save EEPROM");
settings.save(); // M500
buzzer.tone(105, 1108);
buzzer.tone(210, 1661);
BLTouchMenu = false;
}
#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))
{ {
@@ -881,18 +876,18 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P2_L)) != NULL) else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P2_L)) != NULL)
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P2_S)) != NULL)) || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P2_S)) != NULL))
{ {
SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 2"); SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 2");
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P) #if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P)
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X205 Y15 F4000\nG1 Z0")); queue.inject_P(PSTR("G90\nG1 Z5\nG1 X205 Y15 F4000\nG1 Z0"));
#endif #endif
#if ENABLED(KNUTWURST_MEGA_X) #if ENABLED(KNUTWURST_MEGA_X)
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X295 Y15 F4000\nG1 Z0")); queue.inject_P(PSTR("G90\nG1 Z5\nG1 X295 Y15 F4000\nG1 Z0"));
#endif #endif
#if ENABLED(KNUTWURST_CHIRON) #if ENABLED(KNUTWURST_CHIRON)
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X395 Y15 F4000\nG1 Z0")); queue.inject_P(PSTR("G90\nG1 Z5\nG1 X395 Y15 F4000\nG1 Z0"));
#endif #endif
} }
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P3_L)) != NULL) else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P3_L)) != NULL)
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P3_S)) != NULL)) || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P3_S)) != NULL))
@@ -913,25 +908,25 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P4_L)) != NULL) else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P4_L)) != NULL)
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P4_S)) != NULL)) || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P4_S)) != NULL))
{ {
SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 4"); SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 4");
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P) #if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P)
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y200 F4000\nG1 Z0")); queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y200 F4000\nG1 Z0"));
#endif #endif
#if ENABLED(KNUTWURST_MEGA_X) #if ENABLED(KNUTWURST_MEGA_X)
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y295 F4000\nG1 Z0")); queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y295 F4000\nG1 Z0"));
#endif #endif
#if ENABLED(KNUTWURST_CHIRON) #if ENABLED(KNUTWURST_CHIRON)
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y395 F4000\nG1 Z0")); queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y395 F4000\nG1 Z0"));
#endif #endif
} }
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_EXIT_L)) != NULL) else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_EXIT_L)) != NULL)
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_EXIT_S)) != NULL)) || (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_EXIT_S)) != NULL))
{ {
SERIAL_ECHOLNPGM("Special Menu: Exit Easy Level Menu"); SERIAL_ECHOLNPGM("Special Menu: Exit Easy Level Menu");
LevelMenu = false; LevelMenu = false;
queue.inject_P(PSTR("G90\nG1 Z10\nG1 X15 Y15 F4000")); queue.inject_P(PSTR("G90\nG1 Z10\nG1 X15 Y15 F4000"));
} }
#endif #endif
} }