Compare commits
44 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a7094a923d | ||
|
32d498e26c | ||
|
88c93102fa | ||
|
790c5191c8 | ||
|
813166d705 | ||
|
36e2e5be91 | ||
|
d70a585be8 | ||
|
3c2d6f7965 | ||
|
cedcbc01a0 | ||
|
2dafb2a90d | ||
|
946abb5c6f | ||
|
710ab1b2d3 | ||
|
4acb60ed54 | ||
|
e8c0b4a9ef | ||
|
77f77a58e8 | ||
|
168e2f8305 | ||
|
6fff254817 | ||
|
79c5924e28 | ||
|
a3a47856c2 | ||
|
1c3f1e9ada | ||
|
ed18a4a3ff | ||
|
e0a9012556 | ||
|
80602aa43f | ||
|
620052b991 | ||
|
8232232235 | ||
|
159663797e | ||
|
6118fe84d8 | ||
|
d174e84f4e | ||
|
e9515c89f2 | ||
|
ca41c9a310 | ||
|
68338f49ec | ||
|
a7b4298ffd | ||
|
68cc5ef87d | ||
|
97d6db15cf | ||
|
5d3be2c342 | ||
|
d88d98d691 | ||
|
73c98e400b | ||
|
73e750d697 | ||
|
f6836ebdcb | ||
|
6e76022b13 | ||
|
b0095e511c | ||
|
0b2ea96958 | ||
|
c4cf58490e | ||
|
e5029452e2 |
@@ -38,10 +38,20 @@
|
||||
*/
|
||||
#define CONFIGURATION_H_VERSION 020005
|
||||
|
||||
#define KNUTWURST_MEGAS
|
||||
#define KNUTWURST_TMC
|
||||
#define ANYCUBIC_TOUCHSCREEN
|
||||
#define ANYCUBIC_FILAMENT_RUNOUT_SENSOR
|
||||
//#define ANYCUBIC_TFT_DEBUG
|
||||
//#define POWER_OUTAGE_TEST
|
||||
|
||||
//#define KNUTWURST_MEGAS
|
||||
//#define KNUTWURST_TMC
|
||||
//#define KNUTWURST_DGUS2_TFT
|
||||
//#define KNUTWURST_BLTOUCH
|
||||
|
||||
|
||||
//#define KNUTWURST_DEBUG
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//============================= Getting Started =============================
|
||||
//===========================================================================
|
||||
@@ -76,6 +86,7 @@
|
||||
|
||||
// Author info of this build printed to the host during boot and M115
|
||||
#define STRING_CONFIG_H_AUTHOR "(knutwurst)" // Who made the changes.
|
||||
//#define CUSTOM_VERSION_FILE Version.h // Path from the root directory (no quotes)
|
||||
|
||||
/**
|
||||
* *** VENDORS PLEASE READ ***
|
||||
@@ -772,7 +783,7 @@
|
||||
*/
|
||||
|
||||
#if ENABLED(KNUTWURST_MEGAS)
|
||||
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 384 }
|
||||
#define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 400, 392 }
|
||||
#endif
|
||||
|
||||
#if DISABLED(KNUTWURST_MEGAS)
|
||||
@@ -909,7 +920,9 @@
|
||||
* - normally-open switches to 5V and D32.
|
||||
*
|
||||
*/
|
||||
//#define Z_MIN_PROBE_PIN 32 // Pin 32 is the RAMPS default
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
#define Z_MIN_PROBE_PIN 2 // Pin 32 is the RAMPS default
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Probe Type
|
||||
@@ -923,7 +936,10 @@
|
||||
* Use G29 repeatedly, adjusting the Z height at each point with movement commands
|
||||
* or (with LCD_BED_LEVELING) the LCD controller.
|
||||
*/
|
||||
#if DISABLED(KNUTWURST_BLTOUCH)
|
||||
#define PROBE_MANUALLY
|
||||
#endif
|
||||
|
||||
//#define MANUAL_PROBE_START_Z 0.2
|
||||
|
||||
/**
|
||||
@@ -947,7 +963,9 @@
|
||||
/**
|
||||
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
|
||||
*/
|
||||
//#define BLTOUCH
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
#define BLTOUCH
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Touch-MI Probe by hotends.fr
|
||||
@@ -1019,14 +1037,20 @@
|
||||
*
|
||||
* Specify a Probe position as { X, Y, Z }
|
||||
*/
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
#define NOZZLE_TO_PROBE_OFFSET { 29, -15, 0 }
|
||||
#endif
|
||||
|
||||
#if DISABLED(KNUTWURST_BLTOUCH)
|
||||
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
|
||||
#endif
|
||||
|
||||
// Most probes should stay away from the edges of the bed, but
|
||||
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
|
||||
#define MIN_PROBE_EDGE 10
|
||||
|
||||
// X and Y axis travel speed (mm/m) between probes
|
||||
#define XY_PROBE_SPEED 8000
|
||||
#define XY_PROBE_SPEED 3600
|
||||
|
||||
// Feedrate (mm/m) for the first approach when double-probing (MULTIPLE_PROBING == 2)
|
||||
#define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
|
||||
@@ -1065,14 +1089,23 @@
|
||||
#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
|
||||
//#define Z_AFTER_PROBING 5 // Z position after probing is done
|
||||
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
#define Z_PROBE_LOW_POINT -5 // Farthest distance below the trigger-point to go before stopping
|
||||
#endif
|
||||
|
||||
#if DISABLED(KNUTWURST_BLTOUCH)
|
||||
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
|
||||
#endif
|
||||
|
||||
|
||||
// For M851 give a range for adjusting the Z probe offset
|
||||
#define Z_PROBE_OFFSET_RANGE_MIN -20
|
||||
#define Z_PROBE_OFFSET_RANGE_MAX 20
|
||||
|
||||
// Enable the M48 repeatability test to test probe accuracy
|
||||
//#define Z_MIN_PROBE_REPEATABILITY_TEST
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
#define Z_MIN_PROBE_REPEATABILITY_TEST
|
||||
#endif
|
||||
|
||||
// Before deploy/stow pause for user confirmation
|
||||
//#define PAUSE_BEFORE_DEPLOY_STOW
|
||||
@@ -1176,16 +1209,16 @@
|
||||
// @section machine
|
||||
|
||||
// The size of the print bed
|
||||
#define X_BED_SIZE 215
|
||||
#define Y_BED_SIZE 215
|
||||
#define X_BED_SIZE 225
|
||||
#define Y_BED_SIZE 220
|
||||
|
||||
// Travel limits (mm) after homing, corresponding to endstop positions.
|
||||
#define X_MIN_POS -5
|
||||
#define X_MIN_POS 0
|
||||
#define Y_MIN_POS 0
|
||||
#define Z_MIN_POS 0
|
||||
#define X_MAX_POS X_BED_SIZE
|
||||
#define Y_MAX_POS Y_BED_SIZE
|
||||
#define Z_MAX_POS 205
|
||||
#define Z_MAX_POS 210
|
||||
|
||||
/**
|
||||
* Software Endstops
|
||||
@@ -1286,11 +1319,21 @@
|
||||
* leveling in steps so you can manually adjust the Z height at each grid-point.
|
||||
* With an LCD controller the process is guided step-by-step.
|
||||
*/
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
//#define AUTO_BED_LEVELING_3POINT
|
||||
//#define AUTO_BED_LEVELING_LINEAR
|
||||
#define AUTO_BED_LEVELING_BILINEAR
|
||||
//#define AUTO_BED_LEVELING_UBL
|
||||
//#define MESH_BED_LEVELING
|
||||
#endif
|
||||
|
||||
#if DISABLED(KNUTWURST_BLTOUCH)
|
||||
//#define AUTO_BED_LEVELING_3POINT
|
||||
//#define AUTO_BED_LEVELING_LINEAR
|
||||
//#define AUTO_BED_LEVELING_BILINEAR
|
||||
//#define AUTO_BED_LEVELING_UBL
|
||||
#define MESH_BED_LEVELING
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Normally G28 leaves leveling disabled on completion. Enable
|
||||
@@ -1303,7 +1346,9 @@
|
||||
* Turn on with the command 'M111 S32'.
|
||||
* NOTE: Requires a lot of PROGMEM!
|
||||
*/
|
||||
//#define DEBUG_LEVELING_FEATURE
|
||||
#if ENABLED(KNUTWURST_DEBUG)
|
||||
#define DEBUG_LEVELING_FEATURE
|
||||
#endif
|
||||
|
||||
#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL)
|
||||
// Gradually reduce leveling correction until a set height is reached,
|
||||
@@ -1335,7 +1380,7 @@
|
||||
#if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR)
|
||||
|
||||
// Set the number of grid points per dimension.
|
||||
#define GRID_MAX_POINTS_X 3
|
||||
#define GRID_MAX_POINTS_X 5
|
||||
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
|
||||
|
||||
// Probe along the Y axis, advancing X after each column
|
||||
@@ -1839,7 +1884,7 @@
|
||||
//
|
||||
// Short 2KHz beep when endstops are hit
|
||||
//
|
||||
#define ENDSTOP_BEEP
|
||||
//#define ENDSTOP_BEEP
|
||||
|
||||
//
|
||||
// The duration and frequency for the UI feedback sound.
|
||||
@@ -2350,9 +2395,3 @@
|
||||
|
||||
// Allow servo angle to be edited and saved to EEPROM
|
||||
//#define EDITABLE_SERVO_ANGLES
|
||||
|
||||
#define ANYCUBIC_TOUCHSCREEN
|
||||
#define ANYCUBIC_FILAMENT_RUNOUT_SENSOR
|
||||
//#define ANYCUBIC_TFT_DEBUG
|
||||
//#define KNUTWURST_MEGAS_DEBUG
|
||||
//#define KNUTWURST_TMC_DEBUG
|
||||
|
@@ -1471,7 +1471,9 @@
|
||||
*
|
||||
* Warning: Does not respect endstops!
|
||||
*/
|
||||
//#define BABYSTEPPING
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
#define BABYSTEPPING
|
||||
#endif
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
//#define INTEGRATED_BABYSTEPPING // EXPERIMENTAL integration of babystepping into the Stepper ISR
|
||||
//#define BABYSTEP_WITHOUT_HOMING
|
||||
@@ -1520,6 +1522,7 @@
|
||||
*/
|
||||
#define LIN_ADVANCE
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
//#define EXTRA_LIN_ADVANCE_K // Enable for second linear advance constants
|
||||
#define LIN_ADVANCE_K 0 // Unit: mm compression per 1mm/s extruder speed
|
||||
//#define LA_DEBUG // If enabled, this will generate debug information output over USB.
|
||||
#endif
|
||||
@@ -1556,12 +1559,23 @@
|
||||
* probe points will follow. This prevents any change from causing
|
||||
* the probe to be unable to reach any points.
|
||||
*/
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
#if PROBE_SELECTED && !IS_KINEMATIC
|
||||
#define MIN_PROBE_EDGE_LEFT 10
|
||||
#define MIN_PROBE_EDGE_RIGHT 10
|
||||
#define MIN_PROBE_EDGE_FRONT 10
|
||||
#define MIN_PROBE_EDGE_BACK 10
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if DISABLED(KNUTWURST_BLTOUCH)
|
||||
#if PROBE_SELECTED && !IS_KINEMATIC
|
||||
//#define MIN_PROBE_EDGE_LEFT MIN_PROBE_EDGE
|
||||
//#define MIN_PROBE_EDGE_RIGHT MIN_PROBE_EDGE
|
||||
//#define MIN_PROBE_EDGE_FRONT MIN_PROBE_EDGE
|
||||
//#define MIN_PROBE_EDGE_BACK MIN_PROBE_EDGE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
|
||||
// Override the mesh area if the automatic (max) area is too large
|
||||
|
@@ -28,7 +28,7 @@
|
||||
/**
|
||||
* Marlin release version identifier
|
||||
*/
|
||||
//#define SHORT_BUILD_VERSION "2.0.5.3"
|
||||
//#define SHORT_BUILD_VERSION "2.0.5.4"
|
||||
|
||||
/**
|
||||
* Verbose version identifier which should contain a reference to the location
|
||||
@@ -41,7 +41,7 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
//#define STRING_DISTRIBUTION_DATE "2020-01-31"
|
||||
//#define STRING_DISTRIBUTION_DATE "2020-07-09"
|
||||
|
||||
/**
|
||||
* Defines a generic printer name to be output to the LCD after booting Marlin.
|
||||
|
@@ -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.1.0"
|
||||
|
||||
#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.
|
||||
|
@@ -37,6 +37,8 @@
|
||||
|
||||
#include "HardwareSerial.h"
|
||||
|
||||
millis_t previous_cmd_ms = 0;
|
||||
|
||||
// Define constants and variables for buffering incoming serial data. We're
|
||||
// using a ring buffer (I think), in which head is the index of the location
|
||||
// to which to write the next incoming character and tail is the index of the
|
||||
@@ -310,6 +312,33 @@ HardwareSerialClass::operator bool()
|
||||
HardwareSerialClass HardwareSerial(&rx_buffer_ajg, &tx_buffer_ajg, &UBRR3H, &UBRR3L, &UCSR3A, &UCSR3B, &UCSR3C, &UDR3, RXEN3, TXEN3, RXCIE3, UDRIE3, U2X3);
|
||||
#endif
|
||||
|
||||
void Newok_to_send() {
|
||||
previous_cmd_ms = millis();
|
||||
/*
|
||||
if (!send_ok[cmd_queue_index_r]) return;
|
||||
// SERIAL_PROTOCOLPGM(MSG_OK);
|
||||
#if ENABLED(ADVANCED_OK)
|
||||
char* p = command_queue[cmd_queue_index_r];
|
||||
if (*p == 'N') {
|
||||
SERIAL_PROTOCOL(' ');
|
||||
SERIAL_ECHO(*p++);
|
||||
while (NUMERIC_SIGNED(*p))
|
||||
SERIAL_ECHO(*p++);
|
||||
}
|
||||
SERIAL_PROTOCOLPGM(" P"); SERIAL_PROTOCOL(int(BLOCK_BUFFER_SIZE - planner.movesplanned() - 1));
|
||||
SERIAL_PROTOCOLPGM(" B"); SERIAL_PROTOCOL(BUFSIZE - commands_in_queue);
|
||||
#endif
|
||||
SERIAL_EOL;
|
||||
*/
|
||||
}
|
||||
void NEWFlushSerialRequestResend() {
|
||||
//char command_queue[cmd_queue_index_r][100]="Resend:";
|
||||
HardwareSerial.flush();
|
||||
// SERIAL_PROTOCOLPGM(MSG_RESEND);
|
||||
// SERIAL_PROTOCOLLN(gcode_LastN + 1);
|
||||
Newok_to_send();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif // whole file
|
||||
|
@@ -141,4 +141,7 @@ FORCE_INLINE void HardwareSerialprintPGM(const char *str)
|
||||
}
|
||||
}
|
||||
|
||||
void NEWFlushSerialRequestResend();
|
||||
void NEWClearToSend();
|
||||
|
||||
#endif
|
||||
|
@@ -54,11 +54,9 @@ int Temp_Buf_Bed_Temperature = 0;
|
||||
unsigned char ResumingFlag = 0;
|
||||
#endif
|
||||
|
||||
#define MAX_PRINTABLE_FILENAME_LEN 21
|
||||
|
||||
void setup_OutageTestPin()
|
||||
{
|
||||
#if defined(POWER_OUTAGE_TEST)
|
||||
#ifdef POWER_OUTAGE_TEST
|
||||
pinMode(OUTAGETEST_PIN, INPUT);
|
||||
pinMode(OUTAGECON_PIN, OUTPUT);
|
||||
WRITE(OUTAGECON_PIN, LOW);
|
||||
@@ -112,6 +110,7 @@ AnycubicTouchscreenClass::AnycubicTouchscreenClass()
|
||||
void AnycubicTouchscreenClass::Setup()
|
||||
{
|
||||
HardwareSerial.begin(115200);
|
||||
HARDWARE_SERIAL_ENTER();
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("J17"); // J17 Main board reset
|
||||
HARDWARE_SERIAL_ENTER();
|
||||
delay(10);
|
||||
@@ -122,10 +121,9 @@ void AnycubicTouchscreenClass::Setup()
|
||||
pinMode(SD_DETECT_PIN, INPUT);
|
||||
WRITE(SD_DETECT_PIN, HIGH);
|
||||
#endif
|
||||
|
||||
#if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
|
||||
pinMode(19, INPUT);
|
||||
WRITE(19, HIGH);
|
||||
#if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
|
||||
if ((READ(19) == true) && FilamentSensorEnabled)
|
||||
{
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK
|
||||
@@ -136,9 +134,11 @@ void AnycubicTouchscreenClass::Setup()
|
||||
}
|
||||
#endif
|
||||
|
||||
SelectedDirectory[0] = 0;
|
||||
currentTouchscreenSelection[0] = '\0';
|
||||
currentFileOrDirectory[0] = '\0';
|
||||
SpecialMenu = false;
|
||||
FilamentSensorEnabled = true;
|
||||
MyFileNrCnt = 0;
|
||||
|
||||
#ifdef STARTUP_CHIME
|
||||
buzzer.tone(100, 554);
|
||||
@@ -302,19 +302,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);
|
||||
@@ -374,6 +376,7 @@ void AnycubicTouchscreenClass::ReheatNozzle()
|
||||
|
||||
// enable heaters again
|
||||
HOTEND_LOOP()
|
||||
thermalManager.reset_hotend_idle_timer(e);
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOLNPGM("DEBUG: Clear flags");
|
||||
#endif
|
||||
@@ -409,8 +412,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);
|
||||
@@ -431,90 +434,126 @@ bool AnycubicTouchscreenClass::CodeSeen(char code)
|
||||
|
||||
void AnycubicTouchscreenClass::HandleSpecialMenu()
|
||||
{
|
||||
if (strcmp(SelectedDirectory, "<special menu>") == 0)
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOPAIR(" DEBUG: Special Menu Selection: ", currentTouchscreenSelection);
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
if ((strcasestr(currentTouchscreenSelection, SM_SPECIAL_MENU_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_SPECIAL_MENU_S) != NULL))
|
||||
{
|
||||
SpecialMenu = true;
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<pid tune hotend>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_PID_HOTEND_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_PID_HOTEND_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: PID Tune Hotend");
|
||||
queue.inject_P(PSTR("M106 S204\nM303 E0 S210 C15 U1"));
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<pid tune ultrabase>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_PID_BED_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_PID_BED_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: PID Tune Ultrabase");
|
||||
queue.inject_P(PSTR("M303 E-1 S60 C6 U1"));
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<save eeprom>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_SAVE_EEPROM_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_SAVE_EEPROM_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Save EEPROM");
|
||||
queue.inject_P(PSTR("M500"));
|
||||
buzzer.tone(105, 1108);
|
||||
buzzer.tone(210, 1661);
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<load fw defaults>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_LOAD_DEFAULTS_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_LOAD_DEFAULTS_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Load FW Defaults");
|
||||
queue.inject_P(PSTR("M502"));
|
||||
buzzer.tone(105, 1661);
|
||||
buzzer.tone(210, 1108);
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<preheat ultrabase>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_PREHEAT_BED_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_PREHEAT_BED_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Preheat Ultrabase");
|
||||
queue.inject_P(PSTR("M140 S60"));
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<start mesh leveling>") == 0)
|
||||
|
||||
#if DISABLED(KNUTWURST_BLTOUCH)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_MESH_START_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_MESH_START_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Start Mesh Leveling");
|
||||
queue.inject_P(PSTR("G29 S1"));
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<next mesh point>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_MESH_NEXT_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_MESH_NEXT_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Next Mesh Point");
|
||||
queue.inject_P(PSTR("G29 S2"));
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<z up 0.1>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_Z_UP_01_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_Z_UP_01_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Z Up 0.1");
|
||||
queue.inject_P(PSTR("G91\nG1 Z+0.1\nG90"));
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<z down 0.1>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_Z_DN_01_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_Z_DN_01_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Z Down 0.1");
|
||||
queue.inject_P(PSTR("G91\nG1 Z-0.1\nG90"));
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<z up 0.02>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_Z_UP_002_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_Z_UP_002_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Z Up 0.02");
|
||||
queue.inject_P(PSTR("G91\nG1 Z+0.02\nG90"));
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<z down 0.02>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_Z_DN_002_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_Z_DN_002_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Z Down 0.02");
|
||||
queue.inject_P(PSTR("G91\nG1 Z-0.02\nG90"));
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<z up 0.01>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_Z_UP_001_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_Z_UP_001_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Z Up 0.01");
|
||||
queue.inject_P(PSTR("G91\nG1 Z+0.01\nG90"));
|
||||
queue.enqueue_now_P(PSTR("G91\nG1 Z+0.03\nG90"));
|
||||
queue.enqueue_now_P(PSTR("G91\nG1 Z-0.02\nG90"));
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<z down 0.01>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_Z_DN_001_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_Z_DN_001_L) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Z Down 0.01");
|
||||
queue.inject_P(PSTR("G91\nG1 Z-0.01\nG90"));
|
||||
queue.enqueue_now_P(PSTR("G91\nG1 Z+0.02\nG90"));
|
||||
queue.enqueue_now_P(PSTR("G91\nG1 Z-0.03\nG90"));
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<fil. change pause>") == 0)
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_BLTOUCH_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_BLTOUCH_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: BLTouch Leveling");
|
||||
queue.inject_P(PSTR("G28\nG29"));
|
||||
}
|
||||
#endif
|
||||
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_PAUSE_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_PAUSE_L) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Fil. Change Pause");
|
||||
FilamentChangePause();
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<fil. change resume>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_RESUME_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_RESUME_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Fil. Change Resume");
|
||||
FilamentChangeResume();
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<disable fil. sensor>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_DIS_FILSENS_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_DIS_FILSENS_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Disable Filament Sensor");
|
||||
FilamentSensorEnabled = false;
|
||||
@@ -522,94 +561,122 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
|
||||
buzzer.tone(105, 1108);
|
||||
buzzer.tone(105, 1108);
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<enable fil. sensor>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_EN_FILSENS_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_EN_FILSENS_S) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Enable Filament Sensor");
|
||||
FilamentSensorEnabled = true;
|
||||
buzzer.tone(105, 1108);
|
||||
buzzer.tone(105, 1108);
|
||||
}
|
||||
else if (strcmp(SelectedDirectory, "<exit>") == 0)
|
||||
else if ((strcasestr(currentTouchscreenSelection, SM_EXIT_L) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_EXIT_S) != NULL))
|
||||
{
|
||||
SpecialMenu = false;
|
||||
}
|
||||
}
|
||||
|
||||
void AnycubicTouchscreenClass::AnycubicTouchscreen()
|
||||
|
||||
void AnycubicTouchscreenClass::PrintList()
|
||||
{
|
||||
if (SpecialMenu)
|
||||
{
|
||||
switch (filenumber)
|
||||
{
|
||||
case 0: // Page 1
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Exit>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Exit>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Preheat Ultrabase>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Preheat Ultrabase>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Fil. Change Pause>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Fil. Change Pause>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Fil. Change Resume>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Fil. Change Resume>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EXIT_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EXIT_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_PREHEAT_BED_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_PREHEAT_BED_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_PAUSE_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_PAUSE_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_RESUME_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_RESUME_L);
|
||||
break;
|
||||
|
||||
#if DISABLED(KNUTWURST_BLTOUCH)
|
||||
case 4: // Page 2
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Start Mesh Leveling>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Start Mesh Leveling>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Next Mesh Point>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Next Mesh Point>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Up 0.1>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Up 0.1>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Down 0.1>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Down 0.1>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_MESH_START_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_MESH_START_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_MESH_NEXT_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_MESH_NEXT_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_Z_UP_01_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_Z_UP_01_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_Z_DN_01_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_Z_DN_01_L);
|
||||
break;
|
||||
|
||||
case 8: // Page 3
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Up 0.02>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Up 0.02>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Down 0.02>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Down 0.02>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Up 0.01>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Up 0.01>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Down 0.01>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Z Down 0.01>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_Z_UP_002_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_Z_UP_002_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_Z_DN_002_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_Z_DN_002_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_Z_UP_001_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_Z_UP_001_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_Z_DN_001_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_Z_DN_001_L);
|
||||
break;
|
||||
|
||||
case 12: // Page 4
|
||||
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("<Save EEPROM>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Save EEPROM>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Load FW Defaults>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Load FW Defaults>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_PID_HOTEND_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_PID_HOTEND_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_PID_BED_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_PID_BED_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_SAVE_EEPROM_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_SAVE_EEPROM_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_LOAD_DEFAULTS_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_LOAD_DEFAULTS_L);
|
||||
break;
|
||||
|
||||
case 16: // Page 5
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Disable Fil. Sensor>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Disable Fil. Sensor>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Enable Fil. Sensor>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Enable Fil. Sensor>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Exit>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Exit>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_DIS_FILSENS_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_DIS_FILSENS_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EN_FILSENS_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EN_FILSENS_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EXIT_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EXIT_L);
|
||||
break;
|
||||
#endif
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
case 4: // Page 2
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_BLTOUCH_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_BLTOUCH_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_PID_HOTEND_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_PID_HOTEND_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_PID_BED_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_PID_BED_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_DIS_FILSENS_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_DIS_FILSENS_L);
|
||||
break;
|
||||
|
||||
case 8: // Page 3
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EN_FILSENS_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EN_FILSENS_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_SAVE_EEPROM_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_SAVE_EEPROM_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_LOAD_DEFAULTS_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_LOAD_DEFAULTS_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EXIT_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EXIT_L);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef SDSUPPORT
|
||||
#ifdef SDSUPPORT
|
||||
else if (card.isMounted())
|
||||
{
|
||||
uint16_t count = filenumber;
|
||||
uint16_t max_files;
|
||||
uint16_t dir_files = card.countFilesInWorkDir();
|
||||
uint16_t MyFileNrCnt = card.countFilesInWorkDir();
|
||||
|
||||
// What is this shit? What if there are exactely 3 files+folders?
|
||||
// TODO: find something better than this crap.
|
||||
if ((dir_files - filenumber) < 4)
|
||||
if ((MyFileNrCnt - filenumber) < 4)
|
||||
{
|
||||
max_files = dir_files;
|
||||
max_files = MyFileNrCnt;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -618,21 +685,32 @@ void AnycubicTouchscreenClass::AnycubicTouchscreen()
|
||||
|
||||
for (count = filenumber; count <= max_files; count++)
|
||||
{
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOPGM("filenumber: ");
|
||||
SERIAL_ECHOLN(filenumber);
|
||||
SERIAL_ECHOPGM("max_files: ");
|
||||
SERIAL_ECHOLN(max_files);
|
||||
SERIAL_ECHOPGM("count: ");
|
||||
SERIAL_ECHOLN(count);
|
||||
#endif
|
||||
|
||||
if (count == 0) // Special Entry
|
||||
{
|
||||
if (strcmp(card.getWorkDirName(), "/") == 0)
|
||||
{
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Special Menu>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Special Menu>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_SPECIAL_MENU_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_SPECIAL_MENU_L);
|
||||
SERIAL_ECHO(count);
|
||||
SERIAL_ECHOLNPGM("<Special_Menu>");
|
||||
SERIAL_ECHO(": ");
|
||||
SERIAL_ECHOLNPGM(SM_SPECIAL_MENU_L);
|
||||
}
|
||||
else
|
||||
{
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("/..");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("/..");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_DIR_UP_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_DIR_UP_L);
|
||||
SERIAL_ECHO(count);
|
||||
SERIAL_ECHOLNPGM("/..");
|
||||
SERIAL_ECHO(": ");
|
||||
SERIAL_ECHOLNPGM(SM_DIR_UP_L);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -648,34 +726,55 @@ void AnycubicTouchscreenClass::AnycubicTouchscreen()
|
||||
if(fileNameLen > MAX_PRINTABLE_FILENAME_LEN)
|
||||
fileNameLen = MAX_PRINTABLE_FILENAME_LEN;
|
||||
|
||||
char buffer[fileNameLen];
|
||||
char outputString[fileNameLen];
|
||||
|
||||
for (unsigned char i = 0; i < fileNameLen; i++)
|
||||
for (unsigned char i = 0; i <= fileNameLen; i++)
|
||||
{
|
||||
buffer[i] = card.longFilename[i];
|
||||
if (!isPrintable(buffer[i]))
|
||||
if(i >= fileNameLen)
|
||||
{
|
||||
buffer[i] = '_';
|
||||
outputString[i] = ' ';
|
||||
}
|
||||
else
|
||||
{
|
||||
outputString[i] = card.longFilename[i];
|
||||
if (!isPrintable(outputString[i]))
|
||||
{
|
||||
outputString[i] = '_';
|
||||
}
|
||||
}
|
||||
}
|
||||
buffer[fileNameLen] = '\0';
|
||||
|
||||
outputString[fileNameLen] = '\0';
|
||||
|
||||
if (card.flag.filenameIsDir)
|
||||
{
|
||||
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("/");
|
||||
HARDWARE_SERIAL_PROTOCOLLN(card.filename);
|
||||
HARDWARE_SERIAL_PROTOCOL(card.filename);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(".GCO");
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("/");
|
||||
HARDWARE_SERIAL_PROTOCOLLN(buffer);
|
||||
HARDWARE_SERIAL_PROTOCOL(outputString);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(".gcode");
|
||||
SERIAL_ECHO(count);
|
||||
SERIAL_ECHOPGM("/");
|
||||
SERIAL_ECHOLN(buffer);
|
||||
SERIAL_ECHOPGM(": /");
|
||||
SERIAL_ECHOLN(outputString);
|
||||
#else
|
||||
HARDWARE_SERIAL_PROTOCOL("/");
|
||||
HARDWARE_SERIAL_PROTOCOLLN(card.filename);
|
||||
HARDWARE_SERIAL_PROTOCOL("/");
|
||||
HARDWARE_SERIAL_PROTOCOLLN(outputString);
|
||||
SERIAL_ECHO(count);
|
||||
SERIAL_ECHOPGM(": /");
|
||||
SERIAL_ECHOLN(outputString);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
HARDWARE_SERIAL_PROTOCOLLN(card.filename);
|
||||
HARDWARE_SERIAL_PROTOCOLLN(buffer);
|
||||
HARDWARE_SERIAL_PROTOCOLLN(outputString);
|
||||
SERIAL_ECHO(count);
|
||||
SERIAL_ECHOLN(buffer);
|
||||
SERIAL_ECHOPGM(": ");
|
||||
SERIAL_ECHOLN(outputString);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -683,8 +782,7 @@ void AnycubicTouchscreenClass::AnycubicTouchscreen()
|
||||
#endif
|
||||
else
|
||||
{
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Special_Menu>");
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM("<Special_Menu>");
|
||||
// Do nothing?
|
||||
}
|
||||
}
|
||||
|
||||
@@ -850,7 +948,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;
|
||||
}
|
||||
@@ -930,36 +1028,88 @@ void AnycubicTouchscreenClass::FilamentRunout()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static boolean TFTcomment_mode = false;
|
||||
|
||||
void AnycubicTouchscreenClass::GetCommandFromTFT()
|
||||
{
|
||||
|
||||
char *starpos = NULL;
|
||||
while (HardwareSerial.available() > 0 && TFTbuflen < TFTBUFSIZE)
|
||||
{
|
||||
serial3_char = HardwareSerial.read();
|
||||
if (serial3_char == '\n' ||
|
||||
serial3_char == '\r' ||
|
||||
serial3_char == ':' ||
|
||||
serial3_count >= (TFT_MAX_CMD_SIZE - 1))
|
||||
while( HardwareSerial.available() > 0 && TFTbuflen < TFTBUFSIZE)
|
||||
{
|
||||
serial3_char = HardwareSerial.read();
|
||||
if(serial3_char == '\n' || serial3_char == '\r' || (serial3_char == ':' && TFTcomment_mode == false) || serial3_count >= (TFT_MAX_CMD_SIZE - 1) )
|
||||
{
|
||||
if (!serial3_count)
|
||||
{ //if empty line
|
||||
if(!serial3_count) { //if empty line
|
||||
TFTcomment_mode = false; //for new command
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
TFTcmdbuffer[TFTbufindw][serial3_count] = 0; //terminate string
|
||||
if(!TFTcomment_mode)
|
||||
{
|
||||
TFTcomment_mode = false; //for new command
|
||||
|
||||
//TFTfromsd[TFTbufindw] = false;
|
||||
|
||||
if(strchr(TFTcmdbuffer[TFTbufindw], 'N') != NULL)
|
||||
{
|
||||
/*
|
||||
TFTstrchr_pointer = strchr(TFTcmdbuffer[TFTbufindw], 'N');
|
||||
gcode_N = (strtol(&TFTcmdbuffer[TFTbufindw][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindw] + 1], NULL, 10));
|
||||
if(gcode_N != gcode_LastN+1 && (strstr_P(TFTcmdbuffer[TFTbufindw], PSTR("M110")) == NULL) )
|
||||
{
|
||||
HARDWARE_SERIAL_ERROR_START;
|
||||
NEWFlushSerialRequestResend();
|
||||
serial3_count = 0;
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
if(strchr(TFTcmdbuffer[TFTbufindw], '*') != NULL)
|
||||
{
|
||||
byte checksum = 0;
|
||||
byte count = 0;
|
||||
while(TFTcmdbuffer[TFTbufindw][count] != '*') checksum = checksum^TFTcmdbuffer[TFTbufindw][count++];
|
||||
TFTstrchr_pointer = strchr(TFTcmdbuffer[TFTbufindw], '*');
|
||||
|
||||
if( (int)(strtod(&TFTcmdbuffer[TFTbufindw][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindw] + 1], NULL)) != checksum)
|
||||
{
|
||||
HARDWARE_SERIAL_ERROR_START;
|
||||
NEWFlushSerialRequestResend();
|
||||
|
||||
TFTcmdbuffer[TFTbufindw][serial3_count] = 0; //terminate string
|
||||
|
||||
if ((strchr(TFTcmdbuffer[TFTbufindw], 'A') != NULL))
|
||||
HARDWARE_SERIAL_ERROR_START;
|
||||
NEWFlushSerialRequestResend();
|
||||
serial3_count = 0;
|
||||
return;
|
||||
}
|
||||
//if no errors, continue parsing
|
||||
}
|
||||
else
|
||||
{
|
||||
HARDWARE_SERIAL_ERROR_START;
|
||||
NEWFlushSerialRequestResend();
|
||||
serial3_count = 0;
|
||||
return;
|
||||
}
|
||||
//gcode_LastN = gcode_N;
|
||||
//if no errors, continue parsing
|
||||
}
|
||||
else // if we don't receive 'N' but still see '*'
|
||||
{
|
||||
if((strchr(TFTcmdbuffer[TFTbufindw], '*') != NULL))
|
||||
{
|
||||
HARDWARE_SERIAL_ERROR_START;
|
||||
serial3_count = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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)
|
||||
switch((int)((strtod(&TFTcmdbuffer[TFTbufindw][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindw] + 1], NULL))))
|
||||
{
|
||||
|
||||
case 0: //A0 GET HOTEND TEMP
|
||||
@@ -1056,7 +1206,7 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
|
||||
}
|
||||
case 8: // A8 GET SD LIST
|
||||
#ifdef SDSUPPORT
|
||||
SelectedDirectory[0] = 0;
|
||||
currentTouchscreenSelection[0] = 0;
|
||||
if (!IS_SD_INSERTED())
|
||||
{
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("J02");
|
||||
@@ -1066,10 +1216,10 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
|
||||
{
|
||||
if (CodeSeen('S'))
|
||||
filenumber = CodeValue();
|
||||
|
||||
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("FN "); // Filelist start
|
||||
HARDWARE_SERIAL_ENTER();
|
||||
AnycubicTouchscreen();
|
||||
PrintList();
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("END"); // Filelist stop
|
||||
HARDWARE_SERIAL_ENTER();
|
||||
}
|
||||
@@ -1136,17 +1286,27 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
|
||||
if ((TFTstate != ANYCUBIC_TFT_STATE_SDOUTAGE))
|
||||
{
|
||||
starpos = (strchr(TFTstrchr_pointer + 4, '*'));
|
||||
|
||||
if (TFTstrchr_pointer[4] == '/')
|
||||
{
|
||||
strcpy(SelectedDirectory, TFTstrchr_pointer + 5);
|
||||
strcpy(currentTouchscreenSelection, TFTstrchr_pointer + 5);
|
||||
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOPAIR(" TFT Serial Debug: currentTouchscreenSelection: ",currentTouchscreenSelection);
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
}
|
||||
else if (TFTstrchr_pointer[4] == '<')
|
||||
{
|
||||
strcpy(SelectedDirectory, TFTstrchr_pointer + 4);
|
||||
strcpy(currentTouchscreenSelection, TFTstrchr_pointer + 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectedDirectory[0] = 0;
|
||||
currentTouchscreenSelection[0] = 0;
|
||||
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Normal file open path");
|
||||
#endif
|
||||
|
||||
if (starpos != NULL)
|
||||
*(starpos - 1) = '\0';
|
||||
@@ -1407,30 +1567,52 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
|
||||
break;
|
||||
case 26: // A26 refresh SD
|
||||
#ifdef SDSUPPORT
|
||||
if (SelectedDirectory[0] == 0)
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOPAIR(" TFT Serial Debug: currentTouchscreenSelection: ",currentTouchscreenSelection);
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
if (currentTouchscreenSelection[0] == 0)
|
||||
{
|
||||
card.mount();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((SelectedDirectory[0] == '.') && (SelectedDirectory[1] == '.'))
|
||||
if ((strcasestr(currentTouchscreenSelection, SM_DIR_UP_S) != NULL)
|
||||
|| (strcasestr(currentTouchscreenSelection, SM_DIR_UP_L) != NULL))
|
||||
{
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Directory UP (cd ..)");
|
||||
#endif
|
||||
card.cdup();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SelectedDirectory[0] == '<')
|
||||
if (currentTouchscreenSelection[0] == '<')
|
||||
{
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Enter Special Menu");
|
||||
#endif
|
||||
HandleSpecialMenu();
|
||||
}
|
||||
else
|
||||
{
|
||||
card.cd(SelectedDirectory);
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Not a menu. Must be a directory!");
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
||||
strcpy(currentFileOrDirectory, currentTouchscreenSelection);
|
||||
int currentFileLen = strlen(currentFileOrDirectory);
|
||||
currentFileOrDirectory[currentFileLen - 4] = '\0';
|
||||
card.cd(currentFileOrDirectory);
|
||||
#else
|
||||
card.cd(currentTouchscreenSelection);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SelectedDirectory[0] = 0;
|
||||
currentTouchscreenSelection[0] = 0;
|
||||
|
||||
if (!IS_SD_INSERTED())
|
||||
{
|
||||
@@ -1464,19 +1646,22 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
TFTbufindw = (TFTbufindw + 1) % TFTBUFSIZE;
|
||||
TFTbuflen += 1;
|
||||
serial3_count = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
TFTcmdbuffer[TFTbufindw][serial3_count++] = serial3_char;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
TFTbufindw = (TFTbufindw + 1)%TFTBUFSIZE;
|
||||
TFTbuflen += 1;
|
||||
}
|
||||
serial3_count = 0; //clear buffer
|
||||
}
|
||||
else
|
||||
{
|
||||
if(serial3_char == ';') TFTcomment_mode = true;
|
||||
if(!TFTcomment_mode) TFTcmdbuffer[TFTbufindw][serial3_count++] = serial3_char;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void AnycubicTouchscreenClass::CommandScan()
|
||||
{
|
||||
CheckHeaterError();
|
||||
|
@@ -33,7 +33,8 @@ char *ftostr32(const float &);
|
||||
|
||||
#define TFTBUFSIZE 4
|
||||
#define TFT_MAX_CMD_SIZE 96
|
||||
#define MSG_MY_VERSION "V116"
|
||||
#define MSG_MY_VERSION CUSTOM_BUILD_VERSION
|
||||
#define MAX_PRINTABLE_FILENAME_LEN 30
|
||||
|
||||
#define ANYCUBIC_TFT_STATE_IDLE 0
|
||||
#define ANYCUBIC_TFT_STATE_SDPRINT 1
|
||||
@@ -43,6 +44,97 @@ char *ftostr32(const float &);
|
||||
#define ANYCUBIC_TFT_STATE_SDSTOP_REQ 5
|
||||
#define ANYCUBIC_TFT_STATE_SDOUTAGE 99
|
||||
|
||||
#if DISABLED(KNUTWURST_DGUS2_TFT)
|
||||
#define SM_DIR_UP_L "/.."
|
||||
#define SM_DIR_UP_S ".."
|
||||
#define SM_SPECIAL_MENU_L "<Special Menu>"
|
||||
#define SM_SPECIAL_MENU_S "<SPECI~1.GCO"
|
||||
#define SM_PID_HOTEND_L "<PID Tune Hotend>"
|
||||
#define SM_PID_HOTEND_S "<PIDTU~1.GCO"
|
||||
#define SM_PID_BED_L "<PID Tune Ultrabase>"
|
||||
#define SM_PID_BED_S "<PIDTU~2.GCO"
|
||||
#define SM_SAVE_EEPROM_L "<Save EEPROM>"
|
||||
#define SM_SAVE_EEPROM_S "<SAVEE~1.GCO"
|
||||
#define SM_LOAD_DEFAULTS_L "<Load FW Defaults>"
|
||||
#define SM_LOAD_DEFAULTS_S "<LOADF~1.GCO"
|
||||
#define SM_PREHEAT_BED_L "<Preheat Ultrabase>"
|
||||
#define SM_PREHEAT_BED_S "<PREHE~1.GCO"
|
||||
#define SM_MESH_START_L "<Start Mesh Leveling>"
|
||||
#define SM_MESH_START_S "<START~1.GCO"
|
||||
#define SM_MESH_NEXT_L "<Next Mesh Point>"
|
||||
#define SM_MESH_NEXT_S "<NEXTM~1.GCO"
|
||||
#define SM_Z_UP_01_L "<Z Up 0.1>"
|
||||
#define SM_Z_UP_01_S "<ZUP01~1.GCO"
|
||||
#define SM_Z_DN_01_L "<Z Down 0.1>"
|
||||
#define SM_Z_DN_01_S "<ZDOWN~1.GCO"
|
||||
#define SM_Z_UP_002_L "<Z Up 0.02>"
|
||||
#define SM_Z_UP_002_S "<ZUP00~1.GCO"
|
||||
#define SM_Z_DN_002_L "<Z Down 0.02>"
|
||||
#define SM_Z_DN_002_S "<ZDOWN~2.GCO"
|
||||
#define SM_Z_UP_001_L "<Z Up 0.01>"
|
||||
#define SM_Z_UP_001_S "<ZUP00~2.GCO"
|
||||
#define SM_Z_DN_001_L "<Z Down 0.01>"
|
||||
#define SM_Z_DN_001_S "<ZDOWN~3.GCO"
|
||||
#define SM_BLTOUCH_L "<BLTouch Leveling>"
|
||||
#define SM_BLTOUCH_S "<BLTOU~1.GCO"
|
||||
#define SM_PAUSE_L "<Fil. Change Pause>"
|
||||
#define SM_PAUSE_S "<FILCH~2.GCO"
|
||||
#define SM_RESUME_L "<Fil. Change Resume>"
|
||||
#define SM_RESUME_S "<FILCH~1.GCO"
|
||||
#define SM_DIS_FILSENS_L "<Disable Fil. Sensor>"
|
||||
#define SM_DIS_FILSENS_S "<DISAB~1.GCO"
|
||||
#define SM_EN_FILSENS_L "<Enable Fil. Sensor>"
|
||||
#define SM_EN_FILSENS_S "<ENABL~1.GCO"
|
||||
#define SM_EXIT_L "<Exit>"
|
||||
#define SM_EXIT_S "<EXIT_~1.GCO"
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
||||
#define SM_DIR_UP_L "<<<<<<.gcode"
|
||||
#define SM_DIR_UP_S "DIR_UP~1.GCO"
|
||||
#define SM_SPECIAL_MENU_L "<Special Menu>.gcode"
|
||||
#define SM_SPECIAL_MENU_S "<SPECI~1.GCO"
|
||||
#define SM_PID_HOTEND_L "<PID Tune Hotend>.gcode"
|
||||
#define SM_PID_HOTEND_S "<PIDTU~1.GCO"
|
||||
#define SM_PID_BED_L "<PID Tune Ultrabase>.gcode"
|
||||
#define SM_PID_BED_S "<PIDTU~2.GCO"
|
||||
#define SM_SAVE_EEPROM_L "<Save EEPROM>.gcode"
|
||||
#define SM_SAVE_EEPROM_S "<SAVEE~1.GCO"
|
||||
#define SM_LOAD_DEFAULTS_L "<Load FW Defaults>.gcode"
|
||||
#define SM_LOAD_DEFAULTS_S "<LOADF~1.GCO"
|
||||
#define SM_PREHEAT_BED_L "<Preheat Ultrabase>.gcode"
|
||||
#define SM_PREHEAT_BED_S "<PREHE~1.GCO"
|
||||
#define SM_MESH_START_L "<Start Mesh Leveling>.gcode"
|
||||
#define SM_MESH_START_S "<START~1.GCO"
|
||||
#define SM_MESH_NEXT_L "<Next Mesh Point>.gcode"
|
||||
#define SM_MESH_NEXT_S "<NEXTM~1.GCO"
|
||||
#define SM_Z_UP_01_L "<Z Up 0.1>.gcode"
|
||||
#define SM_Z_UP_01_S "<ZUP01~1.GCO"
|
||||
#define SM_Z_DN_01_L "<Z Down 0.1>.gcode"
|
||||
#define SM_Z_DN_01_S "<ZDOWN~1.GCO"
|
||||
#define SM_Z_UP_002_L "<Z Up 0.02>.gcode"
|
||||
#define SM_Z_UP_002_S "<ZUP00~1.GCO"
|
||||
#define SM_Z_DN_002_L "<Z Down 0.02>.gcode"
|
||||
#define SM_Z_DN_002_S "<ZDOWN~2.GCO"
|
||||
#define SM_Z_UP_001_L "<Z Up 0.01>.gcode"
|
||||
#define SM_Z_UP_001_S "<ZUP00~2.GCO"
|
||||
#define SM_Z_DN_001_L "<Z Down 0.01>.gcode"
|
||||
#define SM_Z_DN_001_S "<ZDOWN~3.GCO"
|
||||
#define SM_BLTOUCH_L "<BLTouch Leveling>.gcode"
|
||||
#define SM_BLTOUCH_S "<BLTOU~1.GCO"
|
||||
#define SM_PAUSE_L "<Fil. Change Pause>.gcode"
|
||||
#define SM_PAUSE_S "<FILCH~2.GCO"
|
||||
#define SM_RESUME_L "<Fil. Change Resume>.gcode"
|
||||
#define SM_RESUME_S "<FILCH~1.GCO"
|
||||
#define SM_DIS_FILSENS_L "<Disable Fil. Sensor>.gcode"
|
||||
#define SM_DIS_FILSENS_S "<DISAB~1.GCO"
|
||||
#define SM_EN_FILSENS_L "<Enable Fil. Sensor>.gcode"
|
||||
#define SM_EN_FILSENS_S "<ENABL~1.GCO"
|
||||
#define SM_EXIT_L "<Exit>.gcode"
|
||||
#define SM_EXIT_S "<EXIT_~1.GCO"
|
||||
#endif
|
||||
|
||||
|
||||
class AnycubicTouchscreenClass
|
||||
{
|
||||
public:
|
||||
@@ -101,7 +193,7 @@ private:
|
||||
|
||||
float CodeValue();
|
||||
bool CodeSeen(char);
|
||||
void AnycubicTouchscreen();
|
||||
void PrintList();
|
||||
void StartPrint();
|
||||
void PausePrint();
|
||||
void StopPrint();
|
||||
@@ -115,9 +207,12 @@ private:
|
||||
void ReheatNozzle();
|
||||
void ParkAfterStop();
|
||||
|
||||
char SelectedDirectory[30];
|
||||
char currentTouchscreenSelection[64];
|
||||
char currentFileOrDirectory[64];
|
||||
uint16_t MyFileNrCnt = 0;
|
||||
uint8_t SpecialMenu = false;
|
||||
uint8_t FilamentSensorEnabled = true;
|
||||
|
||||
|
||||
#if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
|
||||
char FilamentTestStatus = false;
|
||||
|
@@ -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)
|
||||
|
107
README.md
@@ -1,12 +1,15 @@
|
||||
# Knutwurst's i3 MEGA S Firmware (based on Marlin 2.0.5.3)
|
||||
# Knutwurst's i3 MEGA (S/X) Firmware (based on Marlin 2.0.5.4)
|
||||
|
||||
<span style="color: red;">(BITTE GENAU DURCHLESEN! / PLEASE READ CAREFULLY!)</span>
|
||||
|
||||
### Wenn dir gefällt, was ich mache, kannst du mir hier einen Kaffee spendieren*: [](https://paypal.me/oliverkoester)
|
||||
<sub>*Es muss jetzt keine großzügige Spende sein. Ein paar Cent reichen um mir zu zeigen, wer überhaupt Interesse daran hat und wem die Weiterentwicklung wichtig ist. So bleibt die Motivation da und ich weiß einfach, dass ich nicht für die Tonne programmiere ;)<sub>
|
||||
|
||||
## Readme - German (english below)
|
||||
|
||||
Diese Firmwarekonfiguration aktiviert viele neue erweitere Funktionen der Marlin Firmware:
|
||||
|
||||
* Mesh-Bed Kalibrierung
|
||||
* Mesh-Bed Kalibrierung / Autokalibrierung mit BLTouch (WiP)
|
||||
* S-Kurven Beschleunigung
|
||||
* "Juction Deviation" statt des klassischen "Jerk"
|
||||
* "Linear Pressure Control v1.5" aktiviert (kann mit M900 konfiguriert werden)
|
||||
@@ -14,11 +17,15 @@ Diese Firmwarekonfiguration aktiviert viele neue erweitere Funktionen der Marlin
|
||||
* Bilinear Bed Leveling (BBL)
|
||||
* Manuelles Editieren der Messpunkte
|
||||
* Volle Anycubic Touchscreen Unterstützung
|
||||
* Spannung vom Bauteillüfter von 8V auf 12V
|
||||
* Unterstützung des neuen Anycubic Touchscreens (DGUS II)
|
||||
* Bauteilkühler läuft nun auf 100% statt maximal 70%
|
||||
* Pause & Filamentwechselfunktion
|
||||
* Automatische EEPROM Initialisierung
|
||||
* Filament Runout Sensor kann im Menü deaktiviert werden
|
||||
* Wiederaufnahme des Drucks nach Stromausfall (WiP)
|
||||
* Druckbettgröße erweitert auf 220 x 225 x 210 mm
|
||||
* Automatischer 'Slowdown', falls Daten nicht schnell genug fließen
|
||||
|
||||
|
||||
Besser im Vergleich zu anderen Firmwares (Bugfixes):
|
||||
* Aufgeräumtes Special-Menü
|
||||
@@ -43,6 +50,14 @@ Bekannte Bugs:
|
||||
|
||||
Weil ich bisher keine gesehen habe, die nicht die blöden Bugs enthält, wie z.B. dass sie abstürzt, wenn man Dateien mit Sonderzeichen auf der SD Karte hat.
|
||||
|
||||
>Ist es richtig, dass du mehr Wert auf den Druck von SD-Karte legst und andere eher auf USB?
|
||||
|
||||
ich lege nicht "mehr Wert auf SD", sondern habe einfach die zahlreichen Bugs dahingehend gefixed. Die kleinen Anpassungen mit dem USB Puffer etc sind sowieso drin. Die sind aber in meinen Augen so uninteressant, dass ich es nicht erwähne, denn das wirklich komplizierte ist es, das proprietäre Display und den Cardreader korrekt anzusteuern. Alles andere ist Pillepalle.
|
||||
|
||||
>Was ist dieser "Slowdown"?
|
||||
|
||||
Der automatische Slowdown wird aktiv, falls der Drucker nicht schnell genug Daten bekommt. Dann fährt er automatisch mit der Geschwindigkeit auf 50% runter, satt unbehelligt weiterzumachen und dann zu ruckeln und Blobs zu verursachen.
|
||||
|
||||
>Wieso ist mein Drucker plötzlich lauter als vorher?
|
||||
|
||||
Dein Bauteillüfter läuft jetzt mit voller Drehzahl, was er vorher nicht tat. Stelle im Slicer (z.B. Cura) die Geschwindigkeit einfach auf 70% und schon hast du die alte Lautstärke wieder. Diese Modifikation ist notwendig, falls man den Lüfter tauschen möchte und viele Lüfter mit den originalen 8V nicht oder nur unzureichend laufen.
|
||||
@@ -75,15 +90,37 @@ Nein. Du hast die Treiber falsch herum eingebaut. Jetzt ist die Z-Diode (733A) v
|
||||
|
||||
Nein, lade dir einfach die korrekte Version herunter. Trotzdem solltest du die Steps noch kalibrieren.
|
||||
|
||||
>Wieso zeigt das Display keine Fehlermeldungen an und wieso sieht es noch genau so aus wie vorher?
|
||||
|
||||
Dein Mainboard (Trigorilla) kann nur Grafikdisplays wie das 2004 oder 12864 ansteuern. Auf denen würdest du auch exakt das sehen, was in der Firmware wirklich passiert - eben weil diese das anzeigen, was die Firmware sagt. Texte, Fehlermeldungen etc...
|
||||
|
||||
Bei deinem (und auch allen anderen) Touchdisplay sieht das anders aus. Das Touch-Display ist nur eine hübsche Aufmachung und übersetzt intern die eigentlichen Befehle in etwas, was das Mainboard versteht. Es ist bloß eine "Maske" für die eigentliche Firmware.
|
||||
|
||||
Es besteht ein 1-zu-1 Mapping zwischen den Befehlen, die das Mainboard umsetzen kann (Setze Temperatur auf Wert x, Bewege Motor um 10 mm nach rechts etc). Stellst du die Temperatur im Display auf 200°C ein, schickst du eigentlich nur einen Gcode wie z.B. "M104 T1 S200", was schon im Display vorhanden sein muss.
|
||||
|
||||
Bei diesem Mapping ist man eben darauf angewiesen, dass die Funktionen, die man nutzen will, auch im Display vorhanden sind. Und leider ist nicht viel drin. Die Dateiliste ist das einzige(!) über das man einigermaßen die Kontrolle hat, da sie dynamisch angezeigt wird. Leider muss man deswegen leider auch diese dämlichen Eigenarten in Kauf nehmen, wie die Tatsache, dass nach einem Bestätigen/Aktualisieren die Liste neu aufgebaut wird und somit oben beginnt.
|
||||
|
||||
---
|
||||
|
||||
### Bilder
|
||||
### Bilder - Special Menu
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
### Bilder - Manual Mesh Beld Leveling
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### Bilder - BLTouch Beld Leveling
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
@@ -99,16 +136,20 @@ Du kannst die fertigen Binärdateien hier herunterladen: https://github.com/knut
|
||||
|
||||
-> `i3_Mega_S_TMC.hex` benutzt du, wenn du sowohl die "S" Version mit Titan-Extruder und TMC Motortreiber verwendest.
|
||||
|
||||
-> `i3_Mega_S_DGUS.hex` wird verwendet, wenn du den neuere "S" Version mit Titan-Extruder und außerdem auch das neue Display in blau/gelb besitzt.
|
||||
|
||||
-> `i3_Mega_S_DGUS_TMC.hex` benutzt du, wenn du sowohl die "S" Version mit Titan-Extruder, neuem TFT in blau/gelb und TMC Motortreiber verwendest.
|
||||
|
||||
---
|
||||
|
||||
### If you like what I do you can buy me a coffee: [](https://paypal.me/oliverkoester)
|
||||
<sub>*It doesn't have to be a generous donation. A few cents are enough to show me who is interested in further development. So the motivation stays and I just know that I am not programming for the bin ;)<sub>
|
||||
|
||||
## Readme - English
|
||||
|
||||
|
||||
|
||||
This firmware configuration activates many new features of the Marlin firmware:
|
||||
|
||||
* Mesh bed calibration
|
||||
* Mesh bed calibration / Auto calibration with BLTouch (WiP)
|
||||
* S-curve acceleration
|
||||
* "Juction Deviation" instead of the classic "Jerk"
|
||||
* "Linear Pressure Control v1.5" enabled (can be configured with M900)
|
||||
@@ -116,10 +157,14 @@ This firmware configuration activates many new features of the Marlin firmware:
|
||||
* Bilinear Bed Leveling (BBL)
|
||||
* Manual editing of the measuring points
|
||||
* Full Anycubic touchscreen support
|
||||
* Support for the new Anycubic Touchscreen (DGUS II)
|
||||
* Part cooling fan now runs at 100% instead of 70%
|
||||
* Pause & filament change function
|
||||
* Automatic EEPROM initialization
|
||||
* Filament Runout Sensor can be deactivated in the menu
|
||||
* Power outage support
|
||||
* Print bed size enlarged to 220 x 225 x 210 mm
|
||||
* Automatic slowdown in if the data is not received fast enough
|
||||
|
||||
What's better in coparison to other firmwares (bug fixes):
|
||||
* Tidy special menu
|
||||
@@ -144,6 +189,14 @@ Known bugs:
|
||||
|
||||
Because I've never seen one that doesn't contain the stupid bugs like the crashes when you have files with special characters on the SD card.
|
||||
|
||||
> Is it correct that you put more emphasis on printing from SD card and others more on USB?
|
||||
|
||||
I don't put "more emphasis on SD", but just fixed the numerous bugs. The small adjustments with the USB buffer etc are included anyway. But they are so uninteresting in my eyes that I don't mention it, because the really complicated thing is to control the proprietary display and the card reader correctly. Everything else is easy-peasy.
|
||||
|
||||
> What is this "slowdown"?
|
||||
|
||||
The automatic slowdown is activated if the printer does not receive data quickly enough (e.g. via USB). Then it automatically goes down to 50%. This prevents stuttering and eliminated blobs.
|
||||
|
||||
>Why is my printer so much louder than before?
|
||||
|
||||
Your component fan is now running at full speed, which it did no before. Simply set the speed to 70% in the slicer (e.g. Cura) and you will have the old speed again. This modification is necessary if you want to replace the fan. Many aftermarket fans do not run properly or at all with the original 8V.
|
||||
@@ -176,15 +229,38 @@ No. You installed the drivers the wrong way round. Now the Zener diode (733A) is
|
||||
|
||||
No, just download the correct version. Nevertheless, you should still calibrate the e-steps.
|
||||
|
||||
> Why doesn't the display show any error messages and why does it still look exactly as before?
|
||||
|
||||
Your mainboard (Trigorilla) can only control graphic displays like the 2004 or 12864. On them you would also see exactly what really happens in the firmware - to be precise, they show what the firmware says. Texts, error messages etc.
|
||||
|
||||
With your (and all other) touch displays, things look different. The touch display is just a pretty presentation and internally translates the actual commands into something that the motherboard understands. It is just a "mask" for the actual firmware.
|
||||
|
||||
There is a 1-to-1 mapping between the commands that the mainboard has implemented (set temperature to value x, move motor by 10 mm to the right, etc.). If you set the temperature in the display to 200°C, you actually only send a Gcode such as "M104 T1 S200", which must already be on the display firmware.
|
||||
|
||||
With this mapping, you have to rely on the fact that the functions you want to use are also available on the display. And unfortunately there is not much in it. The file list is the only thing(!) over which you have some control because it is displayed dynamically. Unfortunately, you have to accept these stupid idiosyncrasies, such as the fact that after confirming/updating the list is rebuilt and thus starts at the top.
|
||||
|
||||
---
|
||||
|
||||
### Pictures
|
||||
### Pictures - Special Menu
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
### Pictures - Manual Mesh Beld Leveling
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### Pictures - BLTouch Beld Leveling
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
@@ -199,5 +275,8 @@ You can download the precompiled binary files from here: https://github.com/knut
|
||||
-> `i3_Mega_S.hex` is used if you use the newer "S" version with titan extruder.
|
||||
|
||||
-> `i3_Mega_S_TMC.hex` you use if you use both the "S" version with titan extruder and TMC motor driver.
|
||||
-> `i3_Mega_S_DGUS.hex` is used if you use the newer "S" version with titan extruder and also the newer DGUS TFT with blue/yellow colors.
|
||||
|
||||
-> `i3_Mega_S_DGUS_TMC.hex` you use if you use the newest "S" version with titan extruder and TMC motor driver and also the new blue/yellow TFT.
|
||||
|
||||
|
||||
|
BIN
images/BL_Page1.jpg
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
images/BL_Page2.jpg
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
images/MN_Page1.jpg
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
images/MN_Page2.jpg
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
images/MN_Page3.jpg
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
images/MN_Page4.jpg
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
images/MenuHome.jpg
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
images/SpecialMenu.jpg
Normal file
After Width: | Height: | Size: 57 KiB |
106
platformio.ini
@@ -25,16 +25,16 @@ default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
|
||||
extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
|
||||
build_flags = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-all-constants
|
||||
lib_deps =
|
||||
LiquidCrystal
|
||||
TMCStepper@>=0.6.2,<1.0.0
|
||||
Adafruit NeoPixel
|
||||
U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip
|
||||
Adafruit_MAX31865=https://github.com/adafruit/Adafruit_MAX31865/archive/master.zip
|
||||
LiquidTWI2=https://github.com/lincomatic/LiquidTWI2/archive/master.zip
|
||||
Arduino-L6470=https://github.com/ameyer/Arduino-L6470/archive/0.8.0.zip
|
||||
LiquidCrystal@1.5.0
|
||||
TMCStepper@~0.7.1
|
||||
Adafruit NeoPixel@1.5.0
|
||||
U8glib-HAL@0.4.1
|
||||
Adafruit MAX31865 library@~1.1.0
|
||||
LiquidTWI2@1.2.7
|
||||
Arduino-L6470@0.8.0
|
||||
SlowSoftI2CMaster
|
||||
SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
|
||||
SailfishRGB_LED=https://github.com/mikeshub/SailfishRGB_LED/archive/master.zip
|
||||
SlowSoftI2CMaster=https://github.com/mikeshub/SlowSoftI2CMaster/archive/master.zip
|
||||
|
||||
# Globally defined properties
|
||||
# inherited by all environments
|
||||
@@ -221,10 +221,10 @@ lib_compat_mode = strict
|
||||
extra_scripts = Marlin/src/HAL/LPC1768/upload_extra_script.py
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/LPC1768>
|
||||
lib_deps = Servo
|
||||
LiquidCrystal
|
||||
U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip
|
||||
TMCStepper@>=0.6.1,<1.0.0
|
||||
Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/release.zip
|
||||
LiquidCrystal@1.0.0
|
||||
U8glib-HAL@0.4.1
|
||||
TMCStepper@~0.7.1
|
||||
Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip
|
||||
SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
|
||||
|
||||
[env:LPC1769]
|
||||
@@ -239,17 +239,17 @@ lib_compat_mode = strict
|
||||
extra_scripts = Marlin/src/HAL/LPC1768/upload_extra_script.py
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/LPC1768>
|
||||
lib_deps = Servo
|
||||
LiquidCrystal
|
||||
U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip
|
||||
TMCStepper@>=0.6.1,<1.0.0
|
||||
Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/release.zip
|
||||
LiquidCrystal@1.0.0
|
||||
U8glib-HAL@0.4.1
|
||||
TMCStepper@~0.7.1
|
||||
Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip
|
||||
SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
|
||||
|
||||
#
|
||||
# STM32F103RC
|
||||
#
|
||||
[env:STM32F103RC]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103RC
|
||||
platform_packages = tool-stm32duino
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
@@ -265,7 +265,7 @@ monitor_speed = 115200
|
||||
# STM32F103RC_fysetc
|
||||
#
|
||||
[env:STM32F103RC_fysetc]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103RC
|
||||
#board_build.core = maple
|
||||
platform_packages = tool-stm32duino
|
||||
@@ -291,7 +291,7 @@ upload_protocol = serial
|
||||
#
|
||||
|
||||
[env:STM32F103RC_btt]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103RC
|
||||
platform_packages = tool-stm32duino
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
@@ -306,7 +306,7 @@ lib_ignore = Adafruit NeoPixel, SPI
|
||||
monitor_speed = 115200
|
||||
|
||||
[env:STM32F103RC_btt_USB]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103RC
|
||||
platform_packages = tool-stm32duino
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
@@ -321,7 +321,7 @@ lib_ignore = Adafruit NeoPixel, SPI
|
||||
monitor_speed = 115200
|
||||
|
||||
[env:STM32F103RC_btt_512K]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103RC
|
||||
board_upload.maximum_size=524288
|
||||
platform_packages = tool-stm32duino
|
||||
@@ -337,7 +337,7 @@ lib_ignore = Adafruit NeoPixel, SPI
|
||||
monitor_speed = 115200
|
||||
|
||||
[env:STM32F103RC_btt_512K_USB]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103RC
|
||||
board_upload.maximum_size=524288
|
||||
platform_packages = tool-stm32duino
|
||||
@@ -356,7 +356,7 @@ monitor_speed = 115200
|
||||
# STM32F103RE
|
||||
#
|
||||
[env:STM32F103RE]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103RE
|
||||
platform_packages = tool-stm32duino
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
@@ -373,7 +373,7 @@ monitor_speed = 115200
|
||||
# STM32F103RE_btt_USB ......... RET6 (USB mass storage)
|
||||
#
|
||||
[env:STM32F103RE_btt]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103RE
|
||||
platform_packages = tool-stm32duino
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
@@ -389,7 +389,7 @@ upload_protocol = stlink
|
||||
monitor_speed = 115200
|
||||
|
||||
[env:STM32F103RE_btt_USB]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103RE
|
||||
platform_packages = tool-stm32duino
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
@@ -408,7 +408,7 @@ monitor_speed = 115200
|
||||
# STM32F4 with STM32GENERIC
|
||||
#
|
||||
[env:STM32F4]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = disco_f407vg
|
||||
build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F4 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB -DHAL_IWDG_MODULE_ENABLED
|
||||
lib_ignore = Adafruit NeoPixel, TMCStepper
|
||||
@@ -418,7 +418,7 @@ src_filter = ${common.default_src_filter} +<src/HAL/STM32_F4_F7> -<src/HAL/ST
|
||||
# STM32F7 with STM32GENERIC
|
||||
#
|
||||
[env:STM32F7]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = remram_v1
|
||||
build_flags = ${common.build_flags} -DUSE_STM32GENERIC -DSTM32GENERIC -DSTM32F7 -DMENU_USB_SERIAL -DMENU_SERIAL=SerialUSB -DHAL_IWDG_MODULE_ENABLED
|
||||
lib_ignore = Adafruit NeoPixel, TMCStepper
|
||||
@@ -428,7 +428,7 @@ src_filter = ${common.default_src_filter} +<src/HAL/STM32_F4_F7> -<src/HAL/ST
|
||||
# ARMED (STM32)
|
||||
#
|
||||
[env:ARMED]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = armed_v1
|
||||
build_flags = ${common.build_flags}
|
||||
-DUSBCON -DUSBD_VID=0x0483 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="ARMED_V1"' -DUSBD_USE_CDC
|
||||
@@ -441,7 +441,7 @@ src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
||||
# Geeetech GTM32 (STM32F103VET6)
|
||||
#
|
||||
[env:STM32F103VE_GTM32]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103VE
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
${common.build_flags} -DDEBUG_LEVEL=DEBUG_NONE -std=gnu++14 -MMD -ffunction-sections -fdata-sections -nostdlib
|
||||
@@ -456,7 +456,7 @@ upload_protocol = serial
|
||||
# Longer 3D board in Alfawise U20 (STM32F103VET6)
|
||||
#
|
||||
[env:STM32F103VE_longer]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103VE
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
${common.build_flags} -std=gnu++14 -USERIAL_USB
|
||||
@@ -470,7 +470,7 @@ lib_ignore = Adafruit NeoPixel, LiquidTWI2, SPI
|
||||
# MKS Robin Mini (STM32F103VET6)
|
||||
#
|
||||
[env:mks_robin_mini]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103VE
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
${common.build_flags} -std=gnu++14
|
||||
@@ -483,7 +483,7 @@ lib_ignore = Adafruit NeoPixel, SPI
|
||||
# MKS Robin Nano (STM32F103VET6)
|
||||
#
|
||||
[env:mks_robin_nano]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103VE
|
||||
platform_packages = tool-stm32duino
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
@@ -499,7 +499,7 @@ lib_ignore = Adafruit NeoPixel, SPI
|
||||
# MKS Robin (STM32F103ZET6)
|
||||
#
|
||||
[env:mks_robin]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103ZE
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
${common.build_flags} -std=gnu++14 -DHAVE_SW_SERIAL -DSS_TIMER=4 -DSTM32_XL_DENSITY
|
||||
@@ -514,7 +514,7 @@ lib_ignore = Adafruit NeoPixel, SPI
|
||||
# MKS Robin Pro (STM32F103ZET6)
|
||||
#
|
||||
[env:mks_robin_pro]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103ZE
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_pro.py
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
@@ -528,7 +528,7 @@ lib_ignore = Adafruit NeoPixel, SPI, TMCStepper
|
||||
# MKS Robin Lite/Lite2 (STM32F103RCT6)
|
||||
#
|
||||
[env:mks_robin_lite]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103RC
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
${common.build_flags} -std=gnu++14
|
||||
@@ -541,7 +541,7 @@ lib_ignore = Adafruit NeoPixel, SPI
|
||||
# MKS ROBIN LITE3 (STM32F103RCT6)
|
||||
#
|
||||
[env:mks_robin_lite3]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103RC
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
@@ -555,7 +555,7 @@ lib_ignore = Adafruit NeoPixel, SPI
|
||||
# JGAurora A5S A1 (STM32F103ZET6)
|
||||
#
|
||||
[env:jgaurora_a5s_a1]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103ZE
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
${common.build_flags} -DSTM32F1xx -std=gnu++14 -DSTM32_XL_DENSITY
|
||||
@@ -568,7 +568,7 @@ lib_ignore = Adafruit NeoPixel, SPI
|
||||
# Malyan M200 (STM32F103CB)
|
||||
#
|
||||
[env:STM32F103CB_malyan]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = malyanM200
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py -DMCU_STM32F103CB -D __STM32F1__=1 -std=c++1y -D MOTHERBOARD="BOARD_MALYAN_M200" -DSERIAL_USB -ffunction-sections -fdata-sections -Wl,--gc-sections
|
||||
-DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
|
||||
@@ -579,7 +579,7 @@ lib_ignore = Adafruit NeoPixel, LiquidCrystal, LiquidTWI2, TMCStepper, U8glib-H
|
||||
# Chitu boards like Tronxy X5s (STM32F103ZET6)
|
||||
#
|
||||
[env:chitu_f103]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = genericSTM32F103ZE
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
${common.build_flags} -DSTM32F1xx -std=gnu++14 -DSTM32_XL_DENSITY
|
||||
@@ -593,7 +593,7 @@ lib_ignore = Adafruit NeoPixel
|
||||
# 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html
|
||||
#
|
||||
[env:STM32F401VE_STEVAL]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = STEVAL_STM32F401VE
|
||||
platform_packages = framework-arduinoststm32@>=3.107,<4
|
||||
build_flags = ${common.build_flags}
|
||||
@@ -611,7 +611,7 @@ src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
||||
# FLYF407ZG
|
||||
#
|
||||
[env:FLYF407ZG]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = FLYF407ZG
|
||||
platform_packages = framework-arduinoststm32@>=3.107,<4
|
||||
build_flags = ${common.build_flags}
|
||||
@@ -628,7 +628,7 @@ src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
||||
# FYSETC S6 (STM32F446VET6 ARM Cortex-M4)
|
||||
#
|
||||
[env:FYSETC_S6]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = fysetc_s6
|
||||
platform_packages =
|
||||
tool-stm32duino
|
||||
@@ -651,7 +651,7 @@ upload_protocol = serial
|
||||
# Shield - https://github.com/jmz52/Hardware
|
||||
#
|
||||
[env:STM32F407VE_black]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = blackSTM32F407VET6
|
||||
platform_packages = framework-arduinoststm32@>=3.107,<4
|
||||
build_flags = ${common.build_flags}
|
||||
@@ -667,7 +667,7 @@ src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
||||
# BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
|
||||
#
|
||||
[env:BIGTREE_SKR_PRO]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = BigTree_SKR_Pro
|
||||
platform_packages = framework-arduinoststm32@>=3.107,<4
|
||||
build_flags = ${common.build_flags}
|
||||
@@ -687,7 +687,7 @@ debug_init_break =
|
||||
# Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4)
|
||||
#
|
||||
[env:BIGTREE_GTR_V1_0]
|
||||
platform = ststm32@>=5.7.0
|
||||
platform = ststm32@>=5.7.0,<6.2.0
|
||||
framework = arduino
|
||||
platform_packages = framework-arduinoststm32@>=3.107,<4
|
||||
board = BigTree_SKR_Pro
|
||||
@@ -697,12 +697,12 @@ build_flags = ${common.build_flags}
|
||||
-DTARGET_STM32F4 -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
|
||||
-IMarlin/src/HAL/STM32
|
||||
lib_deps =
|
||||
U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip
|
||||
LiquidCrystal
|
||||
TMCStepper@>=0.5.2,<1.0.0
|
||||
Adafruit NeoPixel
|
||||
LiquidTWI2=https://github.com/lincomatic/LiquidTWI2/archive/master.zip
|
||||
Arduino-L6470=https://github.com/ameyer/Arduino-L6470/archive/0.7.0.zip
|
||||
U8glib-HAL@0.4.1
|
||||
LiquidCrystal@1.5.0
|
||||
TMCStepper@~0.7.1
|
||||
Adafruit NeoPixel@1.5.0
|
||||
LiquidTWI2@1.2.7
|
||||
Arduino-L6470@0.8.0
|
||||
lib_ignore = SoftwareSerial, SoftwareSerialM
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
||||
monitor_speed = 250000
|
||||
@@ -799,7 +799,7 @@ debug_tool = jlink
|
||||
# RUMBA32
|
||||
#
|
||||
[env:rumba32_f446ve]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = rumba32_f446ve
|
||||
build_flags = ${common.build_flags}
|
||||
-DSTM32F4xx
|
||||
@@ -825,7 +825,7 @@ upload_protocol = dfu
|
||||
# MKS RUMBA32 (adds TMC2208/2209 UART interface and AUX-1)
|
||||
#
|
||||
[env:rumba32_mks]
|
||||
platform = ststm32
|
||||
platform = ststm32@<6.2.0
|
||||
board = rumba32_f446ve
|
||||
build_flags = ${common.build_flags}
|
||||
-DSTM32F4xx -DARDUINO_RUMBA32_F446VE -DARDUINO_ARCH_STM32 "-DBOARD_NAME=\"RUMBA32_F446VE\""
|
||||
|