Merge commit '79c5924e28dcc43299b23e37e4c29c0d09596e98' into new-tft-support
* commit '79c5924e28dcc43299b23e37e4c29c0d09596e98': Update README.md Use PROGMEM for TFT string handling Update README.md Small hardware serial protocol bugfix, which causes crashes inside the tft firmware Update README.md to add the slowdown feature. Update Codebase to Marlin 2.0.5.4 Update README.md Update README.md to add buymeacoffee link Update README.md with new pictures Remove unused mes menu item. Fix BLTouch menu entry Switch to prerelease Bump version to 1.0.7 for next release. Add BLTouch special menu item. Update README.md to add BLTouch feature. Add BLTouch Support (can be enabled with #define KNUTWURST_BLTOUCH) - Rework of Touchscreen serial protocol handling - Disable Endstop Beep - Bugfix when stopping sd print while heating leads to a endless printing loop - Bump version to 1.0.6 for next release # Conflicts: # Marlin/Configuration.h # Marlin/src/lcd/anycubic_touchscreen.cpp # Marlin/src/lcd/anycubic_touchscreen.h
This commit is contained in:
@@ -347,14 +347,14 @@ struct XYZval {
|
||||
FI XYZval<T> operator* (const XYZEval<T> &rs) { XYZval<T> ls = *this; ls.x *= rs.x; ls.y *= rs.y; ls.z *= rs.z; return ls; }
|
||||
FI XYZval<T> operator/ (const XYZEval<T> &rs) const { XYZval<T> ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; return ls; }
|
||||
FI XYZval<T> operator/ (const XYZEval<T> &rs) { XYZval<T> ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; return ls; }
|
||||
FI XYZval<T> operator* (const float &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= z; return ls; }
|
||||
FI XYZval<T> operator* (const float &v) { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= z; return ls; }
|
||||
FI XYZval<T> operator* (const int &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= z; return ls; }
|
||||
FI XYZval<T> operator* (const int &v) { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= z; return ls; }
|
||||
FI XYZval<T> operator/ (const float &v) const { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= z; return ls; }
|
||||
FI XYZval<T> operator/ (const float &v) { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= z; return ls; }
|
||||
FI XYZval<T> operator/ (const int &v) const { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= z; return ls; }
|
||||
FI XYZval<T> operator/ (const int &v) { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= z; return ls; }
|
||||
FI XYZval<T> operator* (const float &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; return ls; }
|
||||
FI XYZval<T> operator* (const float &v) { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; return ls; }
|
||||
FI XYZval<T> operator* (const int &v) const { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; return ls; }
|
||||
FI XYZval<T> operator* (const int &v) { XYZval<T> ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; return ls; }
|
||||
FI XYZval<T> operator/ (const float &v) const { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; return ls; }
|
||||
FI XYZval<T> operator/ (const float &v) { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; return ls; }
|
||||
FI XYZval<T> operator/ (const int &v) const { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; return ls; }
|
||||
FI XYZval<T> operator/ (const int &v) { XYZval<T> ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; return ls; }
|
||||
FI XYZval<T> operator>>(const int &v) const { XYZval<T> ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); return ls; }
|
||||
FI XYZval<T> operator>>(const int &v) { XYZval<T> ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); return ls; }
|
||||
FI XYZval<T> operator<<(const int &v) const { XYZval<T> ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); return ls; }
|
||||
|
@@ -25,23 +25,26 @@
|
||||
* Release version. Leave the Marlin version or apply a custom scheme.
|
||||
*/
|
||||
#ifndef SHORT_BUILD_VERSION
|
||||
#define SHORT_BUILD_VERSION "2.0.5.3"
|
||||
#define SHORT_BUILD_VERSION "2.0.5.4"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Verbose version identifier which should contain a reference to the location
|
||||
* from where the binary was downloaded or the source code was compiled.
|
||||
*/
|
||||
/**
|
||||
* Verbose version identifier containing a unique identifier, such as the
|
||||
* vendor name, download location, GitHub account, etc.
|
||||
*/
|
||||
#ifndef DETAILED_BUILD_VERSION
|
||||
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (knutwurst, Github)"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Defines the version of the Marlin build. Not to be confused with
|
||||
* Marlin's own build number, e.g. 2.0.x.
|
||||
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
#define CUSTOM_BUILD_VERSION "1.0.5"
|
||||
#define CUSTOM_BUILD_VERSION "1.0.7-prerelese"
|
||||
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2020-03-31"
|
||||
#define STRING_DISTRIBUTION_DATE "2020-07-09"
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -68,18 +71,21 @@
|
||||
#define PROTOCOL_VERSION "1.0"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
*/
|
||||
/**
|
||||
* Define a generic printer name to be output to the LCD after booting Marlin.
|
||||
*/
|
||||
#ifndef MACHINE_NAME
|
||||
#define MACHINE_NAME "Knutwurst's Anycubic i3 MEGA"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The SOURCE_CODE_URL is the location where users will find the Marlin Source
|
||||
* Code which is installed on the device. In most cases —unless the manufacturer
|
||||
* has a distinct Github fork— the Source Code URL should just be the main
|
||||
* Marlin repository.
|
||||
*/
|
||||
/**
|
||||
* Website where users can find Marlin source code for the binary installed on the
|
||||
* device. Override this if you provide public source code download. (GPLv3 requires
|
||||
* providing the source code to your customers.)
|
||||
*/
|
||||
#ifndef SOURCE_CODE_URL
|
||||
#define SOURCE_CODE_URL "https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Default generic printer UUID.
|
||||
|
@@ -305,19 +305,21 @@ void AnycubicTouchscreenClass::PausePrint()
|
||||
TFTstate = ANYCUBIC_TFT_STATE_SDPAUSE_REQ;
|
||||
}
|
||||
|
||||
void AnycubicTouchscreenClass::StopPrint()
|
||||
inline void AnycubicTouchscreenClass::StopPrint()
|
||||
{
|
||||
// stop print, disable heaters
|
||||
wait_for_user = false;
|
||||
wait_for_heatup = false;
|
||||
card.endFilePrint();
|
||||
card.closefile();
|
||||
#ifdef ANYCUBIC_TFT_DEBUGANYCUBIC_TFT_STATE_SDSTOP_REQ
|
||||
IsParked = false;
|
||||
if(card.isFileOpen) {
|
||||
card.endFilePrint();
|
||||
card.closefile();
|
||||
}
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOLNPGM("DEBUG: Stopped and cleared");
|
||||
#endif
|
||||
print_job_timer.stop();
|
||||
thermalManager.disable_all_heaters();
|
||||
IsParked = false;
|
||||
ai3m_pause_state = 0;
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOPAIR(" DEBUG: AI3M Pause State: ", ai3m_pause_state);
|
||||
@@ -413,8 +415,8 @@ void AnycubicTouchscreenClass::ParkAfterStop()
|
||||
SERIAL_ECHOLNPGM("DEBUG: SDSTOP: Park XY");
|
||||
#endif
|
||||
}
|
||||
queue.inject_P(PSTR("M84")); // disable stepper motors
|
||||
queue.inject_P(PSTR("M27")); // force report of SD status
|
||||
queue.enqueue_now_P(PSTR("M84")); // disable stepper motors
|
||||
queue.enqueue_now_P(PSTR("M27")); // force report of SD status
|
||||
ai3m_pause_state = 0;
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOPAIR(" DEBUG: AI3M Pause State: ", ai3m_pause_state);
|
||||
@@ -523,6 +525,13 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
|
||||
queue.inject_P(PSTR("G28\nG29"));
|
||||
}
|
||||
#endif
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
else if (strcasestr(currentTouchscreenSelection, "<BLTouch Leveling>") != NULL)
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: BLTouch Leveling");
|
||||
queue.inject_P(PSTR("G28\nG29"));
|
||||
}
|
||||
#endif
|
||||
else if (strcasestr(currentTouchscreenSelection, "<Fil. Change Pause>") != NULL)
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Fil. Change Pause");
|
||||
@@ -584,6 +593,7 @@ void AnycubicTouchscreenClass::PrintList()
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Fil. Change Resume>");
|
||||
break;
|
||||
|
||||
#if DISABLED(KNUTWURST_BLTOUCH)
|
||||
case 4: // Page 2
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Start Mesh Leveling>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Start Mesh Leveling>");
|
||||
@@ -625,6 +635,30 @@ void AnycubicTouchscreenClass::PrintList()
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Exit>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Exit>");
|
||||
break;
|
||||
#endif
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
case 4: // Page 2
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<BLTouch Leveling>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<BLTouch Leveling>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<PID Tune Hotend>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<PID Tune Hotend>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<PID Tune Ultrabase>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<PID Tune Ultrabase>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Disable Fil. Sensor>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Disable Fil. Sensor>");
|
||||
break;
|
||||
|
||||
case 8: // Page 3
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Enable Fil. Sensor>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Enable Fil. Sensor>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Save EEPROM>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Save EEPROM>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Load FW Defaults>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Load FW Defaults>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Exit>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Exit>");
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
break;
|
||||
@@ -710,12 +744,10 @@ void AnycubicTouchscreenClass::PrintList()
|
||||
|
||||
if (card.flag.filenameIsDir)
|
||||
{
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("/");
|
||||
HARDWARE_SERIAL_PROTOCOL(card.filename);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(".gco");
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("DIR_");
|
||||
HARDWARE_SERIAL_PROTOCOL(outputString);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(".gcode");
|
||||
HARDWARE_SERIAL_PROTOCOL("/");
|
||||
HARDWARE_SERIAL_PROTOCOLLN(card.filename);
|
||||
HARDWARE_SERIAL_PROTOCOL("/");
|
||||
HARDWARE_SERIAL_PROTOCOLLN(buffer);
|
||||
SERIAL_ECHO(count);
|
||||
SERIAL_ECHOPGM(": /");
|
||||
SERIAL_ECHOLN(outputString);
|
||||
@@ -731,6 +763,11 @@ void AnycubicTouchscreenClass::PrintList()
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
// Do nothing?
|
||||
}
|
||||
}
|
||||
|
||||
void AnycubicTouchscreenClass::CheckSDCardChange()
|
||||
@@ -895,7 +932,7 @@ void AnycubicTouchscreenClass::StateHandler()
|
||||
// did we park the hotend already?
|
||||
if ((!IsParked) && (!card.isPrinting()) && (!planner.movesplanned()))
|
||||
{
|
||||
queue.inject_P(PSTR("G91\nG1 E-1 F1800\nG90")); //retract
|
||||
queue.enqueue_now_P(PSTR("G91\nG1 E-1 F1800\nG90")); //retract
|
||||
ParkAfterStop();
|
||||
IsParked = true;
|
||||
}
|
||||
|
@@ -835,7 +835,7 @@ void Temperature::min_temp_error(const heater_ind_t heater) {
|
||||
|
||||
#if HOTENDS
|
||||
#if ENABLED(PID_DEBUG)
|
||||
extern bool PID_Debug_Flag;
|
||||
extern bool pid_debug_flag;
|
||||
#endif
|
||||
|
||||
float Temperature::get_pid_output_hotend(const uint8_t E_NAME) {
|
||||
@@ -918,7 +918,7 @@ void Temperature::min_temp_error(const heater_ind_t heater) {
|
||||
#endif // PID_OPENLOOP
|
||||
|
||||
#if ENABLED(PID_DEBUG)
|
||||
if (ee == active_extruder && PID_Debug_Flag) {
|
||||
if (ee == active_extruder && pid_debug_flag) {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPAIR(STR_PID_DEBUG, ee, STR_PID_DEBUG_INPUT, temp_hotend[ee].celsius, STR_PID_DEBUG_OUTPUT, pid_output);
|
||||
#if DISABLED(PID_OPENLOOP)
|
||||
|
Reference in New Issue
Block a user