From ad683fdedc2865c8d834312807ea82ae85c9d030 Mon Sep 17 00:00:00 2001 From: David Ramiro Date: Thu, 24 Jan 2019 16:45:35 +0100 Subject: [PATCH 1/5] Beautify code Fix indentation --- Marlin/AnycubicTFT.cpp | 1848 ++++++++++++++++++++-------------------- 1 file changed, 924 insertions(+), 924 deletions(-) diff --git a/Marlin/AnycubicTFT.cpp b/Marlin/AnycubicTFT.cpp index 1f60157..67efe12 100644 --- a/Marlin/AnycubicTFT.cpp +++ b/Marlin/AnycubicTFT.cpp @@ -1,21 +1,21 @@ /* - AnycubicTFT.cpp --- Support for Anycubic i3 Mega TFT - Created by Christian Hopp on 09.12.17. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ + AnycubicTFT.cpp --- Support for Anycubic i3 Mega TFT + Created by Christian Hopp on 09.12.17. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ #include @@ -42,12 +42,12 @@ char _conv[8]; char *itostr2(const uint8_t &x) { - //sprintf(conv,"%5.1f",x); - int xx=x; - _conv[0]=(xx/10)%10+'0'; - _conv[1]=(xx)%10+'0'; - _conv[2]=0; - return _conv; + //sprintf(conv,"%5.1f",x); + int xx=x; + _conv[0]=(xx/10)%10+'0'; + _conv[1]=(xx)%10+'0'; + _conv[2]=0; + return _conv; } #ifndef ULTRA_LCD @@ -58,25 +58,25 @@ char *itostr2(const uint8_t &x) char* itostr3(const int x) { - int xx = x; - _conv[4] = MINUSOR(xx, RJDIGIT(xx, 100)); - _conv[5] = RJDIGIT(xx, 10); - _conv[6] = DIGIMOD(xx, 1); - return &_conv[4]; + int xx = x; + _conv[4] = MINUSOR(xx, RJDIGIT(xx, 100)); + _conv[5] = RJDIGIT(xx, 10); + _conv[6] = DIGIMOD(xx, 1); + return &_conv[4]; } // Convert signed float to fixed-length string with 023.45 / -23.45 format char *ftostr32(const float &x) { - long xx = x * 100; - _conv[1] = MINUSOR(xx, DIGIMOD(xx, 10000)); - _conv[2] = DIGIMOD(xx, 1000); - _conv[3] = DIGIMOD(xx, 100); - _conv[4] = '.'; - _conv[5] = DIGIMOD(xx, 10); - _conv[6] = DIGIMOD(xx, 1); - return &_conv[1]; + long xx = x * 100; + _conv[1] = MINUSOR(xx, DIGIMOD(xx, 10000)); + _conv[2] = DIGIMOD(xx, 1000); + _conv[3] = DIGIMOD(xx, 100); + _conv[4] = '.'; + _conv[5] = DIGIMOD(xx, 10); + _conv[6] = DIGIMOD(xx, 1); + return &_conv[1]; } #endif @@ -85,1050 +85,1050 @@ AnycubicTFTClass::AnycubicTFTClass() { } void AnycubicTFTClass::Setup() { - AnycubicSerial.begin(115200); - //ANYCUBIC_SERIAL_START(); - ANYCUBIC_SERIAL_PROTOCOLPGM("J17"); // J17 Main board reset - ANYCUBIC_SERIAL_ENTER(); - delay(10); - ANYCUBIC_SERIAL_PROTOCOLPGM("J12"); // J12 Ready - ANYCUBIC_SERIAL_ENTER(); + AnycubicSerial.begin(115200); + //ANYCUBIC_SERIAL_START(); + ANYCUBIC_SERIAL_PROTOCOLPGM("J17"); // J17 Main board reset + ANYCUBIC_SERIAL_ENTER(); + delay(10); + ANYCUBIC_SERIAL_PROTOCOLPGM("J12"); // J12 Ready + ANYCUBIC_SERIAL_ENTER(); #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT) - pinMode(SD_DETECT_PIN, INPUT); - WRITE(SD_DETECT_PIN, HIGH); + pinMode(SD_DETECT_PIN, INPUT); + WRITE(SD_DETECT_PIN, HIGH); #endif - + #if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR) - pinMode(FIL_RUNOUT_PIN,INPUT); - WRITE(FIL_RUNOUT_PIN,HIGH); - if(READ(FIL_RUNOUT_PIN)==true) - { - ANYCUBIC_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK - ANYCUBIC_SERIAL_ENTER(); + pinMode(FIL_RUNOUT_PIN,INPUT); + WRITE(FIL_RUNOUT_PIN,HIGH); + if(READ(FIL_RUNOUT_PIN)==true) + { + ANYCUBIC_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout... J15"); + SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout... J15"); #endif - } + } #endif - - SelectedDirectory[0]=0; - SpecialMenu=false; + + SelectedDirectory[0]=0; + SpecialMenu=false; } void AnycubicTFTClass::WriteOutageEEPromData() { - int pos=E2END-256; - + int pos=E2END-256; + } void AnycubicTFTClass::ReadOutageEEPromData() { - int pos=E2END-256; + int pos=E2END-256; } void AnycubicTFTClass::KillTFT() { - ANYCUBIC_SERIAL_PROTOCOLPGM("J11"); // J11 Kill - ANYCUBIC_SERIAL_ENTER(); + ANYCUBIC_SERIAL_PROTOCOLPGM("J11"); // J11 Kill + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Kill command... J11"); + SERIAL_ECHOLNPGM("TFT Serial Debug: Kill command... J11"); #endif } void AnycubicTFTClass::StartPrint(){ - if (TFTstate==ANYCUBIC_TFT_STATE_SDPAUSE) { + if (TFTstate==ANYCUBIC_TFT_STATE_SDPAUSE) { #ifndef ADVANCED_PAUSE_FEATURE - enqueue_and_echo_commands_P(PSTR("G91\nG1 Z-10 F240\nG90")); + enqueue_and_echo_commands_P(PSTR("G91\nG1 Z-10 F240\nG90")); #endif - } - starttime=millis(); + } + starttime=millis(); #ifdef SDSUPPORT - card.startFileprint(); + card.startFileprint(); #endif - TFTstate=ANYCUBIC_TFT_STATE_SDPRINT; + TFTstate=ANYCUBIC_TFT_STATE_SDPRINT; } void AnycubicTFTClass::PausePrint(){ #ifdef SDSUPPORT - card.pauseSDPrint(); + card.pauseSDPrint(); #endif - TFTstate=ANYCUBIC_TFT_STATE_SDPAUSE_REQ; -#ifdef ANYCUBIC_FILAMENT_RUNOUT_SENSOR - if(FilamentTestStatus) { - ANYCUBIC_SERIAL_PROTOCOLPGM("J05");// J05 pausing - ANYCUBIC_SERIAL_ENTER(); + TFTstate=ANYCUBIC_TFT_STATE_SDPAUSE_REQ; +#ifdef ANYCUBIC_FILAMENT_RUNOUT_SENSOR + if(FilamentTestStatus) { + ANYCUBIC_SERIAL_PROTOCOLPGM("J05");// J05 pausing + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: SD print paused... J05"); + SERIAL_ECHOLNPGM("TFT Serial Debug: SD print paused... J05"); #endif - } else { - // Pause because of "out of filament" - ANYCUBIC_SERIAL_PROTOCOLPGM("J23"); //J23 FILAMENT LACK with the prompt box don't disappear - ANYCUBIC_SERIAL_ENTER(); + } else { + // Pause because of "out of filament" + ANYCUBIC_SERIAL_PROTOCOLPGM("J23"); //J23 FILAMENT LACK with the prompt box don't disappear + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout while printing... J23"); + SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout while printing... J23"); #endif - } + } #endif } void AnycubicTFTClass::StopPrint(){ #ifdef SDSUPPORT - card.stopSDPrint(); + card.stopSDPrint(); #endif - clear_command_queue(); - quickstop_stepper(); - print_job_timer.stop(); - thermalManager.disable_all_heaters(); + clear_command_queue(); + quickstop_stepper(); + print_job_timer.stop(); + thermalManager.disable_all_heaters(); #if FAN_COUNT > 0 - for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0; + for (uint8_t i = 0; i < FAN_COUNT; i++) fanSpeeds[i] = 0; #endif - TFTstate=ANYCUBIC_TFT_STATE_SDSTOP_REQ; + TFTstate=ANYCUBIC_TFT_STATE_SDSTOP_REQ; } float AnycubicTFTClass::CodeValue() { - return (strtod(&TFTcmdbuffer[TFTbufindr][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindr] + 1], NULL)); + return (strtod(&TFTcmdbuffer[TFTbufindr][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindr] + 1], NULL)); } bool AnycubicTFTClass::CodeSeen(char code) { - TFTstrchr_pointer = strchr(TFTcmdbuffer[TFTbufindr], code); - return (TFTstrchr_pointer != NULL); //Return True if a character was found + TFTstrchr_pointer = strchr(TFTcmdbuffer[TFTbufindr], code); + return (TFTstrchr_pointer != NULL); //Return True if a character was found } void AnycubicTFTClass::HandleSpecialMenu() { - if(strcmp(SelectedDirectory, "")==0) { - SpecialMenu=true; - } else if (strcmp(SelectedDirectory, "")==0) { - SERIAL_PROTOCOLLNPGM("Special Menu: Auto Tune Hotend PID"); - enqueue_and_echo_commands_P(PSTR("M106 S204\nM303 E0 S210 C6 U1")); - } else if (strcmp(SelectedDirectory, "")==0) { - SERIAL_PROTOCOLLNPGM("Special Menu: Auto Tune Hotbed Pid"); - enqueue_and_echo_commands_P(PSTR("M303 E-1 S60 C6 U1")); - } else if (strcmp(SelectedDirectory, "")==0) { - SERIAL_PROTOCOLLNPGM("Special Menu: Save EEPROM"); - enqueue_and_echo_commands_P(PSTR("M500")); - } else if (strcmp(SelectedDirectory, "")==0) { - SERIAL_PROTOCOLLNPGM("Special Menu: Load FW Defaults"); - enqueue_and_echo_commands_P(PSTR("M502")); - } 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) { - SpecialMenu=false; - } + if(strcmp(SelectedDirectory, "")==0) { + SpecialMenu=true; + } else if (strcmp(SelectedDirectory, "")==0) { + SERIAL_PROTOCOLLNPGM("Special Menu: Auto Tune Hotend PID"); + enqueue_and_echo_commands_P(PSTR("M106 S204\nM303 E0 S210 C6 U1")); + } else if (strcmp(SelectedDirectory, "")==0) { + SERIAL_PROTOCOLLNPGM("Special Menu: Auto Tune Hotbed Pid"); + enqueue_and_echo_commands_P(PSTR("M303 E-1 S60 C6 U1")); + } else if (strcmp(SelectedDirectory, "")==0) { + SERIAL_PROTOCOLLNPGM("Special Menu: Save EEPROM"); + enqueue_and_echo_commands_P(PSTR("M500")); + } else if (strcmp(SelectedDirectory, "")==0) { + SERIAL_PROTOCOLLNPGM("Special Menu: Load FW Defaults"); + enqueue_and_echo_commands_P(PSTR("M502")); + } 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) { + SpecialMenu=false; + } } 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(""); - break; + 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(""); + 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(""); - 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(""); + 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; - - default: - break; - } - } -#ifdef SDSUPPORT - else if(card.cardOK) - { - uint16_t cnt=filenumber; - uint16_t max_files; - uint16_t dir_files=card.getnrfilenames(); - - if((dir_files-filenumber)<4) - { - max_files=dir_files; - } else { - max_files=filenumber+3; - } - - for(cnt=filenumber; cnt<=max_files; cnt++) - { - if (cnt==0) // Special Entry - { - if(strcmp(card.getWorkDirName(), "/") == 0) { - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - SERIAL_PROTOCOL(cnt); - SERIAL_PROTOCOLLNPGM(""); - } else { - ANYCUBIC_SERIAL_PROTOCOLLNPGM("/.."); - ANYCUBIC_SERIAL_PROTOCOLLNPGM("/.."); - SERIAL_PROTOCOL(cnt); - SERIAL_PROTOCOLLNPGM("/.."); + 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; + + default: + break; + } } - } else { - card.getfilename(cnt-1); +#ifdef SDSUPPORT + else if(card.cardOK) + { + uint16_t cnt=filenumber; + uint16_t max_files; + uint16_t dir_files=card.getnrfilenames(); + + if((dir_files-filenumber)<4) + { + max_files=dir_files; + } else { + max_files=filenumber+3; + } + + for(cnt=filenumber; cnt<=max_files; cnt++) + { + if (cnt==0) // Special Entry + { + if(strcmp(card.getWorkDirName(), "/") == 0) { + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + SERIAL_PROTOCOL(cnt); + SERIAL_PROTOCOLLNPGM(""); + } else { + ANYCUBIC_SERIAL_PROTOCOLLNPGM("/.."); + ANYCUBIC_SERIAL_PROTOCOLLNPGM("/.."); + SERIAL_PROTOCOL(cnt); + SERIAL_PROTOCOLLNPGM("/.."); + } + } else { + card.getfilename(cnt-1); // card.getfilename(cnt); - - if(card.filenameIsDir) { - ANYCUBIC_SERIAL_PROTOCOLPGM("/"); - ANYCUBIC_SERIAL_PROTOCOLLN(card.filename); - ANYCUBIC_SERIAL_PROTOCOLPGM("/"); - ANYCUBIC_SERIAL_PROTOCOLLN(card.longFilename); - SERIAL_PROTOCOL(cnt); - SERIAL_PROTOCOLPGM("/"); - SERIAL_PROTOCOLLN(card.longFilename); - } else { - ANYCUBIC_SERIAL_PROTOCOLLN(card.filename); - ANYCUBIC_SERIAL_PROTOCOLLN(card.longFilename); - SERIAL_PROTOCOL(cnt); - SERIAL_PROTOCOLLN(card.longFilename); + + if(card.filenameIsDir) { + ANYCUBIC_SERIAL_PROTOCOLPGM("/"); + ANYCUBIC_SERIAL_PROTOCOLLN(card.filename); + ANYCUBIC_SERIAL_PROTOCOLPGM("/"); + ANYCUBIC_SERIAL_PROTOCOLLN(card.longFilename); + SERIAL_PROTOCOL(cnt); + SERIAL_PROTOCOLPGM("/"); + SERIAL_PROTOCOLLN(card.longFilename); + } else { + ANYCUBIC_SERIAL_PROTOCOLLN(card.filename); + ANYCUBIC_SERIAL_PROTOCOLLN(card.longFilename); + SERIAL_PROTOCOL(cnt); + SERIAL_PROTOCOLLN(card.longFilename); + } + } + } + } +#endif + else { + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); + ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); } - } - } - } -#endif - else { - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - ANYCUBIC_SERIAL_PROTOCOLLNPGM(""); - } } void AnycubicTFTClass::CheckSDCardChange() { #ifdef SDSUPPORT - if (LastSDstatus != IS_SD_INSERTED()) - { - LastSDstatus = IS_SD_INSERTED(); - - if (LastSDstatus) - { - card.initsd(); - ANYCUBIC_SERIAL_PROTOCOLPGM("J00"); // J00 SD Card inserted - ANYCUBIC_SERIAL_ENTER(); + if (LastSDstatus != IS_SD_INSERTED()) + { + LastSDstatus = IS_SD_INSERTED(); + + if (LastSDstatus) + { + card.initsd(); + ANYCUBIC_SERIAL_PROTOCOLPGM("J00"); // J00 SD Card inserted + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: SD card inserted... J00"); + SERIAL_ECHOLNPGM("TFT Serial Debug: SD card inserted... J00"); #endif - } - else - { - ANYCUBIC_SERIAL_PROTOCOLPGM("J01"); // J01 SD Card removed - ANYCUBIC_SERIAL_ENTER(); + } + else + { + ANYCUBIC_SERIAL_PROTOCOLPGM("J01"); // J01 SD Card removed + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: SD card removed... J01"); + SERIAL_ECHOLNPGM("TFT Serial Debug: SD card removed... J01"); #endif - } - } -#endif + } + } +#endif } void AnycubicTFTClass::CheckHeaterError() { - if ((thermalManager.degHotend(0) < 5) || (thermalManager.degHotend(0) > 290)) - { - if (HeaterCheckCount > 60000) - { - HeaterCheckCount = 0; - ANYCUBIC_SERIAL_PROTOCOLPGM("J10"); // J10 Hotend temperature abnormal - ANYCUBIC_SERIAL_ENTER(); + if ((thermalManager.degHotend(0) < 5) || (thermalManager.degHotend(0) > 290)) + { + if (HeaterCheckCount > 60000) + { + HeaterCheckCount = 0; + ANYCUBIC_SERIAL_PROTOCOLPGM("J10"); // J10 Hotend temperature abnormal + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Hotend temperature abnormal... J20"); + SERIAL_ECHOLNPGM("TFT Serial Debug: Hotend temperature abnormal... J20"); #endif - } - else - { - HeaterCheckCount++; - } - } - else - { - HeaterCheckCount = 0; - } + } + else + { + HeaterCheckCount++; + } + } + else + { + HeaterCheckCount = 0; + } } void AnycubicTFTClass::StateHandler() { - switch (TFTstate) { - case ANYCUBIC_TFT_STATE_IDLE: + switch (TFTstate) { + case ANYCUBIC_TFT_STATE_IDLE: #ifdef SDSUPPORT - if(card.sdprinting){ - TFTstate=ANYCUBIC_TFT_STATE_SDPRINT; - starttime=millis(); + if(card.sdprinting) { + TFTstate=ANYCUBIC_TFT_STATE_SDPRINT; + starttime=millis(); - // --> Send print info to display... most probably print started via gcode - } -#endif - break; - case ANYCUBIC_TFT_STATE_SDPRINT: -#ifdef SDSUPPORT - if(!card.sdprinting){ - // It seems that we are to printing anymore... pause or stopped? - if (card.isFileOpen()){ - // File is still open --> paused - TFTstate=ANYCUBIC_TFT_STATE_SDPAUSE; - } else { - // File is closed --> stopped - TFTstate=ANYCUBIC_TFT_STATE_IDLE; - ANYCUBIC_SERIAL_PROTOCOLPGM("J14");// J14 print done - ANYCUBIC_SERIAL_ENTER(); + // --> Send print info to display... most probably print started via gcode + } +#endif + break; + case ANYCUBIC_TFT_STATE_SDPRINT: +#ifdef SDSUPPORT + if(!card.sdprinting) { + // It seems that we are to printing anymore... pause or stopped? + if (card.isFileOpen()) { + // File is still open --> paused + TFTstate=ANYCUBIC_TFT_STATE_SDPAUSE; + } else { + // File is closed --> stopped + TFTstate=ANYCUBIC_TFT_STATE_IDLE; + ANYCUBIC_SERIAL_PROTOCOLPGM("J14");// J14 print done + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: SD print done... J14"); + SERIAL_ECHOLNPGM("TFT Serial Debug: SD print done... J14"); #endif - } - } -#endif - break; - case ANYCUBIC_TFT_STATE_SDPAUSE: - break; - case ANYCUBIC_TFT_STATE_SDPAUSE_OOF: + } + } +#endif + break; + case ANYCUBIC_TFT_STATE_SDPAUSE: + break; + case ANYCUBIC_TFT_STATE_SDPAUSE_OOF: #ifdef ANYCUBIC_FILAMENT_RUNOUT_SENSOR - if(!FilamentTestStatus) { - // We got filament again - TFTstate=ANYCUBIC_TFT_STATE_SDPAUSE; - } + if(!FilamentTestStatus) { + // We got filament again + TFTstate=ANYCUBIC_TFT_STATE_SDPAUSE; + } #endif - break; - case ANYCUBIC_TFT_STATE_SDPAUSE_REQ: -#ifdef SDSUPPORT - if((!card.sdprinting) && (!planner.movesplanned())){ - // We have to wait until the sd card printing has been settled + break; + case ANYCUBIC_TFT_STATE_SDPAUSE_REQ: +#ifdef SDSUPPORT + if((!card.sdprinting) && (!planner.movesplanned())) { + // We have to wait until the sd card printing has been settled #ifndef ADVANCED_PAUSE_FEATURE - enqueue_and_echo_commands_P(PSTR("G91\nG1 Z10 F240\nG90")); + enqueue_and_echo_commands_P(PSTR("G91\nG1 Z10 F240\nG90")); #endif #ifdef ANYCUBIC_FILAMENT_RUNOUT_SENSOR - if(FilamentTestStatus) { - TFTstate=ANYCUBIC_TFT_STATE_SDPAUSE; - } else { - // Pause because of "out of filament" - TFTstate=ANYCUBIC_TFT_STATE_SDPAUSE_OOF; - } -#endif - ANYCUBIC_SERIAL_PROTOCOLPGM("J18");// J18 pausing print done - ANYCUBIC_SERIAL_ENTER(); -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: SD print paused done... J18"); + if(FilamentTestStatus) { + TFTstate=ANYCUBIC_TFT_STATE_SDPAUSE; + } else { + // Pause because of "out of filament" + TFTstate=ANYCUBIC_TFT_STATE_SDPAUSE_OOF; + } #endif - } -#endif - break; - case ANYCUBIC_TFT_STATE_SDSTOP_REQ: -#ifdef SDSUPPORT - if((!card.sdprinting) && (!planner.movesplanned())){ - ANYCUBIC_SERIAL_PROTOCOLPGM("J16");// J16 stop print - ANYCUBIC_SERIAL_ENTER(); - TFTstate=ANYCUBIC_TFT_STATE_IDLE; + ANYCUBIC_SERIAL_PROTOCOLPGM("J18");// J18 pausing print done + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: SD print stopped... J16"); + SERIAL_ECHOLNPGM("TFT Serial Debug: SD print paused done... J18"); #endif - if((current_position[Z_AXIS]>200)){ - enqueue_and_echo_commands_P(PSTR("G91")); - enqueue_and_echo_commands_P(PSTR("G1 Z1 F240")); - enqueue_and_echo_commands_P(PSTR("G90")); - } else if ((current_position[Z_AXIS]<190)){ - enqueue_and_echo_commands_P(PSTR("G91")); - enqueue_and_echo_commands_P(PSTR("G1 Z15 F240")); - enqueue_and_echo_commands_P(PSTR("G90")); - } else if ((current_position[Z_AXIS]<150)){ - enqueue_and_echo_commands_P(PSTR("G91")); - enqueue_and_echo_commands_P(PSTR("G1 Z50 F240")); - enqueue_and_echo_commands_P(PSTR("G90")); - } - enqueue_and_echo_commands_P(PSTR("M84")); - } -#endif - break; - default: - break; - } + } +#endif + break; + case ANYCUBIC_TFT_STATE_SDSTOP_REQ: +#ifdef SDSUPPORT + if((!card.sdprinting) && (!planner.movesplanned())) { + ANYCUBIC_SERIAL_PROTOCOLPGM("J16");// J16 stop print + ANYCUBIC_SERIAL_ENTER(); + TFTstate=ANYCUBIC_TFT_STATE_IDLE; +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Serial Debug: SD print stopped... J16"); +#endif + if((current_position[Z_AXIS]>200)) { + enqueue_and_echo_commands_P(PSTR("G91")); + enqueue_and_echo_commands_P(PSTR("G1 Z1 F240")); + enqueue_and_echo_commands_P(PSTR("G90")); + } else if ((current_position[Z_AXIS]<190)) { + enqueue_and_echo_commands_P(PSTR("G91")); + enqueue_and_echo_commands_P(PSTR("G1 Z15 F240")); + enqueue_and_echo_commands_P(PSTR("G90")); + } else if ((current_position[Z_AXIS]<150)) { + enqueue_and_echo_commands_P(PSTR("G91")); + enqueue_and_echo_commands_P(PSTR("G1 Z50 F240")); + enqueue_and_echo_commands_P(PSTR("G90")); + } + enqueue_and_echo_commands_P(PSTR("M84")); + } +#endif + break; + default: + break; + } } void AnycubicTFTClass::FilamentRunout() { #if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR) - FilamentTestStatus=READ(FIL_RUNOUT_PIN)&0xff; - - if(FilamentTestStatus>FilamentTestLastStatus) - { - FilamentRunoutCounter++; - if(FilamentRunoutCounter>=15800) - { - FilamentRunoutCounter=0; -#ifdef SDSUPPORT - if((card.sdprinting==true)) - { - PausePrint(); - } - else if((card.sdprinting==false)) - { + FilamentTestStatus=READ(FIL_RUNOUT_PIN)&0xff; + + if(FilamentTestStatus>FilamentTestLastStatus) + { + FilamentRunoutCounter++; + if(FilamentRunoutCounter>=15800) + { + FilamentRunoutCounter=0; +#ifdef SDSUPPORT + if((card.sdprinting==true)) + { + PausePrint(); + } + else if((card.sdprinting==false)) + { #endif - ANYCUBIC_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK - ANYCUBIC_SERIAL_ENTER(); + ANYCUBIC_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout... J15"); + SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout... J15"); #endif #ifdef SDSUPPORT - } -#endif - FilamentTestLastStatus=FilamentTestStatus; - } - } - else if(FilamentTestStatus!=FilamentTestLastStatus) - { - FilamentRunoutCounter=0; - FilamentTestLastStatus=FilamentTestStatus; -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout recovered"); + } #endif - } + FilamentTestLastStatus=FilamentTestStatus; + } + } + else if(FilamentTestStatus!=FilamentTestLastStatus) + { + FilamentRunoutCounter=0; + FilamentTestLastStatus=FilamentTestStatus; +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout recovered"); +#endif + } #endif } void AnycubicTFTClass::GetCommandFromTFT() { - char *starpos = NULL; - while( AnycubicSerial.available() > 0 && TFTbuflen < TFTBUFSIZE) - { - serial3_char = AnycubicSerial.read(); - if(serial3_char == '\n' || - serial3_char == '\r' || - serial3_char == ':' || - serial3_count >= (TFT_MAX_CMD_SIZE - 1) ) - { - if(!serial3_count) { //if empty line - return; - } - - TFTcmdbuffer[TFTbufindw][serial3_count] = 0; //terminate string - - if((strchr(TFTcmdbuffer[TFTbufindw], 'A') != NULL)){ - int16_t a_command; - TFTstrchr_pointer = strchr(TFTcmdbuffer[TFTbufindw], 'A'); - a_command=((int)((strtod(&TFTcmdbuffer[TFTbufindw][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindw] + 1], NULL)))); - -#ifdef ANYCUBIC_TFT_DEBUG - if ((a_command>7) && (a_command != 20)) // No debugging of status polls, please! - SERIAL_ECHOLNPAIR("TFT Serial Command: ", TFTcmdbuffer[TFTbufindw]); -#endif - - switch(a_command){ - - case 0: //A0 GET HOTEND TEMP - ANYCUBIC_SERIAL_PROTOCOLPGM("A0V "); - ANYCUBIC_SERIAL_PROTOCOL(itostr3(int(thermalManager.degHotend(0) + 0.5))); - ANYCUBIC_SERIAL_ENTER(); - break; - - case 1: //A1 GET HOTEND TARGET TEMP - ANYCUBIC_SERIAL_PROTOCOLPGM("A1V "); - ANYCUBIC_SERIAL_PROTOCOL(itostr3(int(thermalManager.degTargetHotend(0) + 0.5))); - ANYCUBIC_SERIAL_ENTER(); - break; - - case 2: //A2 GET HOTBED TEMP - ANYCUBIC_SERIAL_PROTOCOLPGM("A2V "); - ANYCUBIC_SERIAL_PROTOCOL(itostr3(int(thermalManager.degBed() + 0.5))); - ANYCUBIC_SERIAL_ENTER(); - break; - - case 3: //A3 GET HOTBED TARGET TEMP - ANYCUBIC_SERIAL_PROTOCOLPGM("A3V "); - ANYCUBIC_SERIAL_PROTOCOL(itostr3(int(thermalManager.degTargetBed() + 0.5))); - ANYCUBIC_SERIAL_ENTER(); - break; - - case 4://A4 GET FAN SPEED - { - unsigned int temp; - - temp=((fanSpeeds[0]*100)/255); - temp=constrain(temp,0,100); - - ANYCUBIC_SERIAL_PROTOCOLPGM("A4V "); - ANYCUBIC_SERIAL_PROTOCOL(temp); - ANYCUBIC_SERIAL_ENTER(); - } - break; - case 5:// A5 GET CURRENT COORDINATE - ANYCUBIC_SERIAL_PROTOCOLPGM("A5V"); - ANYCUBIC_SERIAL_SPACE(); - ANYCUBIC_SERIAL_PROTOCOLPGM("X: "); - ANYCUBIC_SERIAL_PROTOCOL(current_position[X_AXIS]); - ANYCUBIC_SERIAL_SPACE(); - ANYCUBIC_SERIAL_PROTOCOLPGM("Y: "); - ANYCUBIC_SERIAL_PROTOCOL(current_position[Y_AXIS]); - ANYCUBIC_SERIAL_SPACE(); - ANYCUBIC_SERIAL_PROTOCOLPGM("Z: "); - ANYCUBIC_SERIAL_PROTOCOL(current_position[Z_AXIS]); - ANYCUBIC_SERIAL_SPACE(); - ANYCUBIC_SERIAL_ENTER(); - break; - case 6: //A6 GET SD CARD PRINTING STATUS -#ifdef SDSUPPORT - if(card.sdprinting){ - ANYCUBIC_SERIAL_PROTOCOLPGM("A6V "); - if(card.cardOK) - { - ANYCUBIC_SERIAL_PROTOCOL(itostr3(card.percentDone())); - } - else - { - ANYCUBIC_SERIAL_PROTOCOLPGM("J02"); - } - } - else - ANYCUBIC_SERIAL_PROTOCOLPGM("A6V ---"); - ANYCUBIC_SERIAL_ENTER(); -#endif - break; - case 7://A7 GET PRINTING TIME - { - ANYCUBIC_SERIAL_PROTOCOLPGM("A7V "); - if(starttime != 0) // print time - { - uint16_t time = millis()/60000 - starttime/60000; - ANYCUBIC_SERIAL_PROTOCOL(itostr2(time/60)); - ANYCUBIC_SERIAL_SPACE(); - ANYCUBIC_SERIAL_PROTOCOLPGM("H"); - ANYCUBIC_SERIAL_SPACE(); - ANYCUBIC_SERIAL_PROTOCOL(itostr2(time%60)); - ANYCUBIC_SERIAL_SPACE(); - ANYCUBIC_SERIAL_PROTOCOLPGM("M"); - }else{ - ANYCUBIC_SERIAL_SPACE(); - ANYCUBIC_SERIAL_PROTOCOLPGM("999:999"); - } - ANYCUBIC_SERIAL_ENTER(); - - break; - } - case 8: // A8 GET SD LIST -#ifdef SDSUPPORT - SelectedDirectory[0]=0; - if(!IS_SD_INSERTED()) - { - ANYCUBIC_SERIAL_PROTOCOLPGM("J02"); - ANYCUBIC_SERIAL_ENTER(); - } - else - { - if(CodeSeen('S')) - filenumber=CodeValue(); - - ANYCUBIC_SERIAL_PROTOCOLPGM("FN "); // Filelist start - ANYCUBIC_SERIAL_ENTER(); - Ls(); - ANYCUBIC_SERIAL_PROTOCOLPGM("END"); // Filelist stop - ANYCUBIC_SERIAL_ENTER(); - } -#endif - break; - case 9: // A9 pause sd print -#ifdef SDSUPPORT - if(card.sdprinting) - { - PausePrint(); - } - else - { - StopPrint(); - } -#endif - break; - case 10: // A10 resume sd print -#ifdef SDSUPPORT - if((TFTstate==ANYCUBIC_TFT_STATE_SDPAUSE) || (TFTstate==ANYCUBIC_TFT_STATE_SDOUTAGE)) - { - StartPrint(); - ANYCUBIC_SERIAL_PROTOCOLPGM("J04");// J04 printing form sd card now - ANYCUBIC_SERIAL_ENTER(); -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: SD print started... J04"); -#endif - } -#endif - break; - case 11: // A11 STOP SD PRINT -#ifdef SDSUPPORT - if((card.sdprinting) || (TFTstate==ANYCUBIC_TFT_STATE_SDOUTAGE)) - { - StopPrint(); - } -#endif - break; - case 12: // A12 kill - kill(PSTR(MSG_KILLED)); - break; - case 13: // A13 SELECTION FILE -#ifdef SDSUPPORT - if((!planner.movesplanned()) && (TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE)) - { - starpos = (strchr(TFTstrchr_pointer + 4,'*')); - if (TFTstrchr_pointer[4] == '/') { - strcpy(SelectedDirectory, TFTstrchr_pointer+5); - } else if (TFTstrchr_pointer[4] == '<') { - strcpy(SelectedDirectory, TFTstrchr_pointer+4); - } else { - SelectedDirectory[0]=0; - - if(starpos!=NULL) - *(starpos-1)='\0'; - card.openFile(TFTstrchr_pointer + 4,true); - if (card.isFileOpen()) { - ANYCUBIC_SERIAL_PROTOCOLPGM("J20"); // J20 Open successful - ANYCUBIC_SERIAL_ENTER(); -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: File open successful... J20"); -#endif - } else { - ANYCUBIC_SERIAL_PROTOCOLPGM("J21"); // J21 Open failed - ANYCUBIC_SERIAL_ENTER(); -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: File open failed... J21"); -#endif - } - } - ANYCUBIC_SERIAL_ENTER(); - } -#endif - break; - case 14: // A14 START PRINTING -#ifdef SDSUPPORT - if((!planner.movesplanned()) && (TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE) && (card.isFileOpen())) - { - StartPrint(); - ANYCUBIC_SERIAL_PROTOCOLPGM("J04"); // J04 Starting Print - ANYCUBIC_SERIAL_ENTER(); -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Starting SD Print... J04"); -#endif - } -#endif - break; - case 15: // A15 RESUMING FROM OUTAGE - // if((!planner.movesplanned())&&(!TFTresumingflag)) - // { - // if(card.cardOK) - // FlagResumFromOutage=true; - // ResumingFlag=1; - // card.startFileprint(); - // starttime=millis(); - // ANYCUBIC_SERIAL_SUCC_START; - // } - // ANYCUBIC_SERIAL_ENTER(); - break; - case 16: // A16 set hotend temp - { - unsigned int tempvalue; - if(CodeSeen('S')) - { - tempvalue=constrain(CodeValue(),0,275); - thermalManager.setTargetHotend(tempvalue,0); - } - else if((CodeSeen('C'))&&(!planner.movesplanned())) - { - if((current_position[Z_AXIS]<10)) - enqueue_and_echo_commands_P(PSTR("G1 Z10")); //RASE Z AXIS - tempvalue=constrain(CodeValue(),0,275); - thermalManager.setTargetHotend(tempvalue,0); - } - } - // ANYCUBIC_SERIAL_ENTER(); - break; - case 17:// A17 set heated bed temp - { - unsigned int tempbed; - if(CodeSeen('S')){tempbed=constrain(CodeValue(),0,150); - thermalManager.setTargetBed(tempbed); - } - } - // ANYCUBIC_SERIAL_ENTER(); - break; - case 18:// A18 set fan speed - unsigned int temp; - if (CodeSeen('S')) - { - temp=(CodeValue()*255/100); - temp=constrain(temp,0,255); - fanSpeeds[0]=temp; - } - else fanSpeeds[0]=255; - ANYCUBIC_SERIAL_ENTER(); - break; - case 19: // A19 stop stepper drivers - if((!planner.movesplanned()) -#ifdef SDSUPPORT - &&(!card.sdprinting) -#endif - ) - { - quickstop_stepper(); - disable_X(); - disable_Y(); - disable_Z(); - disable_E0(); - } - ANYCUBIC_SERIAL_ENTER(); - break; - case 20:// A20 read printing speed - { - if(CodeSeen('S')){ - feedrate_percentage=constrain(CodeValue(),40,999);} - else{ - ANYCUBIC_SERIAL_PROTOCOLPGM("A20V "); - ANYCUBIC_SERIAL_PROTOCOL(feedrate_percentage); - ANYCUBIC_SERIAL_ENTER(); - } - } - break; - case 21: // A21 all home - if((!planner.movesplanned()) && (TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE)) - { - if(CodeSeen('X')||CodeSeen('Y')||CodeSeen('Z')) - { - if(CodeSeen('X'))enqueue_and_echo_commands_P(PSTR("G28 X")); - if(CodeSeen('Y')) enqueue_and_echo_commands_P(PSTR("G28 Y")); - if(CodeSeen('Z')) enqueue_and_echo_commands_P(PSTR("G28 Z")); - } - else if(CodeSeen('C'))enqueue_and_echo_commands_P(PSTR("G28")); - } - break; - case 22: // A22 move X/Y/Z or extrude - if((!planner.movesplanned()) && (TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE)) - { - float coorvalue; - unsigned int movespeed=0; - char value[30]; - if(CodeSeen('F')) // Set feedrate - movespeed = CodeValue(); - - enqueue_and_echo_commands_P(PSTR("G91")); // relative coordinates - - if(CodeSeen('X')) // Move in X direction - { - coorvalue=CodeValue(); - if((coorvalue<=0.2)&&coorvalue>0){sprintf_P(value,PSTR("G1 X0.1F%i"),movespeed);} - else if((coorvalue<=-0.1)&&coorvalue>-1){sprintf_P(value,PSTR("G1 X-0.1F%i"),movespeed);} - else {sprintf_P(value,PSTR("G1 X%iF%i"),int(coorvalue),movespeed);} - enqueue_and_echo_command(value); - } - else if(CodeSeen('Y')) // Move in Y direction - { - coorvalue=CodeValue(); - if((coorvalue<=0.2)&&coorvalue>0){sprintf_P(value,PSTR("G1 Y0.1F%i"),movespeed);} - else if((coorvalue<=-0.1)&&coorvalue>-1){sprintf_P(value,PSTR("G1 Y-0.1F%i"),movespeed);} - else {sprintf_P(value,PSTR("G1 Y%iF%i"),int(coorvalue),movespeed);} - enqueue_and_echo_command(value); - } - else if(CodeSeen('Z')) // Move in Z direction - { - coorvalue=CodeValue(); - if((coorvalue<=0.2)&&coorvalue>0){sprintf_P(value,PSTR("G1 Z0.1F%i"),movespeed);} - else if((coorvalue<=-0.1)&&coorvalue>-1){sprintf_P(value,PSTR("G1 Z-0.1F%i"),movespeed);} - else {sprintf_P(value,PSTR("G1 Z%iF%i"),int(coorvalue),movespeed);} - enqueue_and_echo_command(value); - } - else if(CodeSeen('E')) // Extrude - { - coorvalue=CodeValue(); - if((coorvalue<=0.2)&&coorvalue>0){sprintf_P(value,PSTR("G1 E0.1F%i"),movespeed);} - else if((coorvalue<=-0.1)&&coorvalue>-1){sprintf_P(value,PSTR("G1 E-0.1F%i"),movespeed);} - else {sprintf_P(value,PSTR("G1 E%iF500"),int(coorvalue)); } - enqueue_and_echo_command(value); - } - enqueue_and_echo_commands_P(PSTR("G90")); // absolute coordinates - } - ANYCUBIC_SERIAL_ENTER(); - break; - case 23: // A23 preheat pla - 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); - ANYCUBIC_SERIAL_SUCC_START; - ANYCUBIC_SERIAL_ENTER(); - } - break; - case 24:// A24 preheat abs - 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(80); - thermalManager.setTargetHotend(240, 0); - - ANYCUBIC_SERIAL_SUCC_START; - ANYCUBIC_SERIAL_ENTER(); - } - break; - case 25: // A25 cool down - if((!planner.movesplanned())&& (TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE)) - { - thermalManager.setTargetHotend(0,0); - thermalManager.setTargetBed(0); - ANYCUBIC_SERIAL_PROTOCOLPGM("J12"); // J12 cool down - ANYCUBIC_SERIAL_ENTER(); -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Cooling down... J12"); -#endif - } - break; - case 26: // A26 refresh SD -#ifdef SDSUPPORT - if (SelectedDirectory[0]==0) { - card.initsd(); - } else { - if ((SelectedDirectory[0] == '.') && (SelectedDirectory[1] == '.')) { - card.updir(); - } else { - if (SelectedDirectory[0] == '<') { - HandleSpecialMenu(); - } else { - card.chdir(SelectedDirectory); - } - } - } + char *starpos = NULL; + while( AnycubicSerial.available() > 0 && TFTbuflen < TFTBUFSIZE) + { + serial3_char = AnycubicSerial.read(); + if(serial3_char == '\n' || + serial3_char == '\r' || + serial3_char == ':' || + serial3_count >= (TFT_MAX_CMD_SIZE - 1) ) + { + if(!serial3_count) { //if empty line + return; + } + + TFTcmdbuffer[TFTbufindw][serial3_count] = 0; //terminate string + + if((strchr(TFTcmdbuffer[TFTbufindw], 'A') != NULL)) { + int16_t a_command; + TFTstrchr_pointer = strchr(TFTcmdbuffer[TFTbufindw], 'A'); + a_command=((int)((strtod(&TFTcmdbuffer[TFTbufindw][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindw] + 1], NULL)))); - SelectedDirectory[0]=0; - - if(!IS_SD_INSERTED()) - { - ANYCUBIC_SERIAL_PROTOCOLPGM("J02"); // J02 SD Card initilized - ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: SD card initialized... J02"); + if ((a_command>7) && (a_command != 20)) // No debugging of status polls, please! + SERIAL_ECHOLNPAIR("TFT Serial Command: ", TFTcmdbuffer[TFTbufindw]); #endif - } -#endif - break; + + switch(a_command) { + + case 0: //A0 GET HOTEND TEMP + ANYCUBIC_SERIAL_PROTOCOLPGM("A0V "); + ANYCUBIC_SERIAL_PROTOCOL(itostr3(int(thermalManager.degHotend(0) + 0.5))); + ANYCUBIC_SERIAL_ENTER(); + break; + + case 1: //A1 GET HOTEND TARGET TEMP + ANYCUBIC_SERIAL_PROTOCOLPGM("A1V "); + ANYCUBIC_SERIAL_PROTOCOL(itostr3(int(thermalManager.degTargetHotend(0) + 0.5))); + ANYCUBIC_SERIAL_ENTER(); + break; + + case 2: //A2 GET HOTBED TEMP + ANYCUBIC_SERIAL_PROTOCOLPGM("A2V "); + ANYCUBIC_SERIAL_PROTOCOL(itostr3(int(thermalManager.degBed() + 0.5))); + ANYCUBIC_SERIAL_ENTER(); + break; + + case 3: //A3 GET HOTBED TARGET TEMP + ANYCUBIC_SERIAL_PROTOCOLPGM("A3V "); + ANYCUBIC_SERIAL_PROTOCOL(itostr3(int(thermalManager.degTargetBed() + 0.5))); + ANYCUBIC_SERIAL_ENTER(); + break; + + case 4://A4 GET FAN SPEED + { + unsigned int temp; + + temp=((fanSpeeds[0]*100)/255); + temp=constrain(temp,0,100); + + ANYCUBIC_SERIAL_PROTOCOLPGM("A4V "); + ANYCUBIC_SERIAL_PROTOCOL(temp); + ANYCUBIC_SERIAL_ENTER(); + } + break; + case 5:// A5 GET CURRENT COORDINATE + ANYCUBIC_SERIAL_PROTOCOLPGM("A5V"); + ANYCUBIC_SERIAL_SPACE(); + ANYCUBIC_SERIAL_PROTOCOLPGM("X: "); + ANYCUBIC_SERIAL_PROTOCOL(current_position[X_AXIS]); + ANYCUBIC_SERIAL_SPACE(); + ANYCUBIC_SERIAL_PROTOCOLPGM("Y: "); + ANYCUBIC_SERIAL_PROTOCOL(current_position[Y_AXIS]); + ANYCUBIC_SERIAL_SPACE(); + ANYCUBIC_SERIAL_PROTOCOLPGM("Z: "); + ANYCUBIC_SERIAL_PROTOCOL(current_position[Z_AXIS]); + ANYCUBIC_SERIAL_SPACE(); + ANYCUBIC_SERIAL_ENTER(); + break; + case 6: //A6 GET SD CARD PRINTING STATUS +#ifdef SDSUPPORT + if(card.sdprinting) { + ANYCUBIC_SERIAL_PROTOCOLPGM("A6V "); + if(card.cardOK) + { + ANYCUBIC_SERIAL_PROTOCOL(itostr3(card.percentDone())); + } + else + { + ANYCUBIC_SERIAL_PROTOCOLPGM("J02"); + } + } + else + ANYCUBIC_SERIAL_PROTOCOLPGM("A6V ---"); + ANYCUBIC_SERIAL_ENTER(); +#endif + break; + case 7://A7 GET PRINTING TIME + { + ANYCUBIC_SERIAL_PROTOCOLPGM("A7V "); + if(starttime != 0) // print time + { + uint16_t time = millis()/60000 - starttime/60000; + ANYCUBIC_SERIAL_PROTOCOL(itostr2(time/60)); + ANYCUBIC_SERIAL_SPACE(); + ANYCUBIC_SERIAL_PROTOCOLPGM("H"); + ANYCUBIC_SERIAL_SPACE(); + ANYCUBIC_SERIAL_PROTOCOL(itostr2(time%60)); + ANYCUBIC_SERIAL_SPACE(); + ANYCUBIC_SERIAL_PROTOCOLPGM("M"); + }else{ + ANYCUBIC_SERIAL_SPACE(); + ANYCUBIC_SERIAL_PROTOCOLPGM("999:999"); + } + ANYCUBIC_SERIAL_ENTER(); + + break; + } + case 8: // A8 GET SD LIST +#ifdef SDSUPPORT + SelectedDirectory[0]=0; + if(!IS_SD_INSERTED()) + { + ANYCUBIC_SERIAL_PROTOCOLPGM("J02"); + ANYCUBIC_SERIAL_ENTER(); + } + else + { + if(CodeSeen('S')) + filenumber=CodeValue(); + + ANYCUBIC_SERIAL_PROTOCOLPGM("FN "); // Filelist start + ANYCUBIC_SERIAL_ENTER(); + Ls(); + ANYCUBIC_SERIAL_PROTOCOLPGM("END"); // Filelist stop + ANYCUBIC_SERIAL_ENTER(); + } +#endif + break; + case 9: // A9 pause sd print +#ifdef SDSUPPORT + if(card.sdprinting) + { + PausePrint(); + } + else + { + StopPrint(); + } +#endif + break; + case 10: // A10 resume sd print +#ifdef SDSUPPORT + if((TFTstate==ANYCUBIC_TFT_STATE_SDPAUSE) || (TFTstate==ANYCUBIC_TFT_STATE_SDOUTAGE)) + { + StartPrint(); + ANYCUBIC_SERIAL_PROTOCOLPGM("J04");// J04 printing form sd card now + ANYCUBIC_SERIAL_ENTER(); +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Serial Debug: SD print started... J04"); +#endif + } +#endif + break; + case 11: // A11 STOP SD PRINT +#ifdef SDSUPPORT + if((card.sdprinting) || (TFTstate==ANYCUBIC_TFT_STATE_SDOUTAGE)) + { + StopPrint(); + } +#endif + break; + case 12: // A12 kill + kill(PSTR(MSG_KILLED)); + break; + case 13: // A13 SELECTION FILE +#ifdef SDSUPPORT + if((!planner.movesplanned()) && (TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE)) + { + starpos = (strchr(TFTstrchr_pointer + 4,'*')); + if (TFTstrchr_pointer[4] == '/') { + strcpy(SelectedDirectory, TFTstrchr_pointer+5); + } else if (TFTstrchr_pointer[4] == '<') { + strcpy(SelectedDirectory, TFTstrchr_pointer+4); + } else { + SelectedDirectory[0]=0; + + if(starpos!=NULL) + *(starpos-1)='\0'; + card.openFile(TFTstrchr_pointer + 4,true); + if (card.isFileOpen()) { + ANYCUBIC_SERIAL_PROTOCOLPGM("J20"); // J20 Open successful + ANYCUBIC_SERIAL_ENTER(); +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Serial Debug: File open successful... J20"); +#endif + } else { + ANYCUBIC_SERIAL_PROTOCOLPGM("J21"); // J21 Open failed + ANYCUBIC_SERIAL_ENTER(); +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Serial Debug: File open failed... J21"); +#endif + } + } + ANYCUBIC_SERIAL_ENTER(); + } +#endif + break; + case 14: // A14 START PRINTING +#ifdef SDSUPPORT + if((!planner.movesplanned()) && (TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE) && (card.isFileOpen())) + { + StartPrint(); + ANYCUBIC_SERIAL_PROTOCOLPGM("J04"); // J04 Starting Print + ANYCUBIC_SERIAL_ENTER(); +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Serial Debug: Starting SD Print... J04"); +#endif + } +#endif + break; + case 15: // A15 RESUMING FROM OUTAGE + // if((!planner.movesplanned())&&(!TFTresumingflag)) + // { + // if(card.cardOK) + // FlagResumFromOutage=true; + // ResumingFlag=1; + // card.startFileprint(); + // starttime=millis(); + // ANYCUBIC_SERIAL_SUCC_START; + // } + // ANYCUBIC_SERIAL_ENTER(); + break; + case 16: // A16 set hotend temp + { + unsigned int tempvalue; + if(CodeSeen('S')) + { + tempvalue=constrain(CodeValue(),0,275); + thermalManager.setTargetHotend(tempvalue,0); + } + else if((CodeSeen('C'))&&(!planner.movesplanned())) + { + if((current_position[Z_AXIS]<10)) + enqueue_and_echo_commands_P(PSTR("G1 Z10")); //RASE Z AXIS + tempvalue=constrain(CodeValue(),0,275); + thermalManager.setTargetHotend(tempvalue,0); + } + } + // ANYCUBIC_SERIAL_ENTER(); + break; + case 17:// A17 set heated bed temp + { + unsigned int tempbed; + if(CodeSeen('S')) {tempbed=constrain(CodeValue(),0,150); + thermalManager.setTargetBed(tempbed);} + } + // ANYCUBIC_SERIAL_ENTER(); + break; + case 18:// A18 set fan speed + unsigned int temp; + if (CodeSeen('S')) + { + temp=(CodeValue()*255/100); + temp=constrain(temp,0,255); + fanSpeeds[0]=temp; + } + else fanSpeeds[0]=255; + ANYCUBIC_SERIAL_ENTER(); + break; + case 19: // A19 stop stepper drivers + if((!planner.movesplanned()) +#ifdef SDSUPPORT + &&(!card.sdprinting) +#endif + ) + { + quickstop_stepper(); + disable_X(); + disable_Y(); + disable_Z(); + disable_E0(); + } + ANYCUBIC_SERIAL_ENTER(); + break; + case 20:// A20 read printing speed + { + if(CodeSeen('S')) { + feedrate_percentage=constrain(CodeValue(),40,999); + } + else{ + ANYCUBIC_SERIAL_PROTOCOLPGM("A20V "); + ANYCUBIC_SERIAL_PROTOCOL(feedrate_percentage); + ANYCUBIC_SERIAL_ENTER(); + } + } + break; + case 21: // A21 all home + if((!planner.movesplanned()) && (TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE)) + { + if(CodeSeen('X')||CodeSeen('Y')||CodeSeen('Z')) + { + if(CodeSeen('X')) enqueue_and_echo_commands_P(PSTR("G28 X")); + if(CodeSeen('Y')) enqueue_and_echo_commands_P(PSTR("G28 Y")); + if(CodeSeen('Z')) enqueue_and_echo_commands_P(PSTR("G28 Z")); + } + else if(CodeSeen('C')) enqueue_and_echo_commands_P(PSTR("G28")); + } + break; + case 22: // A22 move X/Y/Z or extrude + if((!planner.movesplanned()) && (TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE)) + { + float coorvalue; + unsigned int movespeed=0; + char value[30]; + if(CodeSeen('F')) // Set feedrate + movespeed = CodeValue(); + + enqueue_and_echo_commands_P(PSTR("G91")); // relative coordinates + + if(CodeSeen('X')) // Move in X direction + { + coorvalue=CodeValue(); + if((coorvalue<=0.2)&&coorvalue>0) {sprintf_P(value,PSTR("G1 X0.1F%i"),movespeed);} + else if((coorvalue<=-0.1)&&coorvalue>-1) {sprintf_P(value,PSTR("G1 X-0.1F%i"),movespeed);} + else {sprintf_P(value,PSTR("G1 X%iF%i"),int(coorvalue),movespeed);} + enqueue_and_echo_command(value); + } + else if(CodeSeen('Y')) // Move in Y direction + { + coorvalue=CodeValue(); + if((coorvalue<=0.2)&&coorvalue>0) {sprintf_P(value,PSTR("G1 Y0.1F%i"),movespeed);} + else if((coorvalue<=-0.1)&&coorvalue>-1) {sprintf_P(value,PSTR("G1 Y-0.1F%i"),movespeed);} + else {sprintf_P(value,PSTR("G1 Y%iF%i"),int(coorvalue),movespeed);} + enqueue_and_echo_command(value); + } + else if(CodeSeen('Z')) // Move in Z direction + { + coorvalue=CodeValue(); + if((coorvalue<=0.2)&&coorvalue>0) {sprintf_P(value,PSTR("G1 Z0.1F%i"),movespeed);} + else if((coorvalue<=-0.1)&&coorvalue>-1) {sprintf_P(value,PSTR("G1 Z-0.1F%i"),movespeed);} + else {sprintf_P(value,PSTR("G1 Z%iF%i"),int(coorvalue),movespeed);} + enqueue_and_echo_command(value); + } + else if(CodeSeen('E')) // Extrude + { + coorvalue=CodeValue(); + if((coorvalue<=0.2)&&coorvalue>0) {sprintf_P(value,PSTR("G1 E0.1F%i"),movespeed);} + else if((coorvalue<=-0.1)&&coorvalue>-1) {sprintf_P(value,PSTR("G1 E-0.1F%i"),movespeed);} + else {sprintf_P(value,PSTR("G1 E%iF500"),int(coorvalue)); } + enqueue_and_echo_command(value); + } + enqueue_and_echo_commands_P(PSTR("G90")); // absolute coordinates + } + ANYCUBIC_SERIAL_ENTER(); + break; + case 23: // A23 preheat pla + 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); + ANYCUBIC_SERIAL_SUCC_START; + ANYCUBIC_SERIAL_ENTER(); + } + break; + case 24:// A24 preheat abs + 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(80); + thermalManager.setTargetHotend(240, 0); + + ANYCUBIC_SERIAL_SUCC_START; + ANYCUBIC_SERIAL_ENTER(); + } + break; + case 25: // A25 cool down + if((!planner.movesplanned())&& (TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE)) + { + thermalManager.setTargetHotend(0,0); + thermalManager.setTargetBed(0); + ANYCUBIC_SERIAL_PROTOCOLPGM("J12"); // J12 cool down + ANYCUBIC_SERIAL_ENTER(); +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Serial Debug: Cooling down... J12"); +#endif + } + break; + case 26: // A26 refresh SD +#ifdef SDSUPPORT + if (SelectedDirectory[0]==0) { + card.initsd(); + } else { + if ((SelectedDirectory[0] == '.') && (SelectedDirectory[1] == '.')) { + card.updir(); + } else { + if (SelectedDirectory[0] == '<') { + HandleSpecialMenu(); + } else { + card.chdir(SelectedDirectory); + } + } + } + + SelectedDirectory[0]=0; + + if(!IS_SD_INSERTED()) + { + ANYCUBIC_SERIAL_PROTOCOLPGM("J02"); // J02 SD Card initilized + ANYCUBIC_SERIAL_ENTER(); +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Serial Debug: SD card initialized... J02"); +#endif + } +#endif + break; #ifdef SERVO_ENDSTOPS - case 27: // A27 servos angles adjust - break; + case 27: // A27 servos angles adjust + break; #endif - case 28: // A28 filament test - { - if(CodeSeen('O')); - else if(CodeSeen('C')); - } - ANYCUBIC_SERIAL_ENTER(); - break; - case 29: // A29 Z PROBE OFFESET SET - break; - - case 30: // A30 assist leveling, the original function was canceled - if(CodeSeen('S')) { -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Entering level menue..."); -#endif - } else if(CodeSeen('O')) { -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Leveling started and movint to front left..."); -#endif - enqueue_and_echo_commands_P(PSTR("G91\nG1 Z10 F240\nG90\nG28\nG29\nG1 X20 Y20 F6000\nG1 Z0 F240")); - } else if(CodeSeen('T')) { -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Level checkpoint front right..."); -#endif - enqueue_and_echo_commands_P(PSTR("G1 Z5 F240\nG1 X190 Y20 F6000\nG1 Z0 F240")); - } else if(CodeSeen('C')) { -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Level checkpoint back right..."); -#endif - enqueue_and_echo_commands_P(PSTR("G1 Z5 F240\nG1 X190 Y190 F6000\nG1 Z0 F240")); - } else if(CodeSeen('Q')) { -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Level checkpoint back right..."); -#endif - enqueue_and_echo_commands_P(PSTR("G1 Z5 F240\nG1 X190 Y20 F6000\nG1 Z0 F240")); - } else if(CodeSeen('H')) { -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Level check no heating..."); -#endif - // enqueue_and_echo_commands_P(PSTR("... TBD ...")); - ANYCUBIC_SERIAL_PROTOCOLPGM("J22"); // J22 Test print done - ANYCUBIC_SERIAL_ENTER(); -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Leveling print test done... J22"); -#endif - } else if(CodeSeen('L')) { -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Level check heating..."); -#endif - // enqueue_and_echo_commands_P(PSTR("... TBD ...")); - ANYCUBIC_SERIAL_PROTOCOLPGM("J22"); // J22 Test print done - ANYCUBIC_SERIAL_ENTER(); -#ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Leveling print test with heating done... J22"); -#endif - } - ANYCUBIC_SERIAL_SUCC_START; - ANYCUBIC_SERIAL_ENTER(); - - break; - case 31: // A31 zoffset - if((!planner.movesplanned())&&(TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE)) - { -#if HAS_BED_PROBE - char value[30]; - char *s_zoffset; - //if((current_position[Z_AXIS]<10)) - // z_offset_auto_test(); + case 28: // A28 filament test + { + if(CodeSeen('O')); + else if(CodeSeen('C')); + } + ANYCUBIC_SERIAL_ENTER(); + break; + case 29: // A29 Z PROBE OFFESET SET + break; - if(CodeSeen('S')){ - ANYCUBIC_SERIAL_PROTOCOLPGM("A9V "); - ANYCUBIC_SERIAL_PROTOCOL(itostr3(int(zprobe_zoffset*100.00 + 0.5))); - ANYCUBIC_SERIAL_ENTER(); + case 30: // A30 assist leveling, the original function was canceled + if(CodeSeen('S')) { #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOPGM("TFT sending current z-probe offset data... <"); - SERIAL_ECHOPGM("A9V "); - SERIAL_ECHO(itostr3(int(zprobe_zoffset*100.00 + 0.5))); - SERIAL_ECHOLNPGM(">"); + SERIAL_ECHOLNPGM("TFT Entering level menue..."); #endif - } - if(CodeSeen('D')) - { - s_zoffset=ftostr32(float(CodeValue())/100.0); - sprintf_P(value,PSTR("M851 Z")); - strcat(value,s_zoffset); - enqueue_and_echo_command(value); // Apply Z-Probe offset - enqueue_and_echo_commands_P(PSTR("M500")); // Save to EEPROM - } -#endif - } - ANYCUBIC_SERIAL_ENTER(); - break; - case 32: // A32 clean leveling beep flag - if(CodeSeen('S')) { + } else if(CodeSeen('O')) { #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Level saving data..."); + SERIAL_ECHOLNPGM("TFT Leveling started and movint to front left..."); #endif - enqueue_and_echo_commands_P(PSTR("M500\nM420 S1\nG1 Z10 F240\nG1 X0 Y0 F6000")); - ANYCUBIC_SERIAL_SUCC_START; - ANYCUBIC_SERIAL_ENTER(); - } - break; - case 33: // A33 get version info - { - ANYCUBIC_SERIAL_PROTOCOLPGM("J33 "); - ANYCUBIC_SERIAL_PROTOCOLPGM(MSG_MY_VERSION); - ANYCUBIC_SERIAL_ENTER(); - } - break; - default: break; + enqueue_and_echo_commands_P(PSTR("G91\nG1 Z10 F240\nG90\nG28\nG29\nG1 X20 Y20 F6000\nG1 Z0 F240")); + } else if(CodeSeen('T')) { +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Level checkpoint front right..."); +#endif + enqueue_and_echo_commands_P(PSTR("G1 Z5 F240\nG1 X190 Y20 F6000\nG1 Z0 F240")); + } else if(CodeSeen('C')) { +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Level checkpoint back right..."); +#endif + enqueue_and_echo_commands_P(PSTR("G1 Z5 F240\nG1 X190 Y190 F6000\nG1 Z0 F240")); + } else if(CodeSeen('Q')) { +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Level checkpoint back right..."); +#endif + enqueue_and_echo_commands_P(PSTR("G1 Z5 F240\nG1 X190 Y20 F6000\nG1 Z0 F240")); + } else if(CodeSeen('H')) { +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Level check no heating..."); +#endif + // enqueue_and_echo_commands_P(PSTR("... TBD ...")); + ANYCUBIC_SERIAL_PROTOCOLPGM("J22"); // J22 Test print done + ANYCUBIC_SERIAL_ENTER(); +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Serial Debug: Leveling print test done... J22"); +#endif + } else if(CodeSeen('L')) { +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Level check heating..."); +#endif + // enqueue_and_echo_commands_P(PSTR("... TBD ...")); + ANYCUBIC_SERIAL_PROTOCOLPGM("J22"); // J22 Test print done + ANYCUBIC_SERIAL_ENTER(); +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Serial Debug: Leveling print test with heating done... J22"); +#endif + } + ANYCUBIC_SERIAL_SUCC_START; + ANYCUBIC_SERIAL_ENTER(); + + break; + case 31: // A31 zoffset + if((!planner.movesplanned())&&(TFTstate!=ANYCUBIC_TFT_STATE_SDPAUSE) && (TFTstate!=ANYCUBIC_TFT_STATE_SDOUTAGE)) + { +#if HAS_BED_PROBE + char value[30]; + char *s_zoffset; + //if((current_position[Z_AXIS]<10)) + // z_offset_auto_test(); + + if(CodeSeen('S')) { + ANYCUBIC_SERIAL_PROTOCOLPGM("A9V "); + ANYCUBIC_SERIAL_PROTOCOL(itostr3(int(zprobe_zoffset*100.00 + 0.5))); + ANYCUBIC_SERIAL_ENTER(); +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOPGM("TFT sending current z-probe offset data... <"); + SERIAL_ECHOPGM("A9V "); + SERIAL_ECHO(itostr3(int(zprobe_zoffset*100.00 + 0.5))); + SERIAL_ECHOLNPGM(">"); +#endif + } + if(CodeSeen('D')) + { + s_zoffset=ftostr32(float(CodeValue())/100.0); + sprintf_P(value,PSTR("M851 Z")); + strcat(value,s_zoffset); + enqueue_and_echo_command(value); // Apply Z-Probe offset + enqueue_and_echo_commands_P(PSTR("M500")); // Save to EEPROM + } +#endif + } + ANYCUBIC_SERIAL_ENTER(); + break; + case 32: // A32 clean leveling beep flag + if(CodeSeen('S')) { +#ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Level saving data..."); +#endif + enqueue_and_echo_commands_P(PSTR("M500\nM420 S1\nG1 Z10 F240\nG1 X0 Y0 F6000")); + ANYCUBIC_SERIAL_SUCC_START; + ANYCUBIC_SERIAL_ENTER(); + } + break; + case 33: // A33 get version info + { + ANYCUBIC_SERIAL_PROTOCOLPGM("J33 "); + ANYCUBIC_SERIAL_PROTOCOLPGM(MSG_MY_VERSION); + ANYCUBIC_SERIAL_ENTER(); + } + break; + default: break; + } + } + TFTbufindw = (TFTbufindw + 1)%TFTBUFSIZE; + TFTbuflen += 1; + serial3_count = 0; //clear buffer + } + else + { + TFTcmdbuffer[TFTbufindw][serial3_count++] = serial3_char; + } } - } - TFTbufindw = (TFTbufindw + 1)%TFTBUFSIZE; - TFTbuflen += 1; - serial3_count = 0; //clear buffer - } - else - { - TFTcmdbuffer[TFTbufindw][serial3_count++] = serial3_char; - } - } } void AnycubicTFTClass::CommandScan() { - CheckHeaterError(); - CheckSDCardChange(); - StateHandler(); - - if(TFTbuflen<(TFTBUFSIZE-1)) - GetCommandFromTFT(); - if(TFTbuflen) - { - TFTbuflen = (TFTbuflen-1); - TFTbufindr = (TFTbufindr + 1)%TFTBUFSIZE; - } + CheckHeaterError(); + CheckSDCardChange(); + StateHandler(); + + if(TFTbuflen<(TFTBUFSIZE-1)) + GetCommandFromTFT(); + if(TFTbuflen) + { + TFTbuflen = (TFTbuflen-1); + TFTbufindr = (TFTbufindr + 1)%TFTBUFSIZE; + } } void AnycubicTFTClass::HeatingStart() { - ANYCUBIC_SERIAL_PROTOCOLPGM("J06"); // J07 hotend heating start - ANYCUBIC_SERIAL_ENTER(); + ANYCUBIC_SERIAL_PROTOCOLPGM("J06"); // J07 hotend heating start + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Nozzle is heating... J06"); + SERIAL_ECHOLNPGM("TFT Serial Debug: Nozzle is heating... J06"); #endif } void AnycubicTFTClass::HeatingDone() { - ANYCUBIC_SERIAL_PROTOCOLPGM("J07"); // J07 hotend heating done - ANYCUBIC_SERIAL_ENTER(); + ANYCUBIC_SERIAL_PROTOCOLPGM("J07"); // J07 hotend heating done + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Nozzle heating is done... J07"); + SERIAL_ECHOLNPGM("TFT Serial Debug: Nozzle heating is done... J07"); #endif - if(TFTstate==ANYCUBIC_TFT_STATE_SDPRINT) - { - ANYCUBIC_SERIAL_PROTOCOLPGM("J04"); // J04 printing from sd card - ANYCUBIC_SERIAL_ENTER(); + if(TFTstate==ANYCUBIC_TFT_STATE_SDPRINT) + { + ANYCUBIC_SERIAL_PROTOCOLPGM("J04"); // J04 printing from sd card + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Continuing SD print after heating... J04"); + SERIAL_ECHOLNPGM("TFT Serial Debug: Continuing SD print after heating... J04"); #endif - } + } } void AnycubicTFTClass::BedHeatingStart() { - ANYCUBIC_SERIAL_PROTOCOLPGM("J08"); // J08 hotbed heating start - ANYCUBIC_SERIAL_ENTER(); + ANYCUBIC_SERIAL_PROTOCOLPGM("J08"); // J08 hotbed heating start + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Bed is heating... J08"); + SERIAL_ECHOLNPGM("TFT Serial Debug: Bed is heating... J08"); #endif } void AnycubicTFTClass::BedHeatingDone() { - ANYCUBIC_SERIAL_PROTOCOLPGM("J09"); // J09 hotbed heating done - ANYCUBIC_SERIAL_ENTER(); + ANYCUBIC_SERIAL_PROTOCOLPGM("J09"); // J09 hotbed heating done + ANYCUBIC_SERIAL_ENTER(); #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Bed heating is done... J09"); + SERIAL_ECHOLNPGM("TFT Serial Debug: Bed heating is done... J09"); #endif } From b3af9708e9aeff98fbe0af8793a900430356ace4 Mon Sep 17 00:00:00 2001 From: David Ramiro Date: Thu, 24 Jan 2019 16:50:34 +0100 Subject: [PATCH 2/5] Tweak print cancelling behaviour Fix movement on certain positions of the Z axis --- Marlin/AnycubicTFT.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Marlin/AnycubicTFT.cpp b/Marlin/AnycubicTFT.cpp index 67efe12..89a575b 100644 --- a/Marlin/AnycubicTFT.cpp +++ b/Marlin/AnycubicTFT.cpp @@ -465,17 +465,21 @@ void AnycubicTFTClass::StateHandler() #ifdef ANYCUBIC_TFT_DEBUG SERIAL_ECHOLNPGM("TFT Serial Debug: SD print stopped... J16"); #endif - if((current_position[Z_AXIS]>200)) { + if((current_position[Z_AXIS]>=200)) { enqueue_and_echo_commands_P(PSTR("G91")); enqueue_and_echo_commands_P(PSTR("G1 Z1 F240")); enqueue_and_echo_commands_P(PSTR("G90")); + } else if ((current_position[Z_AXIS]<200)) { + enqueue_and_echo_commands_P(PSTR("G91")); + enqueue_and_echo_commands_P(PSTR("G1 Z5 F240")); + enqueue_and_echo_commands_P(PSTR("G90")); } else if ((current_position[Z_AXIS]<190)) { enqueue_and_echo_commands_P(PSTR("G91")); - enqueue_and_echo_commands_P(PSTR("G1 Z15 F240")); + enqueue_and_echo_commands_P(PSTR("G1 Z10 F240")); enqueue_and_echo_commands_P(PSTR("G90")); } else if ((current_position[Z_AXIS]<150)) { enqueue_and_echo_commands_P(PSTR("G91")); - enqueue_and_echo_commands_P(PSTR("G1 Z50 F240")); + enqueue_and_echo_commands_P(PSTR("G1 Z35 F240")); enqueue_and_echo_commands_P(PSTR("G90")); } enqueue_and_echo_commands_P(PSTR("M84")); From f01ee750049e30b66c257c9c4cb0f82278236f61 Mon Sep 17 00:00:00 2001 From: David Ramiro Date: Mon, 28 Jan 2019 23:30:14 +0100 Subject: [PATCH 3/5] Merge upstream changes from https://github.com/MarlinFirmware/Marlin/tree/bugfix-1.1.x --- .gitattributes | 19 ++- .gitignore | 152 +++++++++++++++++- Marlin/Configuration.h | 1 + Marlin/Marlin_main.cpp | 98 ++++------- Marlin/Version.h | 2 +- .../AlephObjects/TAZ4/Configuration.h | 1 + .../AliExpress/CL-260/Configuration.h | 1 + .../Anet/A2plus/Configuration.h | 1 + .../Anet/A6/Configuration.h | 5 +- .../Anet/A8/Configuration.h | 17 +- .../BIBO/TouchX/Cyclops/Configuration.h | 1 + .../BIBO/TouchX/default/Configuration.h | 1 + .../BQ/Hephestos/Configuration.h | 1 + .../BQ/Hephestos_2/Configuration.h | 1 + .../BQ/WITBOX/Configuration.h | 1 + .../Cartesio/Configuration.h | 1 + .../Creality/CR-10/Configuration.h | 1 + .../Creality/CR-10S/Configuration.h | 1 + .../Creality/CR-10mini/Configuration.h | 1 + .../Creality/CR-8/Configuration.h | 1 + .../Creality/Ender-2/Configuration.h | 1 + .../Creality/Ender-3/Configuration.h | 5 +- .../Creality/Ender-4/Configuration.h | 1 + .../Felix/Configuration.h | 1 + .../Felix/DUAL/Configuration.h | 1 + .../FolgerTech/i3-2020/Configuration.h | 1 + .../Geeetech/GT2560/Configuration.h | 1 + .../Geeetech/I3_Pro_X-GT2560/Configuration.h | 1 + .../Prusa i3 Pro B/bltouch/Configuration.h | 1 + .../Prusa i3 Pro B/noprobe/Configuration.h | 1 + .../Geeetech/Prusa i3 Pro C/Configuration.h | 1 + .../Geeetech/Prusa i3 Pro W/Configuration.h | 1 + .../Infitary/i3-M508/Configuration.h | 1 + .../JGAurora/A5/Configuration.h | 1 + .../Malyan/M150/Configuration.h | 1 + .../Micromake/C1/basic/Configuration.h | 1 + .../Micromake/C1/enhanced/Configuration.h | 1 + .../RepRapPro/Huxley/Configuration.h | 1 + .../RepRapWorld/Megatronics/Configuration.h | 1 + .../RigidBot/Configuration.h | 1 + .../SCARA/Configuration.h | 1 + .../Sanguinololu/Configuration.h | 1 + .../TinyBoy2/Configuration.h | 1 + .../Tronxy/X1/Configuration.h | 1 + .../Tronxy/X3A/Configuration.h | 1 + .../Tronxy/X5S/Configuration.h | 1 + .../Tronxy/XY100/Configuration.h | 1 + .../Velleman/K8200/Configuration.h | 1 + .../Velleman/K8400/Configuration.h | 1 + .../Velleman/K8400/Dual-head/Configuration.h | 1 + .../Wanhao/Duplicator 6/Configuration.h | 1 + .../adafruit/ST7565/Configuration.h | 1 + .../delta/Anycubic/Kossel/Configuration.h | 1 + .../delta/Anycubic/Kossel/README.md | 6 +- .../FLSUN/auto_calibrate/Configuration.h | 1 + .../delta/FLSUN/kossel/Configuration.h | 1 + .../delta/FLSUN/kossel_mini/Configuration.h | 1 + .../delta/Hatchbox_Alpha/Configuration.h | 1 + .../delta/generic/Configuration.h | 1 + .../delta/kossel_mini/Configuration.h | 1 + .../delta/kossel_pro/Configuration.h | 1 + .../delta/kossel_xl/Configuration.h | 1 + .../gCreate/gMax1.5+/Configuration.h | 1 + .../hangprinter/Configuration.h | 1 + .../makibox/Configuration.h | 1 + .../tvrrug/Round2/Configuration.h | 1 + .../wt150/Configuration.h | 1 + Marlin/language_cz.h | 95 ++++++----- Marlin/language_cz_utf8.h | 101 +++++++----- Marlin/power_loss_recovery.cpp | 2 +- Marlin/temperature.cpp | 5 + Marlin/temperature.h | 4 +- Marlin/ultralcd.cpp | 10 +- README.md | 11 +- buildroot/share/atom/auto_build.py | 6 +- 75 files changed, 420 insertions(+), 177 deletions(-) diff --git a/.gitattributes b/.gitattributes index dfe0770..2588229 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,19 @@ -# Auto detect text files and perform LF normalization +# Set the default behavior, in case people don't have core.autocrlf set. * text=auto + +# Files with Unix line endings +*.c text eol=lf +*.cpp text eol=lf +*.h text eol=lf +*.ino text eol=lf +*.py text eol=lf +*.sh text eol=lf +*.scad text eol=lf + +# Files with native line endings +# *.sln text + +# Binary files +*.png binary +*.jpg binary +*.fon binary diff --git a/.gitignore b/.gitignore index f152028..1585f59 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,151 @@ -.pio -.pioenvs -.piolibdeps +# +# Marlin 3D Printer Firmware +# Copyright (C) 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] +# +# Based on Sprinter and grbl. +# Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# Our automatic versioning scheme generates the following file +# NEVER put it in the repository +_Version.h + +# +# OS +# +applet/ +*.DS_Store + + +# +# Misc +# +*~ +*.orig +*.rej +*.bak +*.idea +*.s +*.i +*.ii +*.swp +tags + +# +# C++ +# +# Compiled Object files +*.slo +*.lo +*.o +*.obj +*.ino.cpp + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + + +# +# C +# +# Object files +*.o +*.ko +*.obj +*.elf + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su + +# PlatformIO files/dirs .clang_complete .gcc-flags.json +.pio* +.pioenvs +.piolibdeps +lib/readme.txt + +#Visual Studio +*.sln +*.vcxproj +*.vcxproj.user +*.vcxproj.filters +Release/ +Debug/ +__vm/ +.vs/ +vc-fileutils.settings + +#Visual Studio Code +.vscode +.vscode/.browse.c_cpp.db* +.vscode/c_cpp_properties.json +.vscode/launch.json +.vscode/*.db + +#cmake +CMakeLists.txt +Marlin/CMakeLists.txt +CMakeListsPrivate.txt + +#CLion +cmake-build-* diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 6c50cc4..7444dea 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1120,6 +1120,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index a6c1612..0c1d97e 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -1387,7 +1387,11 @@ bool get_target_extruder_from_command(const uint16_t code) { } #elif ENABLED(DELTA) soft_endstop_min[axis] = base_min_pos(axis); - soft_endstop_max[axis] = axis == Z_AXIS ? delta_height : base_max_pos(axis); + soft_endstop_max[axis] = axis == Z_AXIS ? delta_height + #if HAS_BED_PROBE + - zprobe_zoffset + #endif + : base_max_pos(axis); #else soft_endstop_min[axis] = base_min_pos(axis); soft_endstop_max[axis] = base_max_pos(axis); @@ -1516,13 +1520,14 @@ static void set_axis_is_at_home(const AxisEnum axis) { } else #elif ENABLED(DELTA) - if (axis == Z_AXIS) - current_position[axis] = delta_height; - else - #endif - { + current_position[axis] = (axis == Z_AXIS ? delta_height + #if HAS_BED_PROBE + - zprobe_zoffset + #endif + : base_home_pos(axis)); + #else current_position[axis] = base_home_pos(axis); - } + #endif /** * Z Probe Z Homing? Account for the probe's Z offset. @@ -4066,7 +4071,11 @@ inline void gcode_G4() { #endif // Move all carriages together linearly until an endstop is hit. - current_position[X_AXIS] = current_position[Y_AXIS] = current_position[Z_AXIS] = (delta_height + 10); + current_position[X_AXIS] = current_position[Y_AXIS] = current_position[Z_AXIS] = (delta_height + 10 + #if HAS_BED_PROBE + - zprobe_zoffset + #endif + ); feedrate_mm_s = homing_feedrate(X_AXIS); buffer_line_to_current_position(); planner.synchronize(); @@ -4595,7 +4604,8 @@ void home_all_axes() { gcode_G28(true); } if (parser.seenval('X')) { px = parser.value_int() - 1; if (!WITHIN(px, 0, GRID_MAX_POINTS_X - 1)) { - SERIAL_PROTOCOLLNPGM("X out of range (1-" STRINGIFY(GRID_MAX_POINTS_X) ")."); + SERIAL_PROTOCOLPAIR("X out of range (1-", int(GRID_MAX_POINTS_X)); + SERIAL_PROTOCOLLNPGM(")"); return; } } @@ -4607,7 +4617,8 @@ void home_all_axes() { gcode_G28(true); } if (parser.seenval('Y')) { py = parser.value_int() - 1; if (!WITHIN(py, 0, GRID_MAX_POINTS_Y - 1)) { - SERIAL_PROTOCOLLNPGM("Y out of range (1-" STRINGIFY(GRID_MAX_POINTS_Y) ")."); + SERIAL_PROTOCOLPAIR("Y out of range (1-", int(GRID_MAX_POINTS_Y)); + SERIAL_PROTOCOLLNPGM(")"); return; } } @@ -5752,12 +5763,6 @@ void home_all_axes() { gcode_G28(true); } if ((!end_stops && tower_angles) || (end_stops && !tower_angles)) { // XOR SERIAL_PROTOCOLPAIR(" Radius:", delta_radius); } - #if HAS_BED_PROBE - if (!end_stops && !tower_angles) { - SERIAL_PROTOCOL_SP(30); - print_signed_float(PSTR("Offset"), zprobe_zoffset); - } - #endif SERIAL_EOL(); } @@ -5806,30 +5811,19 @@ void home_all_axes() { gcode_G28(true); } /** * - Probe a point */ - static float calibration_probe(const float &nx, const float &ny, const bool stow, const bool set_up) { + static float calibration_probe(const float &nx, const float &ny, const bool stow) { #if HAS_BED_PROBE - return probe_pt(nx, ny, set_up ? PROBE_PT_BIG_RAISE : stow ? PROBE_PT_STOW : PROBE_PT_RAISE, 0, false); + return probe_pt(nx, ny, stow ? PROBE_PT_STOW : PROBE_PT_RAISE, 0, false); #else UNUSED(stow); - UNUSED(set_up); return lcd_probe_pt(nx, ny); #endif } - #if HAS_BED_PROBE && ENABLED(ULTIPANEL) - static float probe_z_shift(const float center) { - STOW_PROBE(); - endstops.enable_z_probe(false); - float z_shift = lcd_probe_pt(0, 0) - center; - endstops.enable_z_probe(true); - return z_shift; - } - #endif - /** * - Probe a grid */ - static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_points, const bool towers_set, const bool stow_after_each, const bool set_up) { + static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_points, const bool towers_set, const bool stow_after_each) { const bool _0p_calibration = probe_points == 0, _1p_calibration = probe_points == 1 || probe_points == -1, _4p_calibration = probe_points == 2, @@ -5852,7 +5846,7 @@ void home_all_axes() { gcode_G28(true); } if (!_0p_calibration) { if (!_7p_no_intermediates && !_7p_4_intermediates && !_7p_11_intermediates) { // probe the center - z_pt[CEN] += calibration_probe(0, 0, stow_after_each, set_up); + z_pt[CEN] += calibration_probe(0, 0, stow_after_each); if (isnan(z_pt[CEN])) return false; } @@ -5862,7 +5856,7 @@ void home_all_axes() { gcode_G28(true); } I_LOOP_CAL_PT(rad, start, steps) { const float a = RADIANS(210 + (360 / NPP) * (rad - 1)), r = delta_calibration_radius * 0.1; - z_pt[CEN] += calibration_probe(cos(a) * r, sin(a) * r, stow_after_each, set_up); + z_pt[CEN] += calibration_probe(cos(a) * r, sin(a) * r, stow_after_each); if (isnan(z_pt[CEN])) return false; } z_pt[CEN] /= float(_7p_2_intermediates ? 7 : probe_points); @@ -5886,7 +5880,7 @@ void home_all_axes() { gcode_G28(true); } const float a = RADIANS(210 + (360 / NPP) * (rad - 1)), r = delta_calibration_radius * (1 - 0.1 * (zig_zag ? offset - circle : circle)), interpol = fmod(rad, 1); - const float z_temp = calibration_probe(cos(a) * r, sin(a) * r, stow_after_each, set_up); + const float z_temp = calibration_probe(cos(a) * r, sin(a) * r, stow_after_each); if (isnan(z_temp)) return false; // split probe point to neighbouring calibration points z_pt[uint8_t(LROUND(rad - interpol + NPP - 1)) % NPP + 1] += z_temp * sq(cos(RADIANS(interpol * 90))); @@ -6015,10 +6009,7 @@ void home_all_axes() { gcode_G28(true); } * * Parameters: * - * S Setup mode; disables probe protection - * * Pn Number of probe points: - * P-1 Checks the z_offset with a center probe and paper test. * P0 Normalizes calibration. * P1 Calibrates height only with center probe. * P2 Probe center and towers. Calibrate height, endstops and delta radius. @@ -6041,22 +6032,15 @@ void home_all_axes() { gcode_G28(true); } */ inline void gcode_G33() { - const bool set_up = - #if HAS_BED_PROBE - parser.seen('S'); - #else - false; - #endif - - const int8_t probe_points = set_up ? 2 : parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS); - if (!WITHIN(probe_points, -1, 10)) { - SERIAL_PROTOCOLLNPGM("?(P)oints is implausible (-1 - 10)."); + const int8_t probe_points = parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS); + if (!WITHIN(probe_points, 0, 10)) { + SERIAL_PROTOCOLLNPGM("?(P)oints is implausible (0-10)."); return; } const bool towers_set = !parser.seen('T'); - const float calibration_precision = set_up ? Z_CLEARANCE_BETWEEN_PROBES / 5.0 : parser.floatval('C', 0.0); + const float calibration_precision = parser.floatval('C', 0.0); if (calibration_precision < 0) { SERIAL_PROTOCOLLNPGM("?(C)alibration precision is implausible (>=0)."); return; @@ -6064,26 +6048,18 @@ void home_all_axes() { gcode_G28(true); } const int8_t force_iterations = parser.intval('F', 0); if (!WITHIN(force_iterations, 0, 30)) { - SERIAL_PROTOCOLLNPGM("?(F)orce iteration is implausible (0 - 30)."); + SERIAL_PROTOCOLLNPGM("?(F)orce iteration is implausible (0-30)."); return; } const int8_t verbose_level = parser.byteval('V', 1); if (!WITHIN(verbose_level, 0, 3)) { - SERIAL_PROTOCOLLNPGM("?(V)erbose level is implausible (0 - 3)."); + SERIAL_PROTOCOLLNPGM("?(V)erbose level is implausible (0-3)."); return; } const bool stow_after_each = parser.seen('E'); - if (set_up) { - delta_height = 999.99; - delta_radius = DELTA_PRINTABLE_RADIUS; - ZERO(delta_endstop_adj); - ZERO(delta_tower_angle_trim); - recalc_delta_settings(); - } - const bool _0p_calibration = probe_points == 0, _1p_calibration = probe_points == 1 || probe_points == -1, _4p_calibration = probe_points == 2, @@ -6132,7 +6108,6 @@ void home_all_axes() { gcode_G28(true); } const char *checkingac = PSTR("Checking... AC"); serialprintPGM(checkingac); if (verbose_level == 0) SERIAL_PROTOCOLPGM(" (DRY-RUN)"); - if (set_up) SERIAL_PROTOCOLPGM(" (SET-UP)"); SERIAL_EOL(); lcd_setstatusPGM(checkingac); @@ -6151,7 +6126,7 @@ void home_all_axes() { gcode_G28(true); } // Probe the points zero_std_dev_old = zero_std_dev; - if (!probe_calibration_points(z_at_pt, probe_points, towers_set, stow_after_each, set_up)) { + if (!probe_calibration_points(z_at_pt, probe_points, towers_set, stow_after_each)) { SERIAL_PROTOCOLLNPGM("Correct delta settings with M665 and M666"); return AC_CLEANUP(); } @@ -6199,11 +6174,6 @@ void home_all_axes() { gcode_G28(true); } delta_calibration_radius = cr_old; switch (probe_points) { - case -1: - #if HAS_BED_PROBE && ENABLED(ULTIPANEL) - zprobe_zoffset += probe_z_shift(z_at_pt[CEN]); - #endif - case 0: test_precision = 0.00; // forced end break; diff --git a/Marlin/Version.h b/Marlin/Version.h index c34d0ee..06655e5 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -1,4 +1,4 @@ -/** +/** * Marlin 3D Printer Firmware * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h index 6915781..482fd6a 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h @@ -1124,6 +1124,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h index 282b0a9..e9daa25 100644 --- a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h +++ b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h @@ -1104,6 +1104,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Anet/A2plus/Configuration.h b/Marlin/example_configurations/Anet/A2plus/Configuration.h index 67e22cf..ffad253 100644 --- a/Marlin/example_configurations/Anet/A2plus/Configuration.h +++ b/Marlin/example_configurations/Anet/A2plus/Configuration.h @@ -1179,6 +1179,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Anet/A6/Configuration.h b/Marlin/example_configurations/Anet/A6/Configuration.h index d407aa8..b2514e2 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration.h +++ b/Marlin/example_configurations/Anet/A6/Configuration.h @@ -141,8 +141,8 @@ // :[1, 2, 3, 4, 5] #define EXTRUDERS 1 -// Generally expected filament diameter (1.75, 2.85, 3.0, ...). Used for Volumetric, Filament Width Sensor, etc. -#define DEFAULT_NOMINAL_FILAMENT_DIA 3.0 +// The Anet A6 original extruder is designed for 1.75mm +#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 // For Cyclops or any "multi-extruder" that shares a single nozzle. //#define SINGLENOZZLE @@ -1243,6 +1243,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Anet/A8/Configuration.h b/Marlin/example_configurations/Anet/A8/Configuration.h index 1e6da8b..1c261a8 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration.h +++ b/Marlin/example_configurations/Anet/A8/Configuration.h @@ -413,9 +413,9 @@ * heater. If your configuration is significantly different than this and you don't understand * the issues involved, don't use bed PID until someone else verifies that your hardware works. */ -//#define PIDTEMPBED +#define PIDTEMPBED -#define BED_LIMIT_SWITCHING +//#define BED_LIMIT_SWITCHING /** * Max Bed Power @@ -431,9 +431,9 @@ //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) - #define DEFAULT_bedKp 10.00 - #define DEFAULT_bedKi .023 - #define DEFAULT_bedKd 305.4 + //#define DEFAULT_bedKp 10.00 + //#define DEFAULT_bedKi .023 + //#define DEFAULT_bedKd 305.4 //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from pidautotune @@ -441,6 +441,12 @@ //#define DEFAULT_bedKi 1.41 //#define DEFAULT_bedKd 1675.16 + // ANET A8 + // original Bed + 0.3mm Heat conducting into 4mm borosilicate (PID-Autotune: M303 E-1 S60 C5): + #define DEFAULT_bedKp 295.00 + #define DEFAULT_bedKi 35.65 + #define DEFAULT_bedKd 610.21 + // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. #endif // PIDTEMPBED @@ -1111,6 +1117,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h index 23ec2bd..b2545b6 100644 --- a/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/Cyclops/Configuration.h @@ -1104,6 +1104,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h index 690ffc9..52d9a53 100644 --- a/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h +++ b/Marlin/example_configurations/BIBO/TouchX/default/Configuration.h @@ -1104,6 +1104,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration.h b/Marlin/example_configurations/BQ/Hephestos/Configuration.h index d74e70b..1f3caa0 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration.h @@ -1092,6 +1092,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h index e4cf80e..b2f61b4 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h @@ -1102,6 +1102,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration.h b/Marlin/example_configurations/BQ/WITBOX/Configuration.h index d121193..fba88c8 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration.h @@ -1092,6 +1092,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index e2fd74b..41b7960 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -1103,6 +1103,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration.h b/Marlin/example_configurations/Creality/CR-10/Configuration.h index b147cf4..465bd2f 100644 --- a/Marlin/example_configurations/Creality/CR-10/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration.h @@ -1114,6 +1114,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Creality/CR-10S/Configuration.h b/Marlin/example_configurations/Creality/CR-10S/Configuration.h index b531717..f9d085e 100644 --- a/Marlin/example_configurations/Creality/CR-10S/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10S/Configuration.h @@ -1109,6 +1109,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h index c109fd1..c72fb4c 100644 --- a/Marlin/example_configurations/Creality/CR-10mini/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10mini/Configuration.h @@ -1123,6 +1123,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Creality/CR-8/Configuration.h b/Marlin/example_configurations/Creality/CR-8/Configuration.h index 3525a10..8b77bf9 100644 --- a/Marlin/example_configurations/Creality/CR-8/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-8/Configuration.h @@ -1114,6 +1114,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Creality/Ender-2/Configuration.h b/Marlin/example_configurations/Creality/Ender-2/Configuration.h index 1110e74..0df7230 100644 --- a/Marlin/example_configurations/Creality/Ender-2/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-2/Configuration.h @@ -1108,6 +1108,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Creality/Ender-3/Configuration.h b/Marlin/example_configurations/Creality/Ender-3/Configuration.h index 8b92239..6d1b866 100644 --- a/Marlin/example_configurations/Creality/Ender-3/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-3/Configuration.h @@ -876,8 +876,8 @@ // @section machine // The size of the print bed -#define X_BED_SIZE 220 -#define Y_BED_SIZE 220 +#define X_BED_SIZE 235 +#define Y_BED_SIZE 235 // Travel limits (mm) after homing, corresponding to endstop positions. #define X_MIN_POS 0 @@ -1108,6 +1108,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Creality/Ender-4/Configuration.h b/Marlin/example_configurations/Creality/Ender-4/Configuration.h index c525557..3986ec1 100644 --- a/Marlin/example_configurations/Creality/Ender-4/Configuration.h +++ b/Marlin/example_configurations/Creality/Ender-4/Configuration.h @@ -1114,6 +1114,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 6dd0658..392b91a 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -1086,6 +1086,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 4fc761a..2892aef 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -1086,6 +1086,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h index f09bd99..9cd60c2 100644 --- a/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h +++ b/Marlin/example_configurations/FolgerTech/i3-2020/Configuration.h @@ -1110,6 +1110,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h index 015129f..483c896 100644 --- a/Marlin/example_configurations/Geeetech/GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/GT2560/Configuration.h @@ -1119,6 +1119,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h index d997f76..5babfdc 100644 --- a/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h +++ b/Marlin/example_configurations/Geeetech/I3_Pro_X-GT2560/Configuration.h @@ -1104,6 +1104,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h index f838f85..585d962 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h @@ -1120,6 +1120,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h index 3d071ad..0964b64 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h @@ -1119,6 +1119,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h index e47a104..d6c7280 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro C/Configuration.h @@ -1104,6 +1104,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h index 111be83..97f92b5 100644 --- a/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h +++ b/Marlin/example_configurations/Geeetech/Prusa i3 Pro W/Configuration.h @@ -1104,6 +1104,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h index 68c434e..ced591b 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h @@ -1108,6 +1108,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/JGAurora/A5/Configuration.h b/Marlin/example_configurations/JGAurora/A5/Configuration.h index 3c152e1..c0e9059 100644 --- a/Marlin/example_configurations/JGAurora/A5/Configuration.h +++ b/Marlin/example_configurations/JGAurora/A5/Configuration.h @@ -1115,6 +1115,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Malyan/M150/Configuration.h b/Marlin/example_configurations/Malyan/M150/Configuration.h index cf8897b..f9c6525 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration.h @@ -1132,6 +1132,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h index b11a3dc..de5a68a 100644 --- a/Marlin/example_configurations/Micromake/C1/basic/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/basic/Configuration.h @@ -1108,6 +1108,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h index 86ca7f4..1eaf5ec 100644 --- a/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h +++ b/Marlin/example_configurations/Micromake/C1/enhanced/Configuration.h @@ -1108,6 +1108,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h index 6584098..b8b0366 100644 --- a/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h +++ b/Marlin/example_configurations/RepRapPro/Huxley/Configuration.h @@ -1153,6 +1153,7 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index 750e113..bba8a5f 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -1104,6 +1104,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index b41d1e0..c9fb34e 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -1102,6 +1102,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 9425e9a..99c910d 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -1117,6 +1117,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Sanguinololu/Configuration.h b/Marlin/example_configurations/Sanguinololu/Configuration.h index 1beddbc..a8f3953 100644 --- a/Marlin/example_configurations/Sanguinololu/Configuration.h +++ b/Marlin/example_configurations/Sanguinololu/Configuration.h @@ -1135,6 +1135,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index 5367c9f..d553b80 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -1163,6 +1163,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Tronxy/X1/Configuration.h b/Marlin/example_configurations/Tronxy/X1/Configuration.h index 2c2b314..c76e7ef 100644 --- a/Marlin/example_configurations/Tronxy/X1/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X1/Configuration.h @@ -1104,6 +1104,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Tronxy/X3A/Configuration.h b/Marlin/example_configurations/Tronxy/X3A/Configuration.h index 5aea54f..08b0d31 100644 --- a/Marlin/example_configurations/Tronxy/X3A/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X3A/Configuration.h @@ -1108,6 +1108,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Tronxy/X5S/Configuration.h b/Marlin/example_configurations/Tronxy/X5S/Configuration.h index e34a5ae..fbd5f03 100644 --- a/Marlin/example_configurations/Tronxy/X5S/Configuration.h +++ b/Marlin/example_configurations/Tronxy/X5S/Configuration.h @@ -1104,6 +1104,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Tronxy/XY100/Configuration.h b/Marlin/example_configurations/Tronxy/XY100/Configuration.h index 09d623d..d0115e3 100644 --- a/Marlin/example_configurations/Tronxy/XY100/Configuration.h +++ b/Marlin/example_configurations/Tronxy/XY100/Configuration.h @@ -1115,6 +1115,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration.h b/Marlin/example_configurations/Velleman/K8200/Configuration.h index 17c1282..0432d93 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration.h @@ -1134,6 +1134,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Configuration.h index e71916e..3739a11 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration.h @@ -1104,6 +1104,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h index f5fb4e7..0a5f986 100644 --- a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h @@ -1104,6 +1104,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h index 51f349e..7309560 100644 --- a/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h +++ b/Marlin/example_configurations/Wanhao/Duplicator 6/Configuration.h @@ -1114,6 +1114,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 50fa169..2d978ee 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -1104,6 +1104,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/delta/Anycubic/Kossel/Configuration.h b/Marlin/example_configurations/delta/Anycubic/Kossel/Configuration.h index 0681194..aa2eab4 100644 --- a/Marlin/example_configurations/delta/Anycubic/Kossel/Configuration.h +++ b/Marlin/example_configurations/delta/Anycubic/Kossel/Configuration.h @@ -1302,6 +1302,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/delta/Anycubic/Kossel/README.md b/Marlin/example_configurations/delta/Anycubic/Kossel/README.md index e5caf6d..874d71f 100644 --- a/Marlin/example_configurations/delta/Anycubic/Kossel/README.md +++ b/Marlin/example_configurations/delta/Anycubic/Kossel/README.md @@ -26,10 +26,10 @@ The Kossel comes in 3 versions: * Pulley * Linear * Linear Plus - + Pulley and Linear use the same configuration, the Linear Plus is bigger and uses slightly different configurations. - -Typically the probes for the Anycubic Delta Kossel printers come in two different versions. + +Typically the probes for the Anycubic Delta Kossel printers come in two different versions. * Version 1: Z Probe Offset of -19.0mm diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h index ae35dd5..82e04c3 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -1240,6 +1240,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h index 3004638..8212d99 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel/Configuration.h @@ -1239,6 +1239,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index eb268b6..de6eabe 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -1239,6 +1239,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h index 9dade8f..716f6c7 100644 --- a/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h +++ b/Marlin/example_configurations/delta/Hatchbox_Alpha/Configuration.h @@ -1242,6 +1242,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index cdd3e71..86b3d87 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -1227,6 +1227,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 6e29ccb..4b93eb3 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -1229,6 +1229,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index c9874d0..25f40ba 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -1230,6 +1230,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index e59459e..cb6f49f 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -1230,6 +1230,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h index 2590338..5c5c736 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h @@ -1118,6 +1118,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/hangprinter/Configuration.h b/Marlin/example_configurations/hangprinter/Configuration.h index 4e32029..fedebb2 100644 --- a/Marlin/example_configurations/hangprinter/Configuration.h +++ b/Marlin/example_configurations/hangprinter/Configuration.h @@ -1275,6 +1275,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index d845442..88e358a 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -1107,6 +1107,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 448b0c3..0a4e4f0 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -1099,6 +1099,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index 6a66cbc..f5a0bc6 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -1109,6 +1109,7 @@ #if ENABLED(LEVEL_BED_CORNERS) #define LEVEL_CORNERS_INSET 30 // (mm) An inset for corner leveling + #define LEVEL_CORNERS_Z_HOP 4.0 // (mm) Move nozzle up before moving between corners //#define LEVEL_CENTER_TOO // Move to the center after the last corner #endif diff --git a/Marlin/language_cz.h b/Marlin/language_cz.h index 950b58a..62ab3c6 100644 --- a/Marlin/language_cz.h +++ b/Marlin/language_cz.h @@ -41,11 +41,16 @@ #define MSG_SD_INSERTED _UxGT("Karta vlozena") #define MSG_SD_REMOVED _UxGT("Karta vyjmuta") #define MSG_LCD_ENDSTOPS _UxGT("Endstopy") // max 8 znaku +#define MSG_LCD_SOFT_ENDSTOPS _UxGT("Soft Endstopy") #define MSG_MAIN _UxGT("Hlavni nabidka") #define MSG_AUTOSTART _UxGT("Autostart") #define MSG_DISABLE_STEPPERS _UxGT("Uvolnit motory") #define MSG_DEBUG_MENU _UxGT("Nabidka ladeni") -#define MSG_PROGRESS_BAR_TEST _UxGT("Test uk.prubehu") +#if LCD_WIDTH >= 20 + #define MSG_PROGRESS_BAR_TEST _UxGT("Test ukaz. prubehu") +#else + #define MSG_PROGRESS_BAR_TEST _UxGT("Test uk. prubehu") +#endif #define MSG_AUTO_HOME _UxGT("Domovska pozice") #define MSG_AUTO_HOME_X _UxGT("Domu osa X") #define MSG_AUTO_HOME_Y _UxGT("Domu osa Y") @@ -91,7 +96,7 @@ #define MSG_UBL_BC_INSERT _UxGT("Vlozte kartu, zmerte") #define MSG_UBL_BC_INSERT2 _UxGT("Zmerte") #define MSG_UBL_BC_REMOVE _UxGT("Odstrante a zmerte") -#define MSG_UBL_MOVING_TO_NEXT _UxGT("Presoun na dalsi") +#define MSG_UBL_MOVING_TO_NEXT _UxGT("Presun na dalsi") #define MSG_UBL_ACTIVATE_MESH _UxGT("Aktivovat UBL") #define MSG_UBL_DEACTIVATE_MESH _UxGT("Deaktivovat UBL") #define MSG_UBL_SET_BED_TEMP _UxGT("Teplota podlozky") @@ -125,7 +130,7 @@ #define MSG_UBL_OUTPUT_MAP_CSV _UxGT("Exportovat do CSV") #define MSG_UBL_OUTPUT_MAP_BACKUP _UxGT("Zaloha do PC") #define MSG_UBL_INFO_UBL _UxGT("Info o UBL do PC") -#define MSG_UBL_EDIT_MESH_MENU _UxGT("Upravit sit dobu") +#define MSG_UBL_EDIT_MESH_MENU _UxGT("Upravit sit bodu") #define MSG_UBL_FILLIN_AMOUNT _UxGT("Hustota mrizky") #define MSG_UBL_MANUAL_FILLIN _UxGT("Rucni hustota") #define MSG_UBL_SMART_FILLIN _UxGT("Chytra hustota") @@ -139,14 +144,14 @@ #define MSG_UBL_LOAD_MESH _UxGT("Nacist sit bodu") #define MSG_UBL_SAVE_MESH _UxGT("Ulozit sit bodu") #define MSG_MESH_LOADED _UxGT("Sit %i nactena") -#define MSG_NO_STORAGE _UxGT("Nedostatek mista") #define MSG_MESH_SAVED _UxGT("Sit %i ulozena") -#define MSG_UBL_SAVE_ERROR _UxGT("Err: Ulozit UBL") -#define MSG_UBL_RESTORE_ERROR _UxGT("Err: Obnovit UBL") +#define MSG_NO_STORAGE _UxGT("Nedostatek mista") +#define MSG_UBL_SAVE_ERROR _UxGT("Ch.: Ulozit UBL") +#define MSG_UBL_RESTORE_ERROR _UxGT("Ch.: Obnovit UBL") #define MSG_UBL_Z_OFFSET_STOPPED _UxGT("Konec Z-Offsetu") #define MSG_UBL_STEP_BY_STEP_MENU _UxGT("UBL Postupne") -#define MSG_LED_CONTROL _UxGT("LED Nastaveni") +#define MSG_LED_CONTROL _UxGT("Nastaveni LED") #define MSG_LEDS _UxGT("Svetla") #define MSG_LED_PRESETS _UxGT("Svetla Predvolby") #define MSG_SET_LEDS_RED _UxGT("Cervena") @@ -206,6 +211,7 @@ #define MSG_VC_JERK _UxGT("Vz-jerk") #endif #define MSG_VE_JERK _UxGT("Ve-jerk") +#define MSG_JUNCTION_DEVIATION _UxGT("Odchylka spoje") #define MSG_VELOCITY _UxGT("Rychlost") #define MSG_VMAX _UxGT("Vmax ") #define MSG_VMIN _UxGT("Vmin") @@ -250,11 +256,13 @@ #define MSG_PAUSE_PRINT _UxGT("Pozastavit tisk") #define MSG_RESUME_PRINT _UxGT("Obnovit tisk") #define MSG_STOP_PRINT _UxGT("Zastavit tisk") +#define MSG_POWER_LOSS_RECOVERY _UxGT("Obnova vypadku") #define MSG_CARD_MENU _UxGT("Tisknout z SD") #define MSG_NO_CARD _UxGT("Zadna SD karta") #define MSG_DWELL _UxGT("Uspano...") #define MSG_USERWAIT _UxGT("Cekani na uziv...") #define MSG_PRINT_PAUSED _UxGT("Tisk pozastaven") +#define MSG_PRINTING _UxGT("Tisknu...") #define MSG_PRINT_ABORTED _UxGT("Tisk zrusen") #define MSG_NO_MOVE _UxGT("Zadny pohyb.") #define MSG_KILLED _UxGT("PRERUSENO. ") @@ -290,8 +298,10 @@ #define MSG_BABYSTEP_Z _UxGT("Babystep Z") #define MSG_ENDSTOP_ABORT _UxGT("Endstop abort") #define MSG_HEATING_FAILED_LCD _UxGT("Chyba zahrivani") +#define MSG_HEATING_FAILED_LCD_BED _UxGT("Chyba zahr.podl.") #define MSG_ERR_REDUNDANT_TEMP _UxGT("REDUND. TEPLOTA") -#define MSG_THERMAL_RUNAWAY _UxGT("TEPLOTNI SKOK") +#define MSG_THERMAL_RUNAWAY _UxGT("TEPLOTNI UNIK") +#define MSG_THERMAL_RUNAWAY_BED _UxGT("TEPL. UNIK PODL.") #define MSG_ERR_MAXTEMP _UxGT("VYSOKA TEPLOTA") #define MSG_ERR_MINTEMP _UxGT("NIZKA TEPLOTA") #define MSG_ERR_MAXTEMP_BED _UxGT("VYS. TEPL. PODL.") @@ -303,7 +313,17 @@ #define MSG_SHORT_HOUR _UxGT("h") #define MSG_SHORT_MINUTE _UxGT("m") #define MSG_HEATING _UxGT("Zahrivani...") -#define MSG_BED_HEATING _UxGT("Zahrivani podl...") +#define MSG_COOLING _UxGT("Chlazeni...") +#if LCD_WIDTH >= 20 + #define MSG_BED_HEATING _UxGT("Zahrivani podlozky") +#else + #define MSG_BED_HEATING _UxGT("Zahrivani podl.") +#endif +#if LCD_WIDTH >= 20 + #define MSG_BED_COOLING _UxGT("Chlazeni podlozky") +#else + #define MSG_BED_COOLING _UxGT("Chlazeni podl.") +#endif #define MSG_DELTA_CALIBRATE _UxGT("Delta Kalibrace") #define MSG_DELTA_CALIBRATE_X _UxGT("Kalibrovat X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibrovat Y") @@ -312,6 +332,7 @@ #define MSG_DELTA_SETTINGS _UxGT("Delta nastaveni") #define MSG_DELTA_AUTO_CALIBRATE _UxGT("Autokalibrace") #define MSG_DELTA_HEIGHT_CALIBRATE _UxGT("Nast.vysku delty") +#define MSG_DELTA_Z_OFFSET_CALIBRATE _UxGT("Nast. Z-ofset") #define MSG_DELTA_DIAG_ROD _UxGT("Diag rameno") #define MSG_DELTA_HEIGHT _UxGT("Vyska") #define MSG_DELTA_RADIUS _UxGT("Polomer") @@ -364,36 +385,36 @@ #if LCD_HEIGHT >= 4 // Up to 3 lines allowed - #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Cekejte prosim") - #define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("na zahajeni") - #define MSG_FILAMENT_CHANGE_INIT_3 _UxGT("vymeny filamentu") - #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Cekejte prosim") - #define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("na vysunuti") - #define MSG_FILAMENT_CHANGE_UNLOAD_3 _UxGT("filamentu") - #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Vlozte filament") - #define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("a stisknete") - #define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("tlacitko...") - #define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Kliknete pro") - #define MSG_FILAMENT_CHANGE_HEAT_2 _UxGT("nahrati trysky") - #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Cekejte prosim") - #define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("na nahrati tr.") - #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Cekejte prosim") - #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("na zavedeni") - #define MSG_FILAMENT_CHANGE_LOAD_3 _UxGT("filamentu") - #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Vyckejte na") - #define MSG_FILAMENT_CHANGE_PURGE_2 _UxGT("vytlaceni") - #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Cekejte prosim") - #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("na pokracovani") - #define MSG_FILAMENT_CHANGE_RESUME_3 _UxGT("tisku") + #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Cekejte prosim") + #define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("na zahajeni") + #define MSG_FILAMENT_CHANGE_INIT_3 _UxGT("vymeny filamentu") + #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Cekejte prosim") + #define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("na vysunuti") + #define MSG_FILAMENT_CHANGE_UNLOAD_3 _UxGT("filamentu") + #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Vlozte filament") + #define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("a stisknete") + #define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("tlacitko...") + #define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Kliknete pro") + #define MSG_FILAMENT_CHANGE_HEAT_2 _UxGT("nahrati trysky") + #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Cekejte prosim") + #define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("na nahrati tr.") + #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Cekejte prosim") + #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("na zavedeni") + #define MSG_FILAMENT_CHANGE_LOAD_3 _UxGT("filamentu") + #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Vyckejte na") + #define MSG_FILAMENT_CHANGE_PURGE_2 _UxGT("vytlaceni") + #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Cekejte prosim") + #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("na pokracovani") + #define MSG_FILAMENT_CHANGE_RESUME_3 _UxGT("tisku") #else // LCD_HEIGHT < 4 // Up to 2 lines allowed - #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Cekejte...") - #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Vysouvani...") - #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Vlozte, kliknete") - #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Nahrivani...") - #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Zavadeni...") - #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Vytlacovani...") - #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Pokracovani...") + #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Cekejte...") + #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Vysouvani...") + #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Vlozte, kliknete") + #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Nahrivani...") + #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Zavadeni...") + #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Vytlacovani...") + #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Pokracovani...") #endif // LCD_HEIGHT < 4 #endif // LANGUAGE_CZ_H diff --git a/Marlin/language_cz_utf8.h b/Marlin/language_cz_utf8.h index e76c947..e40a50a 100644 --- a/Marlin/language_cz_utf8.h +++ b/Marlin/language_cz_utf8.h @@ -49,7 +49,11 @@ #define MSG_AUTOSTART _UxGT("Autostart") #define MSG_DISABLE_STEPPERS _UxGT("Uvolnit motory") #define MSG_DEBUG_MENU _UxGT("Nabídka ladění") -#define MSG_PROGRESS_BAR_TEST _UxGT("Test uk. průběhu") +#if LCD_WIDTH >= 20 + #define MSG_PROGRESS_BAR_TEST _UxGT("Test ukaz. průběhu") +#else + #define MSG_PROGRESS_BAR_TEST _UxGT("Test uk. průběhu") +#endif #define MSG_AUTO_HOME _UxGT("Domovská pozice") #define MSG_AUTO_HOME_X _UxGT("Domů osa X") #define MSG_AUTO_HOME_Y _UxGT("Domů osa Y") @@ -108,8 +112,8 @@ #define MSG_UBL_DONE_EDITING_MESH _UxGT("Konec úprav sítě") #define MSG_UBL_BUILD_CUSTOM_MESH _UxGT("Vlastní síť") #define MSG_UBL_BUILD_MESH_MENU _UxGT("Vytvořit síť") -#define MSG_UBL_BUILD_PLA_MESH _UxGT("Síť bodu PLA") -#define MSG_UBL_BUILD_ABS_MESH _UxGT("Síť bodu ABS") +#define MSG_UBL_BUILD_PLA_MESH _UxGT("Síť bodů PLA") +#define MSG_UBL_BUILD_ABS_MESH _UxGT("Síť bodů ABS") #define MSG_UBL_BUILD_COLD_MESH _UxGT("Studená síť bodů") #define MSG_UBL_MESH_HEIGHT_ADJUST _UxGT("Upravit výšku sítě") #define MSG_UBL_MESH_HEIGHT_AMOUNT _UxGT("Výška") @@ -119,8 +123,8 @@ #define MSG_UBL_VALIDATE_CUSTOM_MESH _UxGT("Kontrola vlast. sítě") #define MSG_UBL_CONTINUE_MESH _UxGT("Pokračovat v síťi") #define MSG_UBL_MESH_LEVELING _UxGT("Síťové rovnání") -#define MSG_UBL_3POINT_MESH_LEVELING _UxGT("3-bodove rovnání") -#define MSG_UBL_GRID_MESH_LEVELING _UxGT("Mrizkove rovnání") +#define MSG_UBL_3POINT_MESH_LEVELING _UxGT("3-bodové rovnání") +#define MSG_UBL_GRID_MESH_LEVELING _UxGT("Mřížkové rovnání") #define MSG_UBL_MESH_LEVEL _UxGT("Srovnat podložku") #define MSG_UBL_SIDE_POINTS _UxGT("Postranní body") #define MSG_UBL_MAP_TYPE _UxGT("Typ sítě bodu") @@ -145,12 +149,12 @@ #define MSG_MESH_LOADED _UxGT("Síť %i načtena") #define MSG_MESH_SAVED _UxGT("Síť %i uložena") #define MSG_NO_STORAGE _UxGT("Nedostatek místa") -#define MSG_UBL_SAVE_ERROR _UxGT("Err: Uložit UBL") -#define MSG_UBL_RESTORE_ERROR _UxGT("Err: Obnovit UBL") +#define MSG_UBL_SAVE_ERROR _UxGT("Ch.: Uložit UBL") +#define MSG_UBL_RESTORE_ERROR _UxGT("Ch.: Obnovit UBL") #define MSG_UBL_Z_OFFSET_STOPPED _UxGT("Konec Z-Offsetu") #define MSG_UBL_STEP_BY_STEP_MENU _UxGT("UBL Postupně") -#define MSG_LED_CONTROL _UxGT("LED Nastavení") +#define MSG_LED_CONTROL _UxGT("Nastavení LED") #define MSG_LEDS _UxGT("Světla") #define MSG_LED_PRESETS _UxGT("Světla Předvolby") #define MSG_SET_LEDS_RED _UxGT("Červená") @@ -170,7 +174,7 @@ #define MSG_LED_BRIGHTNESS _UxGT("Jas") #define MSG_USER_MENU _UxGT("Vlastní příkazy") -#define MSG_MOVING _UxGT("Posouvani...") +#define MSG_MOVING _UxGT("Posouvání...") #define MSG_FREE_XY _UxGT("Uvolnit XY") #define MSG_MOVE_X _UxGT("Posunout X") #define MSG_MOVE_Y _UxGT("Posunout Y") @@ -210,6 +214,7 @@ #define MSG_VC_JERK _UxGT("Vz-jerk") #endif #define MSG_VE_JERK _UxGT("Ve-jerk") +#define MSG_JUNCTION_DEVIATION _UxGT("Odchylka spoje") #define MSG_VELOCITY _UxGT("Rychlost") #define MSG_VMAX _UxGT("Vmax ") #define MSG_VMIN _UxGT("Vmin") @@ -254,7 +259,7 @@ #define MSG_PAUSE_PRINT _UxGT("Pozastavit tisk") #define MSG_RESUME_PRINT _UxGT("Obnovit tisk") #define MSG_STOP_PRINT _UxGT("Zastavit tisk") -#define MSG_POWER_LOSS_RECOVERY _UxGT("Obnova vypadku") +#define MSG_POWER_LOSS_RECOVERY _UxGT("Obnova výpadku") #define MSG_CARD_MENU _UxGT("Tisknout z SD") #define MSG_NO_CARD _UxGT("Žádná SD karta") #define MSG_DWELL _UxGT("Uspáno...") @@ -296,10 +301,10 @@ #define MSG_BABYSTEP_Z _UxGT("Babystep Z") #define MSG_ENDSTOP_ABORT _UxGT("Endstop abort") #define MSG_HEATING_FAILED_LCD _UxGT("Chyba zahřívání") -#define MSG_HEATING_FAILED_LCD_BED _UxGT("Chyba zahř. podl.") +#define MSG_HEATING_FAILED_LCD_BED _UxGT("Chyba zahř.podl.") #define MSG_ERR_REDUNDANT_TEMP _UxGT("REDUND. TEPLOTA") -#define MSG_THERMAL_RUNAWAY _UxGT("TEPLOTNÍ SKOK") -#define MSG_THERMAL_RUNAWAY_BED _UxGT("PODL. TEPL. SKOK") +#define MSG_THERMAL_RUNAWAY _UxGT("TEPLOTNÍ ÚNIK") +#define MSG_THERMAL_RUNAWAY_BED _UxGT("TEPL. ÚNIK PODL.") #define MSG_ERR_MAXTEMP _UxGT("VYSOKÁ TEPLOTA") #define MSG_ERR_MINTEMP _UxGT("NÍZKA TEPLOTA") #define MSG_ERR_MAXTEMP_BED _UxGT("VYS. TEPL. PODL.") @@ -311,9 +316,17 @@ #define MSG_SHORT_HOUR _UxGT("h") #define MSG_SHORT_MINUTE _UxGT("m") #define MSG_HEATING _UxGT("Zahřívání...") -#define MSG_COOLING _UxGT("Chlazení") -#define MSG_BED_HEATING _UxGT("Zahřívání podl...") -#define MSG_BED_COOLING _UxGT("Chlazení podl...") +#define MSG_COOLING _UxGT("Chlazení...") +#if LCD_WIDTH >= 20 + #define MSG_BED_HEATING _UxGT("Zahřívání podložky") +#else + #define MSG_BED_HEATING _UxGT("Zahřívání podl.") +#endif +#if LCD_WIDTH >= 20 + #define MSG_BED_COOLING _UxGT("Chlazení podložky") +#else + #define MSG_BED_COOLING _UxGT("Chlazení podl.") +#endif #define MSG_DELTA_CALIBRATE _UxGT("Delta Kalibrace") #define MSG_DELTA_CALIBRATE_X _UxGT("Kalibrovat X") #define MSG_DELTA_CALIBRATE_Y _UxGT("Kalibrovat Y") @@ -375,36 +388,36 @@ #if LCD_HEIGHT >= 4 // Up to 3 lines allowed - #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Čekejte prosím") - #define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("na zahájení") - #define MSG_FILAMENT_CHANGE_INIT_3 _UxGT("výměny filamentu") - #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Čekejte prosím") - #define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("na vysunuti") - #define MSG_FILAMENT_CHANGE_UNLOAD_3 _UxGT("filamentu") - #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Vložte filament") - #define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("a stiskněte") - #define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("tlačítko...") - #define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Klikněte pro") - #define MSG_FILAMENT_CHANGE_HEAT_2 _UxGT("nahřátí trysky") - #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Čekejte prosím") - #define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("na nahřátí tr.") - #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Čekejte prosím") - #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("na zavedení") - #define MSG_FILAMENT_CHANGE_LOAD_3 _UxGT("filamentu") - #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Vyčkejte na") - #define MSG_FILAMENT_CHANGE_PURGE_2 _UxGT("vytlačení") - #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Čekejte prosím") - #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("na pokračování") - #define MSG_FILAMENT_CHANGE_RESUME_3 _UxGT("tisku") + #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Čekejte prosím") + #define MSG_FILAMENT_CHANGE_INIT_2 _UxGT("na zahájení") + #define MSG_FILAMENT_CHANGE_INIT_3 _UxGT("výměny filamentu") + #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Čekejte prosím") + #define MSG_FILAMENT_CHANGE_UNLOAD_2 _UxGT("na vysunuti") + #define MSG_FILAMENT_CHANGE_UNLOAD_3 _UxGT("filamentu") + #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Vložte filament") + #define MSG_FILAMENT_CHANGE_INSERT_2 _UxGT("a stiskněte") + #define MSG_FILAMENT_CHANGE_INSERT_3 _UxGT("tlačítko...") + #define MSG_FILAMENT_CHANGE_HEAT_1 _UxGT("Klikněte pro") + #define MSG_FILAMENT_CHANGE_HEAT_2 _UxGT("nahřátí trysky") + #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Čekejte prosím") + #define MSG_FILAMENT_CHANGE_HEATING_2 _UxGT("na nahřátí tr.") + #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Čekejte prosím") + #define MSG_FILAMENT_CHANGE_LOAD_2 _UxGT("na zavedení") + #define MSG_FILAMENT_CHANGE_LOAD_3 _UxGT("filamentu") + #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Vyčkejte na") + #define MSG_FILAMENT_CHANGE_PURGE_2 _UxGT("vytlačení") + #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Čekejte prosím") + #define MSG_FILAMENT_CHANGE_RESUME_2 _UxGT("na pokračování") + #define MSG_FILAMENT_CHANGE_RESUME_3 _UxGT("tisku") #else // LCD_HEIGHT < 4 // Up to 2 lines allowed - #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Čekejte...") - #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Vysouvání...") - #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Vložte, klikněte") - #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Nahřívání...") - #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Zavádění...") - #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Vytlačování...") - #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Pokračování...") + #define MSG_FILAMENT_CHANGE_INIT_1 _UxGT("Čekejte...") + #define MSG_FILAMENT_CHANGE_UNLOAD_1 _UxGT("Vysouvání...") + #define MSG_FILAMENT_CHANGE_INSERT_1 _UxGT("Vložte, klikněte") + #define MSG_FILAMENT_CHANGE_HEATING_1 _UxGT("Nahřívání...") + #define MSG_FILAMENT_CHANGE_LOAD_1 _UxGT("Zavádění...") + #define MSG_FILAMENT_CHANGE_PURGE_1 _UxGT("Vytlačování...") + #define MSG_FILAMENT_CHANGE_RESUME_1 _UxGT("Pokračování...") #endif // LCD_HEIGHT < 4 #endif // LANGUAGE_CZ_UTF_H diff --git a/Marlin/power_loss_recovery.cpp b/Marlin/power_loss_recovery.cpp index fef41f3..c75481a 100644 --- a/Marlin/power_loss_recovery.cpp +++ b/Marlin/power_loss_recovery.cpp @@ -276,7 +276,7 @@ void save_job_recovery_info() { // If power-loss pin was triggered, write just once then kill #if PIN_EXISTS(POWER_LOSS) - if (READ(POWER_LOSS_PIN) == POWER_LOSS_STATE) kill(MSG_POWER_LOSS_RECOVERY); + if (READ(POWER_LOSS_PIN) == POWER_LOSS_STATE) kill(PSTR(MSG_POWER_LOSS_RECOVERY)); #endif } } diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 665e5b5..554ee00 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -308,6 +308,11 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS]; return; } + if (target > GHV(BED_MAXTEMP, maxttemp[hotend]) - 15) { + SERIAL_ECHOLNPGM(MSG_PID_TEMP_TOO_HIGH); + return; + } + SERIAL_ECHOLNPGM(MSG_PID_AUTOTUNE_START); disable_all_heaters(); // switch off all heaters. diff --git a/Marlin/temperature.h b/Marlin/temperature.h index cc6df0b..7eba6e6 100644 --- a/Marlin/temperature.h +++ b/Marlin/temperature.h @@ -414,7 +414,7 @@ class Temperature { #if ENABLED(AUTO_POWER_CONTROL) powerManager.power_on(); #endif - target_temperature[HOTEND_INDEX] = celsius; + target_temperature[HOTEND_INDEX] = MIN(celsius, maxttemp[HOTEND_INDEX] - 15); #if WATCH_HOTENDS start_watching_heater(HOTEND_INDEX); #endif @@ -449,7 +449,7 @@ class Temperature { #endif target_temperature_bed = #ifdef BED_MAXTEMP - MIN(celsius, BED_MAXTEMP) + MIN(celsius, BED_MAXTEMP - 15) #else celsius #endif diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 5f5ceb7..f67de54 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -1824,12 +1824,18 @@ void lcd_quick_feedback(const bool clear_buttons) { #if ENABLED(LEVEL_BED_CORNERS) + #ifndef LEVEL_CORNERS_Z_HOP + #define LEVEL_CORNERS_Z_HOP 4.0 + #endif + + static_assert(LEVEL_CORNERS_Z_HOP >= 0, "LEVEL_CORNERS_Z_HOP must be >= 0. Please update your configuration."); + /** * Level corners, starting in the front-left corner. */ static int8_t bed_corner; void _lcd_goto_next_corner() { - line_to_z(4.0); + line_to_z(LEVEL_CORNERS_Z_HOP); switch (bed_corner) { case 0: current_position[X_AXIS] = X_MIN_BED + LEVEL_CORNERS_INSET; @@ -2885,8 +2891,6 @@ void lcd_quick_feedback(const bool clear_buttons) { MENU_BACK(MSG_MAIN); #if ENABLED(DELTA_AUTO_CALIBRATION) MENU_ITEM(gcode, MSG_DELTA_AUTO_CALIBRATE, PSTR("G33")); - MENU_ITEM(gcode, MSG_DELTA_HEIGHT_CALIBRATE, PSTR("G33 P1")); - MENU_ITEM(gcode, MSG_DELTA_Z_OFFSET_CALIBRATE, PSTR("G33 P-1")); #if ENABLED(EEPROM_SETTINGS) MENU_ITEM(function, MSG_STORE_EEPROM, lcd_store_settings); MENU_ITEM(function, MSG_LOAD_EEPROM, lcd_load_settings); diff --git a/README.md b/README.md index 4d55ddc..f2dcea7 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Note: This is just a firmware, not magic. A big part of print quality still depe - Special characters on any file or folders name on the SD card will cause the file menu to freeze. Simply replace or remove every special character (Chinese, Arabic, Russian, accents, German & Scandinavian umlauts, ...) from the name. Symbols like dashes or underscores are no problem. **Important note: On the SD card that comes with the printer there is a folder with Chinese characters in it by default. Please rename or remove it.** -- The firmware is not reflected on the TFT-display. As the display has its own closed source firmware, you will remain to see the original Anycubic menu showing the old version number (1.1.0). +- The firmware is not reflected on the TFT-display. As the display has its own closed source firmware, you will remain to see the original Anycubic menu showing the old version number (1.1.0). - Cancelling prints via display is buggy sometimes, simply reboot the printer when the menu shows an error. Protip: Switch to OctoPrint. - A few parts cooling fan models (e.g. some Sunon 5015) might have trouble running slower than 100%. If that's the case, use [this release](https://github.com/davidramiro/Marlin-AI3M/releases/tag/v19.01.22-pwm). @@ -25,7 +25,7 @@ While the i3 Mega is a great printer for its price and produces fantastic result - Much more efficient bed heating by using PID control. This uses less power and holds the temperature at a steady level. Highly recommended for printing ABS. - Fairly loud fans, while almost every one of them is easily replaced, the stock FW only gives out 9V instead of 12V on the parts cooling fan so some fans like Noctua don't run like they should. This is fixed in this firmware. - Even better print quality by adding Linear Advance, S-Curve Acceleration and some tweaks on jerk and acceleration. -- Thermal runaway protection: Reducing fire risk by detecting a faulty or misaligned thermistor. +- Thermal runaway protection: Reducing fire risk by detecting a faulty or misaligned thermistor. - Very loud stock stepper motor drivers, easily replaced by Watterott or FYSETC TMC2208. To do that, you'd usually have to flip the connectors on the board, this is not necessary using this firmware. - No need to slice and upload custom bed leveling tests, simply start one with a simple G26 command. - Easily start an auto PID tune or mesh bed leveling via the special menu (insert SD card, select special menu and press the round arrow) @@ -52,10 +52,10 @@ I provided three different precompiled hex files: One for no modifications on th - Customize if needed and under `Sketch`, select `Export compiled binary` - Look for the .hex file in your temporary directory, e.g. `.../AppData/Local/Temp/arduino_build_xxx/` (only the `Marlin.ino.hex`, not the `Marlin.ino.with_bootloader.hex`!) -### After obtaining the hex file: +### After obtaining the hex file: - Flash the hex with Cura, OctoPrint or similar -- Use a tool with a terminal (OctoPrint, Pronterface, Repetier Host, ...) to send commands to your printer. +- Use a tool with a terminal (OctoPrint, Pronterface, Repetier Host, ...) to send commands to your printer. - Connect to the printer and send the following commands: - `M502` - load hard coded default values - `M500` - save them to EEPROM @@ -71,7 +71,7 @@ If you have issues with an uneven bed, this is a great feature. ![Special Menu][menu] -- In this menu, the round arrow is used to execute the command you selected. +- In this menu, the round arrow is used to execute the command you selected. - Preheat the bed to 60°C with this entry: (if you usually print with a hotter bed, use the Anycubic menu) ![Preheat bed][preheat] @@ -292,4 +292,3 @@ Notable contributors include: ## License Marlin is published under the [GPLv3 license](https://github.com/MarlinFirmware/Marlin/blob/1.0.x/COPYING.md) because we believe in open development. The GPL comes with both rights and obligations. Whether you use Marlin firmware as the driver for your open or closed-source product, you must keep Marlin open, and you must provide your compatible Marlin source code to end users upon request. The most straightforward way to comply with the Marlin license is to make a fork of Marlin on Github, perform your modifications, and direct users to your modified fork. - diff --git a/buildroot/share/atom/auto_build.py b/buildroot/share/atom/auto_build.py index 0934455..d9f5111 100644 --- a/buildroot/share/atom/auto_build.py +++ b/buildroot/share/atom/auto_build.py @@ -1337,9 +1337,9 @@ class output_window(Text): self.insert('end', 'Unable to move board definition file to destination. User must manually copy the file.\n\n', 'error') self.insert('end', 'Please copy the following file and re-run the script:\n', 'normal') self.insert('end', ' FROM:\n') - self.insert('end', ' ' + pwd + '/' + board_path + '/at90USB1286.json\n') + self.insert('end', ' ' + pwd + '/' + board_path + '/at90usb1286.json\n') self.insert('end', ' TO:\n') - self.insert('end', ' ' + PIO_path + '/at90USB1286.json\n') + self.insert('end', ' ' + PIO_path + '/at90usb1286.json\n') @@ -1405,7 +1405,7 @@ class output_window(Text): except: self.report_failure(PIO_path, board_path) return False - if 'at90USB1286.json' in boards_dir: + if 'at90usb1286.json' in boards_dir: return True # it's there so all is well self.report_failure(PIO_path, board_path) return False From c5cc8b21718ba494b82ee5b7418709c01f70ac4a Mon Sep 17 00:00:00 2001 From: David Ramiro Date: Wed, 30 Jan 2019 17:40:07 +0100 Subject: [PATCH 4/5] Disabling S-Curve-Acceleration Trying to mitigate Y axis layer shifts on certain machines --- Marlin/Configuration.h | 23 +++++++++++++---------- Marlin/Configuration_adv.h | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 7444dea..2bd035d 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -556,6 +556,9 @@ * TMC5130, TMC5130_STANDALONE * :['A4988', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE'] */ + +// set to A4988 for stock drivers + #define X_DRIVER_TYPE TMC2208_STANDALONE #define Y_DRIVER_TYPE TMC2208_STANDALONE #define Z_DRIVER_TYPE TMC2208_STANDALONE @@ -629,7 +632,7 @@ * Override with M201 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_MAX_ACCELERATION { 3000, 2000, 60, 10000 } +#define DEFAULT_MAX_ACCELERATION { 3000, 1500, 60, 10000 } /** * Default Acceleration (change/s) change = mm/s @@ -639,7 +642,7 @@ * M204 R Retract Acceleration * M204 T Travel Acceleration */ -#define DEFAULT_ACCELERATION 1200 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_ACCELERATION 1500 // X, Y, Z and E acceleration for printing moves #define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts #define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves @@ -651,8 +654,8 @@ * When changing speed and direction, if the difference is less than the * value set here, it may happen instantaneously. */ -#define DEFAULT_XJERK 8.0 -#define DEFAULT_YJERK 8.0 +#define DEFAULT_XJERK 9.0 +#define DEFAULT_YJERK 9.0 #define DEFAULT_ZJERK 0.4 #define DEFAULT_EJERK 5.0 @@ -664,7 +667,7 @@ * * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained */ -#define S_CURVE_ACCELERATION +//#define S_CURVE_ACCELERATION //=========================================================================== //============================= Z Probe Options ============================= @@ -854,15 +857,15 @@ // @section machine // Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. -#define INVERT_X_DIR false -#define INVERT_Y_DIR true -#define INVERT_Z_DIR true +#define INVERT_X_DIR false // set to true for stock drivers or TMC2208 with reversed connectors +#define INVERT_Y_DIR true // set to false for stock drivers or TMC2208 with reversed connectors +#define INVERT_Z_DIR true // set to false for stock drivers or TMC2208 with reversed connectors // @section extruder // For direct drive extruder v9 set to true, for geared extruder set to false. -#define INVERT_E0_DIR true -#define INVERT_E1_DIR true +#define INVERT_E0_DIR true // set to false for stock drivers or TMC2208 with reversed connectors +#define INVERT_E1_DIR true // set to false for stock drivers or TMC2208 with reversed connectors #define INVERT_E2_DIR false #define INVERT_E3_DIR false #define INVERT_E4_DIR false diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index e454fdc..ad134b5 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -804,7 +804,7 @@ #endif // Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -#define BEZIER_CURVE_SUPPORT +//#define BEZIER_CURVE_SUPPORT // G38.2 and G38.3 Probe Target // Set MULTIPLE_PROBING if you want G38 to double touch From a40267c4a0d4b46ee4a6206c8a45e4d145d9f880 Mon Sep 17 00:00:00 2001 From: David Ramiro Date: Sat, 2 Feb 2019 20:20:30 +0100 Subject: [PATCH 5/5] Change acceleration --- Marlin/Configuration.h | 8 ++++---- Marlin/Version.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 2bd035d..4d259f4 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -632,7 +632,7 @@ * Override with M201 * X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]] */ -#define DEFAULT_MAX_ACCELERATION { 3000, 1500, 60, 10000 } +#define DEFAULT_MAX_ACCELERATION { 3000, 1200, 60, 10000 } /** * Default Acceleration (change/s) change = mm/s @@ -642,9 +642,9 @@ * M204 R Retract Acceleration * M204 T Travel Acceleration */ -#define DEFAULT_ACCELERATION 1500 // X, Y, Z and E acceleration for printing moves +#define DEFAULT_ACCELERATION 1200 // X, Y, Z and E acceleration for printing moves #define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration for retracts -#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration for travel (non printing) moves +#define DEFAULT_TRAVEL_ACCELERATION 1500 // X, Y, Z acceleration for travel (non printing) moves /** * Default Jerk (mm/s) @@ -667,7 +667,7 @@ * * See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained */ -//#define S_CURVE_ACCELERATION +#define S_CURVE_ACCELERATION //=========================================================================== //============================= Z Probe Options ============================= diff --git a/Marlin/Version.h b/Marlin/Version.h index 06655e5..04f8117 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -1,4 +1,4 @@ -/** +/** * Marlin 3D Printer Firmware * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * @@ -48,7 +48,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ - #define STRING_DISTRIBUTION_DATE "2019-01-22" + #define STRING_DISTRIBUTION_DATE "2019-02-02" /** * Required minimum Configuration.h and Configuration_adv.h file versions.