Substiture KNUTWURST_TFT_LEVELING flag with KNUTWURST_CHIRON.

This commit is contained in:
Knutwurst
2023-06-14 10:35:01 +02:00
parent e0bb686818
commit 4df951c501
4 changed files with 23 additions and 43 deletions

View File

@@ -38,14 +38,11 @@
#define CONFIGURATION_H_VERSION 02010201
#define ANYCUBIC_TOUCHSCREEN
#define KNUTWURST_SPECIAL_MENU
#define KNUTWURST_SPECIAL_MENU_WO_SD
// #define ANYCUBIC_TFT_DEBUG
// #define POWER_OUTAGE_TEST
#define LCD_SERIAL_PORT 3
#define EXT_LEVEL_HIGH 0.1
/*
* This feature is for debugging purpose only.
* It enabled more console output and should be
@@ -76,18 +73,6 @@
// #define KNUTWURST_MEGA_P_LASER
#endif
/*
* This enables the integrated leveling features
* in the anycubic touchscreen. It's currently only
* supported by the Anycubic Chiron and therefore it
* is automatically set if the chiron is enabled.
*
*/
#if ENABLED(KNUTWURST_CHIRON)
#define KNUTWURST_TFT_LEVELING
#endif
/*
* To ensure the correct endstop configuration,
* this has to be enabled to alter the motherboard
@@ -197,8 +182,8 @@
* Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
// #define SERIAL_PORT_2 2
// #define BAUDRATE_2 500000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
#define SERIAL_PORT_2 2
#define BAUDRATE_2 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE
/**
* Select a third serial port on the board to use for communication with the host.
@@ -1652,7 +1637,7 @@
* Use G29 repeatedly, adjusting the Z height at each point with movement commands
* or (with LCD_BED_LEVELING) the LCD controller.
*/
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING)
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_CHIRON)
#define PROBE_MANUALLY
#endif
@@ -1671,7 +1656,7 @@
/**
* Z Servo Probe, such as an endstop switch on a rotating arm.
*/
#if ENABLED(KNUTWURST_TFT_LEVELING)
#if ENABLED(KNUTWURST_CHIRON)
#define Z_PROBE_SERVO_NR 0 // Defaults to SERVO 0 connector.
#define Z_SERVO_ANGLES { 70, 0 } // Z Servo Deploy and Stow angles
#endif
@@ -1838,11 +1823,11 @@
// #define NOZZLE_TO_PROBE_OFFSET { 29, -15, 0 } //X-Carriage
#endif
#if ENABLED(KNUTWURST_TFT_LEVELING)
#if ENABLED(KNUTWURST_CHIRON)
#define NOZZLE_TO_PROBE_OFFSET { 0, 0, -16.8 }
#endif
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING)
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_CHIRON)
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#endif
@@ -2470,7 +2455,7 @@
* leveling in steps so you can manually adjust the Z height at each grid-point.
* With an LCD controller the process is guided step-by-step.
*/
#if EITHER(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING)
#if EITHER(KNUTWURST_BLTOUCH, KNUTWURST_CHIRON)
// #define AUTO_BED_LEVELING_3POINT
// #define AUTO_BED_LEVELING_LINEAR
#define AUTO_BED_LEVELING_BILINEAR
@@ -2478,7 +2463,7 @@
// #define MESH_BED_LEVELING
#endif
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING)
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_CHIRON)
// #define AUTO_BED_LEVELING_3POINT
// #define AUTO_BED_LEVELING_LINEAR
// #define AUTO_BED_LEVELING_BILINEAR
@@ -3985,7 +3970,7 @@
* Set this manually if there are extra servos needing manual control.
* Set to 0 to turn off servo support.
*/
#if ENABLED(KNUTWURST_TFT_LEVELING)
#if ENABLED(KNUTWURST_CHIRON)
#define NUM_SERVOS 1 // Note: Servo index starts with 0 for M280-M282 commands
#endif

View File

@@ -349,7 +349,7 @@
injectCommands(F("M140 S60"));
}
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING)
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_CHIRON)
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_MESH_MENU_L)) != NULL)
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_MESH_MENU_S)) != NULL)
) {
@@ -405,7 +405,7 @@
SERIAL_ECHOLNPGM("Special Menu: Z Down 0.01");
injectCommands(F("G91\nG1 Z+0.02\nG4 P250\nG1 Z-0.03\nG90"));
}
#endif // if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING)
#endif // if NONE(KNUTWURST_BLTOUCH, KNUTWURST_CHIRON)
#if ENABLED(KNUTWURST_BLTOUCH)
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTOUCH_L)) != NULL)
@@ -418,7 +418,7 @@
}
#endif
#if ENABLED(KNUTWURST_TFT_LEVELING)
#if ENABLED(KNUTWURST_CHIRON)
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_RESETLV_L)) != NULL)
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_RESETLV_S)) != NULL)
) {
@@ -801,7 +801,7 @@ void AnycubicTouchscreenClass::RenderSpecialMenu(uint16_t selectedNumber) {
SENDLINE_PGM(SM_RESUME_L);
break;
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING)
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_CHIRON)
case 4: // Page 2 for Manual Mesh Bed Level
SENDLINE_PGM(SM_EZLVL_MENU_S);
SENDLINE_PGM(SM_EZLVL_MENU_L);
@@ -827,7 +827,7 @@ void AnycubicTouchscreenClass::RenderSpecialMenu(uint16_t selectedNumber) {
break;
#endif
#if ENABLED(KNUTWURST_TFT_LEVELING)
#if ENABLED(KNUTWURST_CHIRON)
case 4: // Page 2 for Chiron ABL
SENDLINE_PGM(SM_EZLVL_MENU_S);
SENDLINE_PGM(SM_EZLVL_MENU_L);
@@ -1471,15 +1471,7 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
SENDLINE_PGM("");
break;
#if DISABLED(KNUTWURST_TFT_LEVELING)
case 33: // A33 get version info
SEND_PGM("J33 ");
SEND_PGM("KW-");
SEND_PGM(MSG_MY_VERSION);
SENDLINE_PGM("");
break;
#endif
#if ENABLED(KNUTWURST_TFT_LEVELING)
#if ENABLED(KNUTWURST_CHIRON)
case 29: // A29 bed grid read
{
xy_uint8_t pos;
@@ -1626,13 +1618,16 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
case 32: // a32 clean leveling beep flag
break;
#endif
case 33: // A33 get version info
SEND_PGM("J33 ");
SEND_PGM("KW-");
SENDLINE_PGM(MSG_MY_VERSION);
SEND_PGM(MSG_MY_VERSION);
SENDLINE_PGM("");
break;
#if ENABLED(KNUTWURST_CHIRON)
case 34: // a34 bed grid write
{
xy_uint8_t pos;
@@ -1676,7 +1671,7 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
case 36: // A36 auto leveling (New Anycubic TFT)
SENDLINE_DBG_PGM("J26", "TFT Serial Debug: Start auto leveling... J26");
break;
#endif // if ENABLED(KNUTWURST_TFT_LEVELING)
#endif // if ENABLED(KNUTWURST_CHIRON)
#if ENABLED(KNUTWURST_4MAXP2)
case 40:
@@ -2026,7 +2021,7 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
#endif
}
#if ENABLED(KNUTWURST_TFT_LEVELING)
#if ENABLED(KNUTWURST_CHIRON)
void AnycubicTouchscreenClass::LevelingDone() {
SENDLINE_DBG_PGM("J25", "TFT Serial Debug: Auto leveling done... J25");
}

View File

@@ -213,7 +213,7 @@ void OnPrintTimerStopped();
void Command(const char * const command);
#endif
#if ENABLED(KNUTWURST_TFT_LEVELING)
#if ENABLED(KNUTWURST_CHIRON)
void LevelingDone();
#endif

View File

@@ -94,7 +94,7 @@ namespace ExtUI {
void onLevelingStart() {}
void onLevelingDone() {
#if ENABLED(KNUTWURST_TFT_LEVELING)
#if ENABLED(KNUTWURST_CHIRON)
AnycubicTouchscreen.LevelingDone();
#endif
}