Add debugging code and read current offset to LCD.
This commit is contained in:
@@ -254,7 +254,6 @@ void AnycubicTouchscreenClass::Setup()
|
|||||||
buzzer.tone(100, 831);
|
buzzer.tone(100, 831);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
setup_OutageTestPin();
|
setup_OutageTestPin();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -846,22 +845,23 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
|
|||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_UP_S)) != NULL))
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_UP_S)) != NULL))
|
||||||
{
|
{
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Offset UP");
|
SERIAL_ECHOLNPGM("Special Menu: Offset UP");
|
||||||
currentZOffset = currentZOffset + 0.01;
|
currentZOffset = currentZOffset + 0.01F;
|
||||||
|
|
||||||
char value[30];
|
char value[30];
|
||||||
sprintf_P(value, PSTR("M851 Z%i"), currentZOffset);
|
sprintf_P(value, PSTR("M851 Z%i"), currentZOffset);
|
||||||
queue.enqueue_one_now(value);
|
//queue.enqueue_one_now(value);
|
||||||
|
queue.inject_P(value);
|
||||||
}
|
}
|
||||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_DN_L)) != NULL)
|
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_DN_L)) != NULL)
|
||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_DN_S)) != NULL))
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_DN_S)) != NULL))
|
||||||
{
|
{
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Offset Down");
|
SERIAL_ECHOLNPGM("Special Menu: Offset Down");
|
||||||
currentZOffset = currentZOffset - 0.01;
|
currentZOffset = currentZOffset - 0.01F;
|
||||||
|
|
||||||
char value[30];
|
char value[30];
|
||||||
sprintf_P(value, PSTR("M851 Z%i"), currentZOffset);
|
sprintf_P(value, PSTR("M851 Z%i"), currentZOffset);
|
||||||
queue.enqueue_one_now(value);
|
//queue.enqueue_one_now(value);
|
||||||
|
queue.inject_P(value);
|
||||||
}
|
}
|
||||||
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))
|
||||||
@@ -1009,6 +1009,13 @@ void AnycubicTouchscreenClass::PrintList()
|
|||||||
else if(BLTouchMenu)
|
else if(BLTouchMenu)
|
||||||
{
|
{
|
||||||
zOffsetBuffer = SM_BLTZ_DISP_L;
|
zOffsetBuffer = SM_BLTZ_DISP_L;
|
||||||
|
currentZOffset = float(probe.offset.z);
|
||||||
|
|
||||||
|
#ifdef ANYCUBIC_TFT_DEBUG
|
||||||
|
SERIAL_ECHOPAIR(" DEBUG: Current probe.offset.z: ", currentZOffset);
|
||||||
|
SERIAL_EOL();
|
||||||
|
#endif
|
||||||
|
|
||||||
zOffsetBuffer.replace("XXXXX", String(currentZOffset));
|
zOffsetBuffer.replace("XXXXX", String(currentZOffset));
|
||||||
|
|
||||||
switch (filenumber)
|
switch (filenumber)
|
||||||
@@ -1475,8 +1482,11 @@ void AnycubicTouchscreenClass::FilamentRunout()
|
|||||||
}
|
}
|
||||||
else if (!card.isPrinting())
|
else if (!card.isPrinting())
|
||||||
{
|
{
|
||||||
HARDWARE_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK
|
#ifndef ANYCUBIC_TFT_DEBUG
|
||||||
HARDWARE_SERIAL_ENTER();
|
HARDWARE_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK
|
||||||
|
HARDWARE_SERIAL_ENTER();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ANYCUBIC_TFT_DEBUG
|
#ifdef ANYCUBIC_TFT_DEBUG
|
||||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout... J15");
|
SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout... J15");
|
||||||
#endif
|
#endif
|
||||||
|
@@ -121,20 +121,9 @@ char *ftostr32(const float &);
|
|||||||
#define SM_FLOW_UP_S "<UP>"
|
#define SM_FLOW_UP_S "<UP>"
|
||||||
#define SM_FLOW_DN_L "<Down>"
|
#define SM_FLOW_DN_L "<Down>"
|
||||||
#define SM_FLOW_DN_S "<DOWN>"
|
#define SM_FLOW_DN_S "<DOWN>"
|
||||||
#define SM_FLOW_EXIT_L "<Exit>"
|
#define SM_FLOW_EXIT_L "<Exit Flow Settings>"
|
||||||
#define SM_FLOW_EXIT_S "<EXTFLW>"
|
#define SM_FLOW_EXIT_S "<EXTFLW>"
|
||||||
|
|
||||||
#define SM_BLTZMENU_L "<BLTouch>"
|
|
||||||
#define SM_BLTZMENU_S "<SETOFZ>"
|
|
||||||
#define SM_BLTZ_DISP_L "<Z Offset XXXX>"
|
|
||||||
#define SM_BLTZ_DISP_S "<OFZDSP>"
|
|
||||||
#define SM_BLTZ_UP_L "<Up>"
|
|
||||||
#define SM_BLTZ_UP_S "<UP>"
|
|
||||||
#define SM_BLTZ_DN_L "<Down>"
|
|
||||||
#define SM_BLTZ_DN_S "<DOWN>"
|
|
||||||
#define SM_BLTZ_EXIT_L "<SAVE and EXIT>"
|
|
||||||
#define SM_BLTZ_EXIT_S "<EXTFLW>"
|
|
||||||
|
|
||||||
#define SM_EZLVL_MENU_L "<Easy 4 Point Level>"
|
#define SM_EZLVL_MENU_L "<Easy 4 Point Level>"
|
||||||
#define SM_EZLVL_MENU_S "<EZLVLM>"
|
#define SM_EZLVL_MENU_S "<EZLVLM>"
|
||||||
#define SM_EZLVL_P1_L "<Point A>"
|
#define SM_EZLVL_P1_L "<Point A>"
|
||||||
@@ -145,9 +134,20 @@ char *ftostr32(const float &);
|
|||||||
#define SM_EZLVL_P3_S "<EZLPC>"
|
#define SM_EZLVL_P3_S "<EZLPC>"
|
||||||
#define SM_EZLVL_P4_L "<Point D>"
|
#define SM_EZLVL_P4_L "<Point D>"
|
||||||
#define SM_EZLVL_P4_S "<EZLPD>"
|
#define SM_EZLVL_P4_S "<EZLPD>"
|
||||||
#define SM_EZLVL_EXIT_L "<Exit>"
|
#define SM_EZLVL_EXIT_L "<Exit Easy Level>"
|
||||||
#define SM_EZLVL_EXIT_S "<EZLEXT>"
|
#define SM_EZLVL_EXIT_S "<EZLEXT>"
|
||||||
|
|
||||||
|
#define SM_BLTZMENU_L "<Auto Leveling>"
|
||||||
|
#define SM_BLTZMENU_S "<SETOFZ>"
|
||||||
|
#define SM_BLTZ_DISP_L "<Z Offset: XXXX>"
|
||||||
|
#define SM_BLTZ_DISP_S "<OFZDSP>"
|
||||||
|
#define SM_BLTZ_UP_L "<Up>"
|
||||||
|
#define SM_BLTZ_UP_S "<UP>"
|
||||||
|
#define SM_BLTZ_DN_L "<Down>"
|
||||||
|
#define SM_BLTZ_DN_S "<DOWN>"
|
||||||
|
#define SM_BLTZ_EXIT_L "<SAVE and EXIT>"
|
||||||
|
#define SM_BLTZ_EXIT_S "<EXTFLW>"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
||||||
@@ -209,21 +209,9 @@ char *ftostr32(const float &);
|
|||||||
#define SM_FLOW_UP_S "<UPFLOW1.GCO"
|
#define SM_FLOW_UP_S "<UPFLOW1.GCO"
|
||||||
#define SM_FLOW_DN_L "<Down> .gcode"
|
#define SM_FLOW_DN_L "<Down> .gcode"
|
||||||
#define SM_FLOW_DN_S "<DWNFLOW.GCO"
|
#define SM_FLOW_DN_S "<DWNFLOW.GCO"
|
||||||
#define SM_FLOW_EXIT_L "<End Flow Settings> .gcode"
|
#define SM_FLOW_EXIT_L "<Exit Flow Settings>.gcode"
|
||||||
#define SM_FLOW_EXIT_S "<EXTFLW1.GCO"
|
#define SM_FLOW_EXIT_S "<EXTFLW1.GCO"
|
||||||
|
|
||||||
#define SM_BLTZMENU_L "<BLTouch> .gcode"
|
|
||||||
#define SM_BLTZMENU_S "<SETOFZ0.GCO"
|
|
||||||
#define SM_BLTZ_DISP_L "<Z Offset XXXX> .gcode"
|
|
||||||
#define SM_BLTZ_DISP_S "<OFZDSP0.GCO"
|
|
||||||
#define SM_BLTZ_UP_L "<Up> .gcode"
|
|
||||||
#define SM_BLTZ_UP_S "<UPOFFZ0.GCO"
|
|
||||||
#define SM_BLTZ_DN_L "<Down> .gcode"
|
|
||||||
#define SM_BLTZ_DN_S "<DOWNOFZ.GCO"
|
|
||||||
#define SM_BLTZ_EXIT_L "<SAVE and EXIT> .gcode"
|
|
||||||
#define SM_BLTZ_EXIT_S "<EXTFLW2.GCO"
|
|
||||||
|
|
||||||
|
|
||||||
#define SM_EZLVL_MENU_L "<Easy 4 Point Level>.gcode"
|
#define SM_EZLVL_MENU_L "<Easy 4 Point Level>.gcode"
|
||||||
#define SM_EZLVL_MENU_S "<EZLVLM1.GCO"
|
#define SM_EZLVL_MENU_S "<EZLVLM1.GCO"
|
||||||
#define SM_EZLVL_P1_L "<Point A> .gcode"
|
#define SM_EZLVL_P1_L "<Point A> .gcode"
|
||||||
@@ -234,8 +222,20 @@ char *ftostr32(const float &);
|
|||||||
#define SM_EZLVL_P3_S "<EZLPC01.GCO"
|
#define SM_EZLVL_P3_S "<EZLPC01.GCO"
|
||||||
#define SM_EZLVL_P4_L "<Point D> .gcode"
|
#define SM_EZLVL_P4_L "<Point D> .gcode"
|
||||||
#define SM_EZLVL_P4_S "<EZLPD01.GCO"
|
#define SM_EZLVL_P4_S "<EZLPD01.GCO"
|
||||||
#define SM_EZLVL_EXIT_L "<End Easy Leveling> .gcode"
|
#define SM_EZLVL_EXIT_L "<Exit Easy Leveling>.gcode"
|
||||||
#define SM_EZLVL_EXIT_S "<EZLEXT1.GCO"
|
#define SM_EZLVL_EXIT_S "<EZLEXT1.GCO"
|
||||||
|
|
||||||
|
#define SM_BLTZMENU_L "<Auto Leveling> .gcode"
|
||||||
|
#define SM_BLTZMENU_S "<SETOFZ0.GCO"
|
||||||
|
#define SM_BLTZ_DISP_L "<Z Offset: XXXXX> .gcode"
|
||||||
|
#define SM_BLTZ_DISP_S "<OFZDSP0.GCO"
|
||||||
|
#define SM_BLTZ_UP_L "<Up> .gcode"
|
||||||
|
#define SM_BLTZ_UP_S "<UPOFFZ0.GCO"
|
||||||
|
#define SM_BLTZ_DN_L "<Down> .gcode"
|
||||||
|
#define SM_BLTZ_DN_S "<DOWNOFZ.GCO"
|
||||||
|
#define SM_BLTZ_EXIT_L "<SAVE and EXIT> .gcode"
|
||||||
|
#define SM_BLTZ_EXIT_S "<EXTFLW2.GCO"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||||
|
Reference in New Issue
Block a user