From e4fd34a0cd2f78f56289f67ce87ee85c9cf1b7ca Mon Sep 17 00:00:00 2001 From: Marco Nieddu Date: Mon, 11 Feb 2019 09:02:50 +0100 Subject: [PATCH] Update SpecialMenue to ABL --- Marlin/AnycubicTFT.cpp | 71 +++++++++++++----------------------------- 1 file changed, 22 insertions(+), 49 deletions(-) diff --git a/Marlin/AnycubicTFT.cpp b/Marlin/AnycubicTFT.cpp index 74ffa60..8f50987 100644 --- a/Marlin/AnycubicTFT.cpp +++ b/Marlin/AnycubicTFT.cpp @@ -216,24 +216,9 @@ void AnycubicTFTClass::HandleSpecialMenu() } else if (strcmp(SelectedDirectory, "")==0) { SERIAL_PROTOCOLLNPGM("Special Menu: Preheat Bed"); enqueue_and_echo_commands_P(PSTR("M140 S60")); - } else if (strcmp(SelectedDirectory, "")==0) { - SERIAL_PROTOCOLLNPGM("Special Menu: Start Mesh Leveling"); - enqueue_and_echo_commands_P(PSTR("G29 S1")); - } else if (strcmp(SelectedDirectory, "")==0) { - SERIAL_PROTOCOLLNPGM("Special Menu: Next Mesh Point"); - enqueue_and_echo_commands_P(PSTR("G29 S2")); - } else if (strcmp(SelectedDirectory, "")==0) { - SERIAL_PROTOCOLLNPGM("Special Menu: Z Up 0.1"); - enqueue_and_echo_commands_P(PSTR("G91\nG1 Z+0.1\nG90")); - } else if (strcmp(SelectedDirectory, "")==0) { - SERIAL_PROTOCOLLNPGM("Special Menu: Z Up 0.02"); - enqueue_and_echo_commands_P(PSTR("G91\nG1 Z+0.02\nG90")); - } else if (strcmp(SelectedDirectory, "")==0) { - SERIAL_PROTOCOLLNPGM("Special Menu: Z Down 0.02"); - enqueue_and_echo_commands_P(PSTR("G91\nG1 Z-0.02\nG90")); - } else if (strcmp(SelectedDirectory, "")==0) { - SERIAL_PROTOCOLLNPGM("Special Menu: Z Down 0.1"); - enqueue_and_echo_commands_P(PSTR("G91\nG1 Z-0.1\nG90")); + } else if (strcmp(SelectedDirectory, "")==0) { + SERIAL_PROTOCOLLNPGM("Special Menu: Auto Bed Leveling"); + enqueue_and_echo_commands_P(PSTR("G28\nG29")); } else if (strcmp(SelectedDirectory, "")==0) { SERIAL_PROTOCOLLNPGM("Special Menu: M600 Pause"); enqueue_and_echo_commands_P(PSTR("M600")); @@ -249,42 +234,30 @@ void AnycubicTFTClass::Ls() { if (SpecialMenu) { switch (filenumber) { + case 0: // First Page - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); break; case 4: // Second Page - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); break; case 8: // Third Page - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - break; - - case 12: // Fourth Page - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); break; @@ -905,8 +878,8 @@ void AnycubicTFTClass::GetCommandFromTFT() if((!planner.movesplanned())&& (TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE)) { if((current_position[Z_AXIS]<10)) enqueue_and_echo_commands_P(PSTR("G1 Z10")); // RAISE Z AXIS - thermalManager.setTargetBed(50); - thermalManager.setTargetHotend(200, 0); + thermalManager.setTargetBed(55); + thermalManager.setTargetHotend(195, 0); ANYCUBIC_SERIAL_SUCC_START; ANYCUBIC_SERIAL_ENTER(); }