Compare commits
47 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
04fcfa3b30 | ||
|
3eff63185d | ||
|
533d44bf94 | ||
|
ad974e176c | ||
|
f8208b7e5e | ||
|
f1dc45dcd3 | ||
|
978403d1c8 | ||
|
59ec01bdd1 | ||
|
8b3b4c47cf | ||
|
85bac6b396 | ||
|
2e1c2343cb | ||
|
8aa79ade6a | ||
|
0b48145044 | ||
|
28993ec8b6 | ||
|
cf29882768 | ||
|
b16342e759 | ||
|
6bc23bb27e | ||
|
d85ebb2506 | ||
|
4ad1429c5b | ||
|
1729115a07 | ||
|
01a8239da3 | ||
|
e2c1dd0b3c | ||
|
1a8d83556a | ||
|
923693fc14 | ||
|
39deaa0fc0 | ||
|
096caa47ed | ||
|
01272e0626 | ||
|
cd7cd794dc | ||
|
6b2ad60d47 | ||
|
1ecca13347 | ||
|
856f20dd26 | ||
|
8fc3d6eaa0 | ||
|
918820850e | ||
|
d464e036e0 | ||
|
92bfd1b495 | ||
|
b3f4dcb2d1 | ||
|
35656c7782 | ||
|
a0618b4a1e | ||
|
b740c9f747 | ||
|
4d953f30f8 | ||
|
a0b9947172 | ||
|
5cbf59285d | ||
|
6adfa4571e | ||
|
0cb10a5255 | ||
|
d5e526cc02 | ||
|
c06c1f37a4 | ||
|
6e74183381 |
@@ -176,7 +176,23 @@
|
||||
* Select a secondary serial port on the board to use for communication with the host.
|
||||
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
|
||||
*/
|
||||
//#define SERIAL_PORT_2 -1
|
||||
#define SERIAL_PORT_2 2 // D16(RX) + D17(TX)
|
||||
|
||||
/* EXP1 Header
|
||||
|
||||
---------------
|
||||
|| D37 D35 ||
|
||||
|| ||
|
||||
|| [D17] [D16] || <---- Connect your ESP8266 here (TX/RX)
|
||||
/|| ||
|
||||
||| D23 D25 ||
|
||||
\|| ||
|
||||
|| D27 D29 ||
|
||||
|| ||
|
||||
|| GND 5V ||
|
||||
---------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* This setting determines the communication speed of the printer.
|
||||
@@ -188,6 +204,7 @@
|
||||
* :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]
|
||||
*/
|
||||
#define BAUDRATE 250000
|
||||
#define BAUDRATE_2 500000 // For ESP8266
|
||||
|
||||
// Enable the Bluetooth serial interface on AT90USB devices
|
||||
//#define BLUETOOTH
|
||||
@@ -1043,7 +1060,7 @@
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_CHIRON)
|
||||
#define DEFAULT_EJERK 15.0 // May be used by Linear Advance
|
||||
#define DEFAULT_EJERK 8.0 // May be used by Linear Advance
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -1107,11 +1124,12 @@
|
||||
* - For simple switches connect...
|
||||
* - normally-closed switches to GND and D32.
|
||||
* - normally-open switches to 5V and D32.
|
||||
*
|
||||
* If you need to change the Z_MIN_PROBE_PIN, please do this
|
||||
* in the file pins_RAMPS.h or pins_RAMPS_CHIRON.h !
|
||||
*
|
||||
*/
|
||||
#if ENABLED(KNUTWURST_BLTOUCH, KNUTWURST_CHIRON)
|
||||
#define Z_MIN_PROBE_PIN 2 // Pin 32 is the RAMPS default
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Probe Type
|
||||
@@ -1231,7 +1249,7 @@
|
||||
* Specify a Probe position as { X, Y, Z }
|
||||
*/
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
#define NOZZLE_TO_PROBE_OFFSET { -2, -25, 0 } //https://www.thingiverse.com/thing:2824005
|
||||
#define NOZZLE_TO_PROBE_OFFSET { -2, -25, -0.4 } //https://www.thingiverse.com/thing:2824005
|
||||
//#define NOZZLE_TO_PROBE_OFFSET { 29, -15, 0 } //X-Carriage
|
||||
#endif
|
||||
|
||||
@@ -1294,18 +1312,13 @@
|
||||
#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 -10 // Farthest distance below the trigger-point to go before stopping
|
||||
#endif
|
||||
|
||||
#if DISABLED(KNUTWURST_BLTOUCH)
|
||||
#define Z_PROBE_LOW_POINT -12 // Farthest distance below the trigger-point to go before stopping
|
||||
#endif
|
||||
#define Z_PROBE_LOW_POINT -12 // Farthest distance below the trigger-point to go before stopping
|
||||
|
||||
|
||||
// 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
|
||||
#define Z_PROBE_OFFSET_RANGE_MIN -30
|
||||
#define Z_PROBE_OFFSET_RANGE_MAX 30
|
||||
|
||||
// Enable the M48 repeatability test to test probe accuracy
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
|
@@ -786,7 +786,7 @@
|
||||
// Default stepper release if idle. Set to 0 to deactivate.
|
||||
// Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
|
||||
// Time can be set by M18 and M84.
|
||||
#define DEFAULT_STEPPER_DEACTIVE_TIME 0
|
||||
#define DEFAULT_STEPPER_DEACTIVE_TIME 180
|
||||
#define DISABLE_INACTIVE_X true
|
||||
#define DISABLE_INACTIVE_Y true
|
||||
#define DISABLE_INACTIVE_Z true // Set to false if the nozzle will fall down on your printed part when print has finished.
|
||||
@@ -3206,3 +3206,5 @@
|
||||
|
||||
//#define KNUTWURST_MEGAS_ADV
|
||||
//#define KNUTWURST_TMC_ADV
|
||||
|
||||
#define MEATPACK // Support for MeatPack G-code compression (https://github.com/scottmudge/OctoPrint-MeatPack)
|
@@ -994,7 +994,7 @@ void setup() {
|
||||
uint32_t serial_connect_timeout = millis() + 1000UL;
|
||||
while (!MYSERIAL0 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
|
||||
#if NUM_SERIAL > 1
|
||||
MYSERIAL1.begin(BAUDRATE);
|
||||
MYSERIAL1.begin(BAUDRATE_2);
|
||||
serial_connect_timeout = millis() + 1000UL;
|
||||
while (!MYSERIAL1 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
|
||||
#endif
|
||||
|
@@ -29,7 +29,7 @@ static const char errormagic[] PROGMEM = "Error:";
|
||||
static const char echomagic[] PROGMEM = "echo:";
|
||||
|
||||
#if NUM_SERIAL > 1
|
||||
int8_t serial_port_index = 0;
|
||||
serial_index_t serial_port_index = 0;
|
||||
#endif
|
||||
|
||||
void serialprintPGM(PGM_P str) {
|
||||
|
@@ -45,10 +45,10 @@ enum MarlinDebugFlags : uint8_t {
|
||||
|
||||
extern uint8_t marlin_debug_flags;
|
||||
#define DEBUGGING(F) (marlin_debug_flags & (MARLIN_DEBUG_## F))
|
||||
|
||||
typedef int8_t serial_index_t;
|
||||
#define SERIAL_BOTH 0x7F
|
||||
#if NUM_SERIAL > 1
|
||||
extern int8_t serial_port_index;
|
||||
extern serial_index_t serial_port_index;
|
||||
#define _PORT_REDIRECT(n,p) REMEMBER(n,serial_port_index,p)
|
||||
#define _PORT_RESTORE(n) RESTORE(n)
|
||||
#define SERIAL_OUT(WHAT, V...) do{ \
|
||||
|
228
Marlin/src/feature/meatpack.cpp
Normal file
@@ -0,0 +1,228 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2020 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* MeatPack G-code Compression
|
||||
*
|
||||
* Algorithm & Implementation: Scott Mudge - mail@scottmudge.com
|
||||
* Date: Dec. 2020
|
||||
*
|
||||
* Character Frequencies from ~30 MB of comment-stripped gcode:
|
||||
* '1' -> 4451136 '4' -> 1353273 '\n' -> 1087683 '-' -> 90242
|
||||
* '0' -> 4253577 '9' -> 1352147 'G' -> 1075806 'Z' -> 34109
|
||||
* ' ' -> 3053297 '3' -> 1262929 'X' -> 975742 'M' -> 11879
|
||||
* '.' -> 3035310 '5' -> 1189871 'E' -> 965275 'S' -> 9910
|
||||
* '2' -> 1523296 '6' -> 1127900 'Y' -> 965274
|
||||
* '8' -> 1366812 '7' -> 1112908 'F' -> 99416
|
||||
*
|
||||
* When space is omitted the letter 'E' is used in its place
|
||||
*/
|
||||
|
||||
#include "../inc/MarlinConfig.h"
|
||||
|
||||
#if ENABLED(MEATPACK)
|
||||
|
||||
#include "meatpack.h"
|
||||
MeatPack meatpack;
|
||||
|
||||
#define MeatPack_ProtocolVersion "PV01"
|
||||
//#define MP_DEBUG
|
||||
|
||||
#define DEBUG_OUT ENABLED(MP_DEBUG)
|
||||
#include "../core/debug_out.h"
|
||||
|
||||
bool MeatPack::cmd_is_next = false; // A command is pending
|
||||
uint8_t MeatPack::state = 0; // Configuration state OFF
|
||||
uint8_t MeatPack::second_char = 0; // The unpacked 2nd character from an out-of-sequence packed pair
|
||||
uint8_t MeatPack::cmd_count = 0, // Counts how many command bytes are received (need 2)
|
||||
MeatPack::full_char_count = 0, // Counts how many full-width characters are to be received
|
||||
MeatPack::char_out_count = 0; // Stores number of characters to be read out.
|
||||
uint8_t MeatPack::char_out_buf[2]; // Output buffer for caching up to 2 characters
|
||||
|
||||
// The 15 most-common characters used in G-code, ~90-95% of all G-code uses these characters
|
||||
// Stored in SRAM for performance.
|
||||
uint8_t meatPackLookupTable[16] = {
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
'.', ' ', '\n', 'G', 'X',
|
||||
'\0' // Unused. 0b1111 indicates a literal character
|
||||
};
|
||||
|
||||
TERN_(MP_DEBUG, uint8_t chars_decoded = 0); // Log the first 64 bytes after each reset
|
||||
|
||||
void MeatPack::reset_state() {
|
||||
state = 0;
|
||||
cmd_is_next = false;
|
||||
second_char = 0;
|
||||
cmd_count = full_char_count = char_out_count = 0;
|
||||
TERN_(MP_DEBUG, chars_decoded = 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unpack one or two characters from a packed byte into a buffer.
|
||||
* Return flags indicating whether any literal bytes follow.
|
||||
*/
|
||||
uint8_t MeatPack::unpack_chars(const uint8_t pk, uint8_t* __restrict const chars_out) {
|
||||
uint8_t out = 0;
|
||||
|
||||
// If lower nybble is 1111, the higher nybble is unused, and next char is full.
|
||||
if ((pk & kFirstNotPacked) == kFirstNotPacked)
|
||||
out = kFirstCharIsLiteral;
|
||||
else {
|
||||
const uint8_t chr = pk & 0x0F;
|
||||
chars_out[0] = meatPackLookupTable[chr]; // Set the first char
|
||||
}
|
||||
|
||||
// Check if upper nybble is 1111... if so, we don't need the second char.
|
||||
if ((pk & kSecondNotPacked) == kSecondNotPacked)
|
||||
out |= kSecondCharIsLiteral;
|
||||
else {
|
||||
const uint8_t chr = (pk >> 4) & 0x0F;
|
||||
chars_out[1] = meatPackLookupTable[chr]; // Set the second char
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interpret a single (non-command) character
|
||||
* according to the current MeatPack state.
|
||||
*/
|
||||
void MeatPack::handle_rx_char_inner(const uint8_t c) {
|
||||
if (TEST(state, MPConfig_Bit_Active)) { // Is MeatPack active?
|
||||
if (!full_char_count) { // No literal characters to fetch?
|
||||
uint8_t buf[2] = { 0, 0 };
|
||||
register const uint8_t res = unpack_chars(c, buf); // Decode the byte into one or two characters.
|
||||
if (res & kFirstCharIsLiteral) { // The 1st character couldn't be packed.
|
||||
++full_char_count; // So the next stream byte is a full character.
|
||||
if (res & kSecondCharIsLiteral) ++full_char_count; // The 2nd character couldn't be packed. Another stream byte is a full character.
|
||||
else second_char = buf[1]; // Retain the unpacked second character.
|
||||
}
|
||||
else {
|
||||
handle_output_char(buf[0]); // Send the unpacked first character out.
|
||||
if (buf[0] != '\n') { // After a newline the next char won't be set
|
||||
if (res & kSecondCharIsLiteral) ++full_char_count; // The 2nd character couldn't be packed. The next stream byte is a full character.
|
||||
else handle_output_char(buf[1]); // Send the unpacked second character out.
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
handle_output_char(c); // Pass through the character that couldn't be packed...
|
||||
if (second_char) {
|
||||
handle_output_char(second_char); // ...and send an unpacked 2nd character, if set.
|
||||
second_char = 0;
|
||||
}
|
||||
--full_char_count; // One literal character was consumed
|
||||
}
|
||||
}
|
||||
else // Packing not enabled, just copy character to output
|
||||
handle_output_char(c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Buffer a single output character which will be picked up in
|
||||
* GCodeQueue::get_serial_commands via calls to get_result_char
|
||||
*/
|
||||
void MeatPack::handle_output_char(const uint8_t c) {
|
||||
char_out_buf[char_out_count++] = c;
|
||||
|
||||
#if ENABLED(MP_DEBUG)
|
||||
if (chars_decoded < 1024) {
|
||||
++chars_decoded;
|
||||
DEBUG_ECHOPGM("RB: ");
|
||||
MYSERIAL.print((char)c);
|
||||
DEBUG_EOL();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a MeatPack command byte to update the state.
|
||||
* Report the new state to serial.
|
||||
*/
|
||||
void MeatPack::handle_command(const MeatPack_Command c) {
|
||||
switch (c) {
|
||||
case MPCommand_QueryConfig: break;
|
||||
case MPCommand_EnablePacking: SBI(state, MPConfig_Bit_Active); DEBUG_ECHOLNPGM("[MPDBG] ENA REC"); break;
|
||||
case MPCommand_DisablePacking: CBI(state, MPConfig_Bit_Active); DEBUG_ECHOLNPGM("[MPDBG] DIS REC"); break;
|
||||
case MPCommand_ResetAll: reset_state(); DEBUG_ECHOLNPGM("[MPDBG] RESET REC"); break;
|
||||
case MPCommand_EnableNoSpaces:
|
||||
SBI(state, MPConfig_Bit_NoSpaces);
|
||||
meatPackLookupTable[kSpaceCharIdx] = kSpaceCharReplace; DEBUG_ECHOLNPGM("[MPDBG] ENA NSP"); break;
|
||||
case MPCommand_DisableNoSpaces:
|
||||
CBI(state, MPConfig_Bit_NoSpaces);
|
||||
meatPackLookupTable[kSpaceCharIdx] = ' '; DEBUG_ECHOLNPGM("[MPDBG] DIS NSP"); break;
|
||||
default: DEBUG_ECHOLNPGM("[MPDBG] UNK CMD REC");
|
||||
}
|
||||
report_state();
|
||||
}
|
||||
|
||||
void MeatPack::report_state() {
|
||||
// NOTE: if any configuration vars are added below, the outgoing sync text for host plugin
|
||||
// should not contain the "PV' substring, as this is used to indicate protocol version
|
||||
SERIAL_ECHOPGM("[MP] ");
|
||||
SERIAL_ECHOPGM(MeatPack_ProtocolVersion " ");
|
||||
serialprint_onoff(TEST(state, MPConfig_Bit_Active));
|
||||
serialprintPGM(TEST(state, MPConfig_Bit_NoSpaces) ? PSTR(" NSP\n") : PSTR(" ESP\n"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Interpret a single character received from serial
|
||||
* according to the current meatpack state.
|
||||
*/
|
||||
void MeatPack::handle_rx_char(const uint8_t c, const serial_index_t serial_ind) {
|
||||
if (c == kCommandByte) { // A command (0xFF) byte?
|
||||
if (cmd_count) { // In fact, two in a row?
|
||||
cmd_is_next = true; // Then a MeatPack command follows
|
||||
cmd_count = 0;
|
||||
}
|
||||
else
|
||||
++cmd_count; // cmd_count = 1 // One command byte received so far...
|
||||
return;
|
||||
}
|
||||
|
||||
if (cmd_is_next) { // Were two command bytes received?
|
||||
PORT_REDIRECT(serial_ind);
|
||||
handle_command((MeatPack_Command)c); // Then the byte is a MeatPack command
|
||||
cmd_is_next = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (cmd_count) { // Only a single 0xFF was received
|
||||
handle_rx_char_inner(kCommandByte); // A single 0xFF is passed on literally so it can be interpreted as kFirstNotPacked|kSecondNotPacked
|
||||
cmd_count = 0;
|
||||
}
|
||||
|
||||
handle_rx_char_inner(c); // Other characters are passed on for MeatPack decoding
|
||||
}
|
||||
|
||||
uint8_t MeatPack::get_result_char(char* const __restrict out) {
|
||||
uint8_t res = 0;
|
||||
if (char_out_count) {
|
||||
res = char_out_count;
|
||||
char_out_count = 0;
|
||||
for (register uint8_t i = 0; i < res; ++i)
|
||||
out[i] = (char)char_out_buf[i];
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif // MEATPACK
|
123
Marlin/src/feature/meatpack.h
Normal file
@@ -0,0 +1,123 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2020 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* MeatPack G-code Compression
|
||||
*
|
||||
* Algorithm & Implementation: Scott Mudge - mail@scottmudge.com
|
||||
* Date: Dec. 2020
|
||||
*
|
||||
* Specifically optimized for 3D printing G-Code, this is a zero-cost data compression method
|
||||
* which packs ~180-190% more data into the same amount of bytes going to the CNC controller.
|
||||
* As a majority of G-Code can be represented by a restricted alphabet, I performed histogram
|
||||
* analysis on a wide variety of 3D printing gcode samples, and found ~93% of all gcode could
|
||||
* be represented by the same 15-character alphabet.
|
||||
*
|
||||
* This allowed me to design a system of packing 2 8-bit characters into a single byte, assuming
|
||||
* they fall within this limited 15-character alphabet. Using a 4-bit lookup table, these 8-bit
|
||||
* characters can be represented by a 4-bit index.
|
||||
*
|
||||
* Combined with some logic to allow commingling of full-width characters outside of this 15-
|
||||
* character alphabet (at the cost of an extra 8-bits per full-width character), and by stripping
|
||||
* out unnecessary comments, the end result is gcode which is roughly half the original size.
|
||||
*
|
||||
* Why did I do this? I noticed micro-stuttering and other data-bottleneck issues while printing
|
||||
* objects with high curvature, especially at high speeds. There is also the issue of the limited
|
||||
* baud rate provided by Prusa's Atmega2560-based boards, over the USB serial connection. So soft-
|
||||
* ware like OctoPrint would also suffer this same micro-stuttering and poor print quality issue.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* Commands sent to MeatPack to control its behavior.
|
||||
* They are sent by first sending 2x MeatPack_CommandByte (0xFF) in sequence,
|
||||
* followed by one of the command bytes below.
|
||||
* Provided that 0xFF is an exceedingly rare character that is virtually never
|
||||
* present in G-code naturally, it is safe to assume 2 in sequence should never
|
||||
* happen naturally, and so it is used as a signal here.
|
||||
*
|
||||
* 0xFF *IS* used in "packed" G-code (used to denote that the next 2 characters are
|
||||
* full-width), however 2 in a row will never occur, as the next 2 bytes will always
|
||||
* some non-0xFF character.
|
||||
*/
|
||||
enum MeatPack_Command : uint8_t {
|
||||
MPCommand_None = 0,
|
||||
MPCommand_EnablePacking = 0xFB,
|
||||
MPCommand_DisablePacking = 0xFA,
|
||||
MPCommand_ResetAll = 0xF9,
|
||||
MPCommand_QueryConfig = 0xF8,
|
||||
MPCommand_EnableNoSpaces = 0xF7,
|
||||
MPCommand_DisableNoSpaces = 0xF6
|
||||
};
|
||||
|
||||
enum MeatPack_ConfigStateBits : uint8_t {
|
||||
MPConfig_Bit_Active = 0,
|
||||
MPConfig_Bit_NoSpaces = 1
|
||||
};
|
||||
|
||||
class MeatPack {
|
||||
private:
|
||||
friend class GCodeQueue;
|
||||
|
||||
// Utility definitions
|
||||
static const uint8_t kCommandByte = 0b11111111,
|
||||
kFirstNotPacked = 0b00001111,
|
||||
kSecondNotPacked = 0b11110000,
|
||||
kFirstCharIsLiteral = 0b00000001,
|
||||
kSecondCharIsLiteral = 0b00000010;
|
||||
|
||||
static const uint8_t kSpaceCharIdx = 11;
|
||||
static const char kSpaceCharReplace = 'E';
|
||||
|
||||
static bool cmd_is_next; // A command is pending
|
||||
static uint8_t state; // Configuration state
|
||||
static uint8_t second_char; // Buffers a character if dealing with out-of-sequence pairs
|
||||
static uint8_t cmd_count, // Counter of command bytes received (need 2)
|
||||
full_char_count, // Counter for full-width characters to be received
|
||||
char_out_count; // Stores number of characters to be read out.
|
||||
static uint8_t char_out_buf[2]; // Output buffer for caching up to 2 characters
|
||||
|
||||
// Pass in a character rx'd by SD card or serial. Automatically parses command/ctrl sequences,
|
||||
// and will control state internally.
|
||||
static void handle_rx_char(const uint8_t c, const serial_index_t serial_ind);
|
||||
|
||||
/**
|
||||
* After passing in rx'd char using above method, call this to get characters out.
|
||||
* Can return from 0 to 2 characters at once.
|
||||
* @param out [in] Output pointer for unpacked/processed data.
|
||||
* @return Number of characters returned. Range from 0 to 2.
|
||||
*/
|
||||
static uint8_t get_result_char(char* const __restrict out);
|
||||
|
||||
static void reset_state();
|
||||
static void report_state();
|
||||
static uint8_t unpacked_char(register const uint8_t in);
|
||||
static uint8_t unpack_chars(const uint8_t pk, uint8_t* __restrict const chars_out);
|
||||
static void handle_command(const MeatPack_Command c);
|
||||
static void handle_output_char(const uint8_t c);
|
||||
static void handle_rx_char_inner(const uint8_t c);
|
||||
};
|
||||
|
||||
extern MeatPack meatpack;
|
@@ -67,7 +67,7 @@
|
||||
#define G26_ERR true
|
||||
|
||||
#if ENABLED(ARC_SUPPORT)
|
||||
void plan_arc(const xyze_pos_t &cart, const ab_float_t &offset, const uint8_t clockwise);
|
||||
void plan_arc(const xyze_pos_t &cart, const ab_float_t &offset, const bool clockwise, const uint8_t);
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -886,7 +886,7 @@ void GcodeSuite::G26()
|
||||
|
||||
const feedRate_t old_feedrate = feedrate_mm_s;
|
||||
feedrate_mm_s = PLANNER_XY_FEEDRATE() * 0.1f;
|
||||
plan_arc(endpoint, arc_offset, false); // Draw a counter-clockwise arc
|
||||
plan_arc(endpoint, arc_offset, false, 0); // Draw a counter-clockwise arc
|
||||
feedrate_mm_s = old_feedrate;
|
||||
destination = current_position;
|
||||
|
||||
|
@@ -112,5 +112,8 @@ void GcodeSuite::M115() {
|
||||
// CHAMBER_TEMPERATURE (M141, M191)
|
||||
cap_line(PSTR("CHAMBER_TEMPERATURE"), ENABLED(HAS_HEATED_CHAMBER));
|
||||
|
||||
// MEATPACK Compresson
|
||||
cap_line(PSTR("MEATPACK"), ENABLED(MEATPACK));
|
||||
|
||||
#endif // EXTENDED_CAPABILITIES_REPORT
|
||||
}
|
||||
|
@@ -53,7 +53,7 @@ void GcodeSuite::M118() {
|
||||
}
|
||||
|
||||
#if NUM_SERIAL > 1
|
||||
const int8_t old_serial = serial_port_index;
|
||||
const serial_index_t old_serial = serial_port_index;
|
||||
if (WITHIN(port, 0, NUM_SERIAL))
|
||||
serial_port_index = (
|
||||
port == 0 ? SERIAL_BOTH
|
||||
|
@@ -52,7 +52,8 @@
|
||||
void plan_arc(
|
||||
const xyze_pos_t &cart, // Destination position
|
||||
const ab_float_t &offset, // Center of rotation relative to current_position
|
||||
const uint8_t clockwise // Clockwise?
|
||||
const bool clockwise, // Clockwise?
|
||||
const uint8_t circles // Take the scenic route
|
||||
) {
|
||||
#if ENABLED(CNC_WORKSPACE_PLANES)
|
||||
AxisEnum p_axis, q_axis, l_axis;
|
||||
@@ -70,52 +71,90 @@ void plan_arc(
|
||||
ab_float_t rvec = -offset;
|
||||
|
||||
const float radius = HYPOT(rvec.a, rvec.b),
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
start_L = current_position[l_axis],
|
||||
#endif
|
||||
center_P = current_position[p_axis] - rvec.a,
|
||||
center_Q = current_position[q_axis] - rvec.b,
|
||||
rt_X = cart[p_axis] - center_P,
|
||||
rt_Y = cart[q_axis] - center_Q,
|
||||
linear_travel = cart[l_axis] - current_position[l_axis],
|
||||
start_L = current_position[l_axis],
|
||||
linear_travel = cart[l_axis] - start_L,
|
||||
extruder_travel = cart.e - current_position.e;
|
||||
|
||||
// CCW angle of rotation between position and target from the circle center. Only one atan2() trig computation required.
|
||||
float angular_travel = ATAN2(rvec.a * rt_Y - rvec.b * rt_X, rvec.a * rt_X + rvec.b * rt_Y);
|
||||
if (angular_travel < 0) angular_travel += RADIANS(360);
|
||||
#ifdef MIN_ARC_SEGMENTS
|
||||
uint16_t min_segments = CEIL((MIN_ARC_SEGMENTS) * (angular_travel / RADIANS(360)));
|
||||
NOLESS(min_segments, 1U);
|
||||
uint16_t min_segments = MIN_ARC_SEGMENTS;
|
||||
#else
|
||||
constexpr uint16_t min_segments = 1;
|
||||
#endif
|
||||
if (clockwise) angular_travel -= RADIANS(360);
|
||||
|
||||
// Make a circle if the angular rotation is 0 and the target is current position
|
||||
if (angular_travel == 0 && current_position[p_axis] == cart[p_axis] && current_position[q_axis] == cart[q_axis]) {
|
||||
angular_travel = RADIANS(360);
|
||||
// Angle of rotation between position and target from the circle center.
|
||||
float angular_travel, abs_angular_travel;
|
||||
|
||||
// Do a full circle if starting and ending positions are "identical"
|
||||
if (NEAR(current_position[p_axis], cart[p_axis]) && NEAR(current_position[q_axis], cart[q_axis])) {
|
||||
// Preserve direction for circles
|
||||
angular_travel = clockwise ? -RADIANS(360) : RADIANS(360);
|
||||
abs_angular_travel = RADIANS(360);
|
||||
}
|
||||
else {
|
||||
// Calculate the angle
|
||||
angular_travel = ATAN2(rvec.a * rt_Y - rvec.b * rt_X, rvec.a * rt_X + rvec.b * rt_Y);
|
||||
// Angular travel too small to detect? Just return.
|
||||
if (!angular_travel) return;
|
||||
// Make sure angular travel over 180 degrees goes the other way around.
|
||||
switch (((angular_travel < 0) << 1) | clockwise) {
|
||||
case 1: angular_travel -= RADIANS(360); break; // Positive but CW? Reverse direction.
|
||||
case 2: angular_travel += RADIANS(360); break; // Negative but CCW? Reverse direction.
|
||||
}
|
||||
|
||||
abs_angular_travel = ABS(angular_travel);
|
||||
|
||||
#ifdef MIN_ARC_SEGMENTS
|
||||
min_segments = MIN_ARC_SEGMENTS;
|
||||
min_segments = CEIL(min_segments * abs_angular_travel / RADIANS(360));
|
||||
NOLESS(min_segments, 1U);
|
||||
#endif
|
||||
}
|
||||
|
||||
const float flat_mm = radius * angular_travel,
|
||||
mm_of_travel = linear_travel ? HYPOT(flat_mm, linear_travel) : ABS(flat_mm);
|
||||
if (ENABLED(ARC_P_CIRCLES) && circles) {
|
||||
const float total_angular = abs_angular_travel + circles * RADIANS(360), // Total rotation with all circles and remainder
|
||||
part_per_circle = RADIANS(360) / total_angular; // Each circle's part of the total
|
||||
|
||||
#if HAS_Z_AXIS
|
||||
const float l_per_circle = linear_travel * part_per_circle; // L movement per circle
|
||||
#endif
|
||||
#if HAS_EXTRUDERS
|
||||
const float e_per_circle = extruder_travel * part_per_circle; // E movement per circle
|
||||
#endif
|
||||
xyze_pos_t temp_position = current_position; // for plan_arc to compare to current_position
|
||||
for (uint16_t n = circles; n--;) {
|
||||
TERN_(HAS_EXTRUDERS, temp_position.e += e_per_circle); // Destination E axis
|
||||
TERN_(HAS_Z_AXIS, temp_position[l_axis] += l_per_circle); // Destination L axis
|
||||
plan_arc(temp_position, offset, clockwise, 0); // Plan a single whole circle
|
||||
}
|
||||
TERN_(HAS_Z_AXIS, linear_travel = cart[l_axis] - current_position[l_axis]);
|
||||
TERN_(HAS_EXTRUDERS, extruder_travel = cart.e - current_position.e);
|
||||
}
|
||||
|
||||
|
||||
|
||||
const float flat_mm = radius * abs_angular_travel,
|
||||
mm_of_travel = linear_travel ? HYPOT(flat_mm, linear_travel) : flat_mm;
|
||||
if (mm_of_travel < 0.001f) return;
|
||||
|
||||
const feedRate_t scaled_fr_mm_s = MMS_SCALED(feedrate_mm_s);
|
||||
|
||||
#ifdef ARC_SEGMENTS_PER_R
|
||||
float seg_length = MM_PER_ARC_SEGMENT * radius;
|
||||
LIMIT(seg_length, MM_PER_ARC_SEGMENT, ARC_SEGMENTS_PER_R);
|
||||
#elif ARC_SEGMENTS_PER_SEC
|
||||
float seg_length = scaled_fr_mm_s * RECIPROCAL(ARC_SEGMENTS_PER_SEC);
|
||||
NOLESS(seg_length, MM_PER_ARC_SEGMENT);
|
||||
#else
|
||||
constexpr float seg_length = MM_PER_ARC_SEGMENT;
|
||||
#endif
|
||||
// Start with a nominal segment length
|
||||
float seg_length = (
|
||||
#ifdef ARC_SEGMENTS_PER_R
|
||||
constrain(MM_PER_ARC_SEGMENT * radius, MM_PER_ARC_SEGMENT, ARC_SEGMENTS_PER_R)
|
||||
#elif ARC_SEGMENTS_PER_SEC
|
||||
_MAX(scaled_fr_mm_s * RECIPROCAL(ARC_SEGMENTS_PER_SEC), MM_PER_ARC_SEGMENT)
|
||||
#else
|
||||
MM_PER_ARC_SEGMENT
|
||||
#endif
|
||||
);
|
||||
// Divide total travel by nominal segment length
|
||||
uint16_t segments = FLOOR(mm_of_travel / seg_length);
|
||||
NOLESS(segments, min_segments);
|
||||
NOLESS(segments, min_segments); // At least some segments
|
||||
seg_length = mm_of_travel / segments;
|
||||
|
||||
/**
|
||||
* Vector rotation by transformation matrix: r is the original vector, r_T is the rotated vector,
|
||||
@@ -146,10 +185,11 @@ void plan_arc(
|
||||
// Vector rotation matrix values
|
||||
xyze_pos_t raw;
|
||||
const float theta_per_segment = angular_travel / segments,
|
||||
linear_per_segment = linear_travel / segments,
|
||||
extruder_per_segment = extruder_travel / segments,
|
||||
sin_T = theta_per_segment,
|
||||
cos_T = 1 - 0.5f * sq(theta_per_segment); // Small angle approximation
|
||||
linear_per_segment = linear_travel / segments,
|
||||
extruder_per_segment = extruder_travel / segments,
|
||||
sq_theta_per_segment = sq(theta_per_segment),
|
||||
sin_T = theta_per_segment - sq_theta_per_segment * theta_per_segment / 6,
|
||||
cos_T = 1 - 0.5f * sq_theta_per_segment; // Small angle approximation
|
||||
|
||||
// Initialize the linear axis
|
||||
raw[l_axis] = current_position[l_axis];
|
||||
@@ -283,7 +323,7 @@ void GcodeSuite::G2_G3(const bool clockwise) {
|
||||
relative_mode = true;
|
||||
#endif
|
||||
|
||||
get_destination_from_command();
|
||||
get_destination_from_command(); // Get X Y Z E F (and set cutter power)
|
||||
|
||||
#if ENABLED(SF_ARC_FIX)
|
||||
relative_mode = relative_mode_backup;
|
||||
@@ -328,13 +368,12 @@ void GcodeSuite::G2_G3(const bool clockwise) {
|
||||
int8_t circles_to_do = parser.byteval('P');
|
||||
if (!WITHIN(circles_to_do, 0, 100))
|
||||
SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS);
|
||||
|
||||
while (circles_to_do--)
|
||||
plan_arc(current_position, arc_offset, clockwise);
|
||||
#else
|
||||
constexpr uint8_t circles_to_do = 0;
|
||||
#endif
|
||||
|
||||
// Send the arc to the planner
|
||||
plan_arc(destination, arc_offset, clockwise);
|
||||
plan_arc(destination, arc_offset, clockwise, circles_to_do);
|
||||
reset_stepper_timeout();
|
||||
}
|
||||
else
|
||||
|
@@ -43,6 +43,10 @@ GCodeQueue queue;
|
||||
#include "../feature/binary_protocol.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(MEATPACK)
|
||||
#include "../feature/meatpack.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
#include "../feature/powerloss.h"
|
||||
#endif
|
||||
@@ -73,7 +77,7 @@ char GCodeQueue::command_buffer[BUFSIZE][MAX_CMD_SIZE];
|
||||
* The port that the command was received on
|
||||
*/
|
||||
#if NUM_SERIAL > 1
|
||||
int16_t GCodeQueue::port[BUFSIZE];
|
||||
serial_index_t GCodeQueue::port[BUFSIZE];
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -116,12 +120,12 @@ void GCodeQueue::clear() {
|
||||
*/
|
||||
void GCodeQueue::_commit_command(bool say_ok
|
||||
#if NUM_SERIAL > 1
|
||||
, int16_t p/*=-1*/
|
||||
, serial_index_t serial_ind/*=-1*/
|
||||
#endif
|
||||
) {
|
||||
send_ok[index_w] = say_ok;
|
||||
#if NUM_SERIAL > 1
|
||||
port[index_w] = p;
|
||||
port[index_w] = serial_ind;
|
||||
#endif
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
recovery.commit_sdpos(index_w);
|
||||
@@ -137,14 +141,14 @@ void GCodeQueue::_commit_command(bool say_ok
|
||||
*/
|
||||
bool GCodeQueue::_enqueue(const char* cmd, bool say_ok/*=false*/
|
||||
#if NUM_SERIAL > 1
|
||||
, int16_t pn/*=-1*/
|
||||
, serial_index_t serial_ind/*=-1*/
|
||||
#endif
|
||||
) {
|
||||
if (*cmd == ';' || length >= BUFSIZE) return false;
|
||||
strcpy(command_buffer[index_w], cmd);
|
||||
_commit_command(say_ok
|
||||
#if NUM_SERIAL > 1
|
||||
, pn
|
||||
, serial_ind
|
||||
#endif
|
||||
);
|
||||
return true;
|
||||
@@ -256,9 +260,9 @@ void GCodeQueue::enqueue_now_P(PGM_P const pgcode) {
|
||||
*/
|
||||
void GCodeQueue::ok_to_send() {
|
||||
#if NUM_SERIAL > 1
|
||||
const int16_t pn = port[index_r];
|
||||
if (pn < 0) return;
|
||||
PORT_REDIRECT(pn); // Reply to the serial port that sent the command
|
||||
const serial_index_t serial_ind = port[index_r];
|
||||
if (serial_ind < 0) return; // Never mind. Command came from SD or Flash Drive
|
||||
PORT_REDIRECT(serial_ind); // Reply to the serial port that sent the command
|
||||
#endif
|
||||
if (!send_ok[index_r]) return;
|
||||
SERIAL_ECHOPGM(STR_OK);
|
||||
@@ -282,9 +286,9 @@ void GCodeQueue::ok_to_send() {
|
||||
*/
|
||||
void GCodeQueue::flush_and_request_resend() {
|
||||
#if NUM_SERIAL > 1
|
||||
const int16_t pn = port[index_r];
|
||||
if (pn < 0) return;
|
||||
PORT_REDIRECT(pn); // Reply to the serial port that sent the command
|
||||
const serial_index_t serial_ind = port[index_r];
|
||||
if (serial_ind < 0) return;
|
||||
PORT_REDIRECT(serial_ind); // Reply to the serial port that sent the command
|
||||
#endif
|
||||
SERIAL_FLUSH();
|
||||
SERIAL_ECHOPGM(STR_RESEND);
|
||||
@@ -311,14 +315,14 @@ inline int read_serial(const uint8_t index) {
|
||||
}
|
||||
}
|
||||
|
||||
void GCodeQueue::gcode_line_error(PGM_P const err, const int8_t pn) {
|
||||
PORT_REDIRECT(pn); // Reply to the serial port that sent the command
|
||||
void GCodeQueue::gcode_line_error(PGM_P const err, const serial_index_t serial_ind) {
|
||||
PORT_REDIRECT(serial_ind); // Reply to the serial port that sent the command
|
||||
SERIAL_ERROR_START();
|
||||
serialprintPGM(err);
|
||||
SERIAL_ECHOLN(last_N);
|
||||
while (read_serial(pn) != -1); // Clear out the RX buffer
|
||||
while (read_serial(serial_ind) != -1); // Clear out the RX buffer
|
||||
flush_and_request_resend();
|
||||
serial_count[pn] = 0;
|
||||
serial_count[serial_ind] = 0;
|
||||
}
|
||||
|
||||
FORCE_INLINE bool is_M29(const char * const cmd) { // matches "M29" & "M29 ", but not "M290", etc
|
||||
@@ -383,11 +387,14 @@ inline void process_stream_char(const char c, uint8_t &sis, char (&buff)[MAX_CMD
|
||||
* keep sensor readings going and watchdog alive.
|
||||
*/
|
||||
inline bool process_line_done(uint8_t &sis, char (&buff)[MAX_CMD_SIZE], int &ind) {
|
||||
sis = PS_NORMAL;
|
||||
buff[ind] = 0;
|
||||
if (ind) { ind = 0; return false; }
|
||||
thermalManager.manage_heater();
|
||||
return true;
|
||||
sis = PS_NORMAL; // "Normal" Serial Input State
|
||||
buff[ind] = '\0'; // Of course, I'm a Terminator.
|
||||
const bool is_empty = (ind == 0); // An empty line?
|
||||
if (is_empty)
|
||||
thermalManager.manage_heater(); // Keep sensors satisfied
|
||||
else
|
||||
ind = 0; // Start a new line
|
||||
return is_empty; // Inform the caller
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -427,105 +434,114 @@ void GCodeQueue::get_serial_commands() {
|
||||
* Loop while serial characters are incoming and the queue is not full
|
||||
*/
|
||||
while (length < BUFSIZE && serial_data_available()) {
|
||||
LOOP_L_N(i, NUM_SERIAL) {
|
||||
LOOP_L_N(p, NUM_SERIAL) {
|
||||
|
||||
const int c = read_serial(i);
|
||||
const int c = read_serial(p);
|
||||
if (c < 0) continue;
|
||||
|
||||
const char serial_char = c;
|
||||
#if ENABLED(MEATPACK)
|
||||
meatpack.handle_rx_char(uint8_t(c), p);
|
||||
char c_res[2] = { 0, 0 };
|
||||
const uint8_t char_count = meatpack.get_result_char(c_res);
|
||||
#else
|
||||
constexpr uint8_t char_count = 1;
|
||||
#endif
|
||||
|
||||
if (ISEOL(serial_char)) {
|
||||
LOOP_L_N(char_index, char_count) {
|
||||
const char serial_char = TERN(MEATPACK, c_res[char_index], c);
|
||||
|
||||
// Reset our state, continue if the line was empty
|
||||
if (process_line_done(serial_input_state[i], serial_line_buffer[i], serial_count[i]))
|
||||
continue;
|
||||
if (ISEOL(serial_char)) {
|
||||
|
||||
char* command = serial_line_buffer[i];
|
||||
// Reset our state, continue if the line was empty
|
||||
if (process_line_done(serial_input_state[p], serial_line_buffer[p], serial_count[p]))
|
||||
continue;
|
||||
|
||||
while (*command == ' ') command++; // Skip leading spaces
|
||||
char *npos = (*command == 'N') ? command : nullptr; // Require the N parameter to start the line
|
||||
char* command = serial_line_buffer[p];
|
||||
|
||||
if (npos) {
|
||||
while (*command == ' ') command++; // Skip leading spaces
|
||||
char *npos = (*command == 'N') ? command : nullptr; // Require the N parameter to start the line
|
||||
|
||||
bool M110 = strstr_P(command, PSTR("M110")) != nullptr;
|
||||
if (npos) {
|
||||
|
||||
if (M110) {
|
||||
char* n2pos = strchr(command + 4, 'N');
|
||||
if (n2pos) npos = n2pos;
|
||||
bool M110 = strstr_P(command, PSTR("M110")) != nullptr;
|
||||
|
||||
if (M110) {
|
||||
char* n2pos = strchr(command + 4, 'N');
|
||||
if (n2pos) npos = n2pos;
|
||||
}
|
||||
|
||||
gcode_N = strtol(npos + 1, nullptr, 10);
|
||||
|
||||
if (gcode_N != last_N + 1 && !M110)
|
||||
return gcode_line_error(PSTR(STR_ERR_LINE_NO), p);
|
||||
|
||||
char *apos = strrchr(command, '*');
|
||||
if (apos) {
|
||||
uint8_t checksum = 0, count = uint8_t(apos - command);
|
||||
while (count) checksum ^= command[--count];
|
||||
if (strtol(apos + 1, nullptr, 10) != checksum)
|
||||
return gcode_line_error(PSTR(STR_ERR_CHECKSUM_MISMATCH), p);
|
||||
}
|
||||
else
|
||||
return gcode_line_error(PSTR(STR_ERR_NO_CHECKSUM), p);
|
||||
|
||||
last_N = gcode_N;
|
||||
}
|
||||
#if ENABLED(SDSUPPORT)
|
||||
// Pronterface "M29" and "M29 " has no line number
|
||||
else if (card.flag.saving && !is_M29(command))
|
||||
return gcode_line_error(PSTR(STR_ERR_NO_CHECKSUM), p);
|
||||
#endif
|
||||
|
||||
gcode_N = strtol(npos + 1, nullptr, 10);
|
||||
//
|
||||
// Movement commands give an alert when the machine is stopped
|
||||
//
|
||||
|
||||
if (gcode_N != last_N + 1 && !M110)
|
||||
return gcode_line_error(PSTR(STR_ERR_LINE_NO), i);
|
||||
|
||||
char *apos = strrchr(command, '*');
|
||||
if (apos) {
|
||||
uint8_t checksum = 0, count = uint8_t(apos - command);
|
||||
while (count) checksum ^= command[--count];
|
||||
if (strtol(apos + 1, nullptr, 10) != checksum)
|
||||
return gcode_line_error(PSTR(STR_ERR_CHECKSUM_MISMATCH), i);
|
||||
}
|
||||
else
|
||||
return gcode_line_error(PSTR(STR_ERR_NO_CHECKSUM), i);
|
||||
|
||||
last_N = gcode_N;
|
||||
}
|
||||
#if ENABLED(SDSUPPORT)
|
||||
// Pronterface "M29" and "M29 " has no line number
|
||||
else if (card.flag.saving && !is_M29(command))
|
||||
return gcode_line_error(PSTR(STR_ERR_NO_CHECKSUM), i);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Movement commands give an alert when the machine is stopped
|
||||
//
|
||||
|
||||
if (IsStopped()) {
|
||||
char* gpos = strchr(command, 'G');
|
||||
if (gpos) {
|
||||
switch (strtol(gpos + 1, nullptr, 10)) {
|
||||
case 0: case 1:
|
||||
#if ENABLED(ARC_SUPPORT)
|
||||
case 2: case 3:
|
||||
#endif
|
||||
#if ENABLED(BEZIER_CURVE_SUPPORT)
|
||||
case 5:
|
||||
#endif
|
||||
PORT_REDIRECT(i); // Reply to the serial port that sent the command
|
||||
SERIAL_ECHOLNPGM(STR_ERR_STOPPED);
|
||||
LCD_MESSAGEPGM(MSG_STOPPED);
|
||||
break;
|
||||
if (IsStopped()) {
|
||||
char* gpos = strchr(command, 'G');
|
||||
if (gpos) {
|
||||
switch (strtol(gpos + 1, nullptr, 10)) {
|
||||
case 0: case 1:
|
||||
#if ENABLED(ARC_SUPPORT)
|
||||
case 2: case 3:
|
||||
#endif
|
||||
#if ENABLED(BEZIER_CURVE_SUPPORT)
|
||||
case 5:
|
||||
#endif
|
||||
PORT_REDIRECT(p); // Reply to the serial port that sent the command
|
||||
SERIAL_ECHOLNPGM(STR_ERR_STOPPED);
|
||||
LCD_MESSAGEPGM(MSG_STOPPED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if DISABLED(EMERGENCY_PARSER)
|
||||
// Process critical commands early
|
||||
if (strcmp(command, "M108") == 0) {
|
||||
wait_for_heatup = false;
|
||||
#if HAS_LCD_MENU
|
||||
wait_for_user = false;
|
||||
#endif
|
||||
}
|
||||
if (strcmp(command, "M112") == 0) kill(M112_KILL_STR, nullptr, true);
|
||||
if (strcmp(command, "M410") == 0) quickstop_stepper();
|
||||
#endif
|
||||
|
||||
#if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0
|
||||
last_command_time = ms;
|
||||
#endif
|
||||
|
||||
// Add the command to the queue
|
||||
_enqueue(serial_line_buffer[i], true
|
||||
#if NUM_SERIAL > 1
|
||||
, i
|
||||
#if DISABLED(EMERGENCY_PARSER)
|
||||
// Process critical commands early
|
||||
if (strcmp(command, "M108") == 0) {
|
||||
wait_for_heatup = false;
|
||||
#if HAS_LCD_MENU
|
||||
wait_for_user = false;
|
||||
#endif
|
||||
}
|
||||
if (strcmp(command, "M112") == 0) kill(M112_KILL_STR, nullptr, true);
|
||||
if (strcmp(command, "M410") == 0) quickstop_stepper();
|
||||
#endif
|
||||
);
|
||||
}
|
||||
else
|
||||
process_stream_char(serial_char, serial_input_state[i], serial_line_buffer[i], serial_count[i]);
|
||||
|
||||
#if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0
|
||||
last_command_time = ms;
|
||||
#endif
|
||||
|
||||
// Add the command to the queue
|
||||
_enqueue(serial_line_buffer[p], true
|
||||
#if NUM_SERIAL > 1
|
||||
, p
|
||||
#endif
|
||||
);
|
||||
}
|
||||
else
|
||||
process_stream_char(serial_char, serial_input_state[p], serial_line_buffer[p], serial_count[p]);
|
||||
} // char_count loop
|
||||
} // for NUM_SERIAL
|
||||
} // queue has space, serial has data
|
||||
}
|
||||
|
@@ -55,7 +55,7 @@ public:
|
||||
* The port that the command was received on
|
||||
*/
|
||||
#if NUM_SERIAL > 1
|
||||
static int16_t port[BUFSIZE];
|
||||
static serial_index_t port[BUFSIZE];
|
||||
#endif
|
||||
|
||||
GCodeQueue();
|
||||
@@ -135,13 +135,13 @@ private:
|
||||
|
||||
static void _commit_command(bool say_ok
|
||||
#if NUM_SERIAL > 1
|
||||
, int16_t p=-1
|
||||
, serial_index_t serial_ind=-1
|
||||
#endif
|
||||
);
|
||||
|
||||
static bool _enqueue(const char* cmd, bool say_ok=false
|
||||
#if NUM_SERIAL > 1
|
||||
, int16_t p=-1
|
||||
, serial_index_t serial_ind=-1
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -154,7 +154,7 @@ private:
|
||||
*/
|
||||
static bool enqueue_one(const char* cmd);
|
||||
|
||||
static void gcode_line_error(PGM_P const err, const int8_t pn);
|
||||
static void gcode_line_error(PGM_P const err, const serial_index_t serial_ind);
|
||||
|
||||
};
|
||||
|
||||
|
@@ -2833,3 +2833,10 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
|
||||
#if SAVED_POSITIONS > 256
|
||||
#error "SAVED_POSITIONS must be an integer from 0 to 256."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sanity Check for MEATPACK and BINARY_FILE_TRANSFER Features
|
||||
*/
|
||||
#if BOTH(MEATPACK, BINARY_FILE_TRANSFER)
|
||||
#error "Either enable MEATPACK or enable BINARY_FILE_TRANSFER."
|
||||
#endif
|
||||
|
@@ -41,10 +41,10 @@
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
#define CUSTOM_BUILD_VERSION "1.2.0"
|
||||
#define CUSTOM_BUILD_VERSION "1.3.0"
|
||||
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2021-06-24"
|
||||
#define STRING_DISTRIBUTION_DATE "2021-09-18"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -29,12 +29,8 @@
|
||||
#include "../feature/e_parser.h"
|
||||
#include "../feature/pause.h"
|
||||
#include "../module/configuration_store.h"
|
||||
|
||||
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||
#include "../feature/bedlevel/bedlevel.h"
|
||||
#include "../feature/bedlevel/abl/abl.h"
|
||||
#endif
|
||||
|
||||
#include "../feature/bedlevel/bedlevel.h"
|
||||
#include "../feature/bedlevel/abl/abl.h"
|
||||
#include "../libs/buzzer.h"
|
||||
#include "../module/planner.h"
|
||||
#include "../module/printcounter.h"
|
||||
@@ -202,11 +198,6 @@ void AnycubicTouchscreenClass::Setup()
|
||||
{
|
||||
HardwareSerial.begin(115200);
|
||||
|
||||
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||
setupMyZoffset();
|
||||
delay(10);
|
||||
#endif
|
||||
|
||||
HARDWARE_SERIAL_ENTER();
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("J17"); // J17 Main board reset
|
||||
HARDWARE_SERIAL_ENTER();
|
||||
@@ -214,6 +205,18 @@ void AnycubicTouchscreenClass::Setup()
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("J12"); // J12 Ready
|
||||
HARDWARE_SERIAL_ENTER();
|
||||
|
||||
currentTouchscreenSelection[0] = 0;
|
||||
currentFileOrDirectory[0] = '\0';
|
||||
SpecialMenu = false;
|
||||
MMLMenu = false;
|
||||
FlowMenu = false;
|
||||
BLTouchMenu = false;
|
||||
LevelMenu = false;
|
||||
FilamentSensorEnabled = true;
|
||||
MyFileNrCnt = 0;
|
||||
currentFlowRate = 100;
|
||||
flowRateBuffer = SM_FLOW_DISP_L;
|
||||
|
||||
#if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT)
|
||||
pinMode(SD_DETECT_PIN, INPUT);
|
||||
WRITE(SD_DETECT_PIN, HIGH);
|
||||
@@ -225,24 +228,20 @@ void AnycubicTouchscreenClass::Setup()
|
||||
#if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
|
||||
if ((READ(FILAMENT_RUNOUT_PIN) == true) && FilamentSensorEnabled)
|
||||
{
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK
|
||||
HARDWARE_SERIAL_ENTER();
|
||||
#ifndef ANYCUBIC_TFT_DEBUG
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK
|
||||
HARDWARE_SERIAL_ENTER();
|
||||
#endif
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout... J15");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
currentTouchscreenSelection[0] = 0;
|
||||
currentFileOrDirectory[0] = '\0';
|
||||
SpecialMenu = false;
|
||||
MMLMenu = false;
|
||||
FlowMenu = false;
|
||||
LevelMenu = false;
|
||||
FilamentSensorEnabled = true;
|
||||
MyFileNrCnt = 0;
|
||||
currentFlowRate = 100;
|
||||
flowRateBuffer = SM_FLOW_DISP_L;
|
||||
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||
setupMyZoffset();
|
||||
delay(10);
|
||||
#endif
|
||||
|
||||
#ifdef STARTUP_CHIME
|
||||
buzzer.tone(100, 554);
|
||||
@@ -250,7 +249,6 @@ void AnycubicTouchscreenClass::Setup()
|
||||
buzzer.tone(100, 831);
|
||||
#endif
|
||||
|
||||
|
||||
setup_OutageTestPin();
|
||||
}
|
||||
|
||||
@@ -832,6 +830,36 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
|
||||
SERIAL_ECHOLNPGM("Special Menu: Exit Flow Menu");
|
||||
FlowMenu = false;
|
||||
}
|
||||
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZMENU_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZMENU_S)) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Enter BLTouch Menu");
|
||||
BLTouchMenu = true;
|
||||
}
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_UP_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_UP_S)) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Offset UP");
|
||||
probe.offset.z += 0.01F;
|
||||
}
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_DN_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_DN_S)) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Offset Down");
|
||||
probe.offset.z -= 0.01F;
|
||||
}
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_EXIT_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_EXIT_S)) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Exit BLTouch Menu & Save EEPROM");
|
||||
settings.save(); // M500
|
||||
buzzer.tone(105, 1108);
|
||||
buzzer.tone(210, 1661);
|
||||
BLTouchMenu = false;
|
||||
}
|
||||
#endif
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_MENU_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_MENU_S)) != NULL))
|
||||
{
|
||||
@@ -848,18 +876,18 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P2_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P2_S)) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 2");
|
||||
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P)
|
||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X205 Y15 F4000\nG1 Z0"));
|
||||
#endif
|
||||
SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 2");
|
||||
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P)
|
||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X205 Y15 F4000\nG1 Z0"));
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_MEGA_X)
|
||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X295 Y15 F4000\nG1 Z0"));
|
||||
#endif
|
||||
#if ENABLED(KNUTWURST_MEGA_X)
|
||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X295 Y15 F4000\nG1 Z0"));
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_CHIRON)
|
||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X395 Y15 F4000\nG1 Z0"));
|
||||
#endif
|
||||
#if ENABLED(KNUTWURST_CHIRON)
|
||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X395 Y15 F4000\nG1 Z0"));
|
||||
#endif
|
||||
}
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P3_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P3_S)) != NULL))
|
||||
@@ -880,25 +908,25 @@ void AnycubicTouchscreenClass::HandleSpecialMenu()
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P4_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P4_S)) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 4");
|
||||
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P)
|
||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y200 F4000\nG1 Z0"));
|
||||
#endif
|
||||
SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 4");
|
||||
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P)
|
||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y200 F4000\nG1 Z0"));
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_MEGA_X)
|
||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y295 F4000\nG1 Z0"));
|
||||
#endif
|
||||
#if ENABLED(KNUTWURST_MEGA_X)
|
||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y295 F4000\nG1 Z0"));
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_CHIRON)
|
||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y395 F4000\nG1 Z0"));
|
||||
#endif
|
||||
#if ENABLED(KNUTWURST_CHIRON)
|
||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y395 F4000\nG1 Z0"));
|
||||
#endif
|
||||
}
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_EXIT_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_EXIT_S)) != NULL))
|
||||
{
|
||||
SERIAL_ECHOLNPGM("Special Menu: Exit Easy Level Menu");
|
||||
LevelMenu = false;
|
||||
queue.inject_P(PSTR("G90\nG1 Z10\nG1 X15 Y15 F4000"));
|
||||
SERIAL_ECHOLNPGM("Special Menu: Exit Easy Level Menu");
|
||||
LevelMenu = false;
|
||||
queue.inject_P(PSTR("G90\nG1 Z10\nG1 X15 Y15 F4000"));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -966,6 +994,39 @@ void AnycubicTouchscreenClass::PrintList()
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(BLTouchMenu)
|
||||
{
|
||||
zOffsetBuffer = SM_BLTZ_DISP_L;
|
||||
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOPAIR(" DEBUG: Current probe.offset.z: ", float(probe.offset.z));
|
||||
SERIAL_EOL();
|
||||
#endif
|
||||
|
||||
zOffsetBuffer.replace("XXXXX", String(float(probe.offset.z)));
|
||||
|
||||
switch (filenumber)
|
||||
{
|
||||
case 0: // Page 1
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_BLTZ_DISP_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLN(zOffsetBuffer);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_BLTZ_UP_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_BLTZ_UP_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_BLTZ_DN_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_BLTZ_DN_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_BLTOUCH_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_BLTOUCH_L);
|
||||
break;
|
||||
|
||||
case 4: // Page 2
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_BLTZ_EXIT_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_BLTZ_EXIT_L);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(LevelMenu)
|
||||
{
|
||||
switch (filenumber)
|
||||
@@ -1003,46 +1064,46 @@ void AnycubicTouchscreenClass::PrintList()
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_PAUSE_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_RESUME_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_RESUME_L);
|
||||
break;
|
||||
break;
|
||||
|
||||
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING)
|
||||
case 4: // Page 2 for Manual Mesh Bed Level
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EZLVL_MENU_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EZLVL_MENU_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_MESH_MENU_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_MESH_MENU_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);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
case 4: // Page 2 for BLTouch
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EZLVL_MENU_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EZLVL_MENU_L);
|
||||
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);
|
||||
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING)
|
||||
case 4: // Page 2 for Manual Mesh Bed Level
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EZLVL_MENU_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EZLVL_MENU_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_MESH_MENU_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_MESH_MENU_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);
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||
case 4: // Page 2 for Chiron ABL
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EZLVL_MENU_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EZLVL_MENU_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_RESETLV_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_RESETLV_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);
|
||||
break;
|
||||
#endif
|
||||
#if ENABLED(KNUTWURST_BLTOUCH)
|
||||
case 4: // Page 2 for BLTouch
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EZLVL_MENU_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EZLVL_MENU_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_BLTZMENU_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_BLTZMENU_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);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||
case 4: // Page 2 for Chiron ABL
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EZLVL_MENU_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EZLVL_MENU_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_RESETLV_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_RESETLV_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);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case 8: // Page 3
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_LOAD_DEFAULTS_S);
|
||||
@@ -1053,12 +1114,12 @@ void AnycubicTouchscreenClass::PrintList()
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_DIS_FILSENS_L);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EN_FILSENS_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EN_FILSENS_L);
|
||||
break;
|
||||
break;
|
||||
|
||||
case 12: // Page 3
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EXIT_S);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(SM_EXIT_L);
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
@@ -1073,24 +1134,31 @@ void AnycubicTouchscreenClass::PrintList()
|
||||
if (card.isMounted())
|
||||
#endif
|
||||
{
|
||||
uint16_t count = filenumber;
|
||||
uint16_t max_files;
|
||||
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 ((MyFileNrCnt - filenumber) < 4)
|
||||
int count = filenumber;
|
||||
int max_files;
|
||||
int filesOnSDCard = card.countFilesInWorkDir();
|
||||
|
||||
if ((filesOnSDCard - filenumber) < 4)
|
||||
{
|
||||
max_files = MyFileNrCnt;
|
||||
max_files = filesOnSDCard;
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOLN("max_files = filesOnSDCard;");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
max_files = filenumber + 3;
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOLN("max_files = filenumber + 3;");
|
||||
#endif
|
||||
}
|
||||
|
||||
if(filesOnSDCard == 3)
|
||||
filenumber = 0;
|
||||
|
||||
for (count = filenumber; count <= max_files; count++)
|
||||
{
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOPGM("filesOnSDCard: ");
|
||||
SERIAL_ECHOLN(filesOnSDCard);
|
||||
SERIAL_ECHOPGM("filenumber: ");
|
||||
SERIAL_ECHOLN(filenumber);
|
||||
SERIAL_ECHOPGM("max_files: ");
|
||||
@@ -1099,6 +1167,8 @@ void AnycubicTouchscreenClass::PrintList()
|
||||
SERIAL_ECHOLN(count);
|
||||
#endif
|
||||
|
||||
for (count = filenumber; count <= max_files; count++)
|
||||
{
|
||||
if (count == 0) // Special Entry
|
||||
{
|
||||
if (strcmp(card.getWorkDirName(), "/") == 0)
|
||||
@@ -1154,23 +1224,23 @@ void AnycubicTouchscreenClass::PrintList()
|
||||
if (card.flag.filenameIsDir)
|
||||
{
|
||||
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("/");
|
||||
HARDWARE_SERIAL_PROTOCOL(card.filename);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(".GCO");
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("/");
|
||||
HARDWARE_SERIAL_PROTOCOL(outputString);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(".gcode");
|
||||
SERIAL_ECHO(count);
|
||||
SERIAL_ECHOPGM(": /");
|
||||
SERIAL_ECHOLN(outputString);
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("/");
|
||||
HARDWARE_SERIAL_PROTOCOL(card.filename);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(".GCO");
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("/");
|
||||
HARDWARE_SERIAL_PROTOCOL(outputString);
|
||||
HARDWARE_SERIAL_PROTOCOLLNPGM(".gcode");
|
||||
SERIAL_ECHO(count);
|
||||
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);
|
||||
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
|
||||
@@ -1226,11 +1296,13 @@ void AnycubicTouchscreenClass::CheckHeaterError()
|
||||
{
|
||||
if ((thermalManager.degHotend(0) < 5) || (thermalManager.degHotend(0) > 300))
|
||||
{
|
||||
if (HeaterCheckCount > 60000)
|
||||
if (HeaterCheckCount > 600000)
|
||||
{
|
||||
HeaterCheckCount = 0;
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("J10"); // J10 Hotend temperature abnormal
|
||||
HARDWARE_SERIAL_ENTER();
|
||||
#ifndef ANYCUBIC_TFT_DEBUG
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("J10"); // J10 Hotend temperature abnormal
|
||||
HARDWARE_SERIAL_ENTER();
|
||||
#endif
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Hotend temperature abnormal... J20");
|
||||
#endif
|
||||
@@ -1406,8 +1478,11 @@ void AnycubicTouchscreenClass::FilamentRunout()
|
||||
}
|
||||
else if (!card.isPrinting())
|
||||
{
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK
|
||||
HARDWARE_SERIAL_ENTER();
|
||||
#ifndef ANYCUBIC_TFT_DEBUG
|
||||
HARDWARE_SERIAL_PROTOCOLPGM("J15"); //J15 FILAMENT LACK
|
||||
HARDWARE_SERIAL_ENTER();
|
||||
#endif
|
||||
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Filament runout... J15");
|
||||
#endif
|
||||
@@ -1584,7 +1659,9 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
|
||||
break;
|
||||
case 8: // A8 GET SD LIST
|
||||
#ifdef SDSUPPORT
|
||||
currentTouchscreenSelection[0] = 0;
|
||||
if(SpecialMenu == false) {
|
||||
currentTouchscreenSelection[0] = 0;
|
||||
}
|
||||
#if DISABLED(KNUTWURST_SPECIAL_MENU_WO_SD)
|
||||
if (!IS_SD_INSERTED())
|
||||
{
|
||||
@@ -1676,8 +1753,10 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
|
||||
{
|
||||
strcpy(currentTouchscreenSelection, TFTstrchr_pointer + 4);
|
||||
} else {
|
||||
currentTouchscreenSelection[0] = 0;
|
||||
|
||||
if(SpecialMenu == false) {
|
||||
currentTouchscreenSelection[0] = 0;
|
||||
}
|
||||
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Normal file open path");
|
||||
#endif
|
||||
@@ -1980,7 +2059,9 @@ void AnycubicTouchscreenClass::GetCommandFromTFT()
|
||||
}
|
||||
}
|
||||
}
|
||||
currentTouchscreenSelection[0] = 0;
|
||||
if(SpecialMenu == false) {
|
||||
currentTouchscreenSelection[0] = 0;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
#ifdef SERVO_ENDSTOPS
|
||||
|
@@ -108,7 +108,7 @@ char *ftostr32(const float &);
|
||||
#define SM_EN_FILSENS_L "<Enable Fil. Sensor>"
|
||||
#define SM_EN_FILSENS_S "<ENSEN>"
|
||||
#define SM_EXIT_L "<Exit>"
|
||||
#define SM_EXIT_S "<EXIT>"
|
||||
#define SM_EXIT_S "<SMEXIT>"
|
||||
|
||||
#define SM_BACK_L "<End Mesh Leveling>"
|
||||
#define SM_BACK_S "<BACK>"
|
||||
@@ -118,10 +118,10 @@ char *ftostr32(const float &);
|
||||
#define SM_FLOW_DISP_L "<Flow is XXX>"
|
||||
#define SM_FLOW_DISP_S "<FLDISP>"
|
||||
#define SM_FLOW_UP_L "<Up>"
|
||||
#define SM_FLOW_UP_S "<UP>"
|
||||
#define SM_FLOW_UP_S "<FLUP>"
|
||||
#define SM_FLOW_DN_L "<Down>"
|
||||
#define SM_FLOW_DN_S "<DOWN>"
|
||||
#define SM_FLOW_EXIT_L "<End Flow Settings>"
|
||||
#define SM_FLOW_DN_S "<FLDN>"
|
||||
#define SM_FLOW_EXIT_L "<Exit Flow Settings>"
|
||||
#define SM_FLOW_EXIT_S "<EXTFLW>"
|
||||
|
||||
#define SM_EZLVL_MENU_L "<Easy 4 Point Level>"
|
||||
@@ -134,9 +134,20 @@ char *ftostr32(const float &);
|
||||
#define SM_EZLVL_P3_S "<EZLPC>"
|
||||
#define SM_EZLVL_P4_L "<Point D>"
|
||||
#define SM_EZLVL_P4_S "<EZLPD>"
|
||||
#define SM_EZLVL_EXIT_L "<End Easy Leveling>"
|
||||
#define SM_EZLVL_EXIT_L "<Exit Easy Level>"
|
||||
#define SM_EZLVL_EXIT_S "<EZLEXT>"
|
||||
|
||||
#define SM_BLTZMENU_L "<Auto Leveling>"
|
||||
#define SM_BLTZMENU_S "<SETOFZ>"
|
||||
#define SM_BLTZ_DISP_L "<Z Offset: XXXXX>"
|
||||
#define SM_BLTZ_DISP_S "<OFZDSP>"
|
||||
#define SM_BLTZ_UP_L "<Up>"
|
||||
#define SM_BLTZ_UP_S "<UPOFFZ0>"
|
||||
#define SM_BLTZ_DN_L "<Down>"
|
||||
#define SM_BLTZ_DN_S "<DNOFFZ0>"
|
||||
#define SM_BLTZ_EXIT_L "<SAVE and EXIT>"
|
||||
#define SM_BLTZ_EXIT_S "<EXTABLM>"
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
||||
@@ -198,7 +209,7 @@ char *ftostr32(const float &);
|
||||
#define SM_FLOW_UP_S "<UPFLOW1.GCO"
|
||||
#define SM_FLOW_DN_L "<Down> .gcode"
|
||||
#define SM_FLOW_DN_S "<DWNFLOW.GCO"
|
||||
#define SM_FLOW_EXIT_L "<End Flow Settings> .gcode"
|
||||
#define SM_FLOW_EXIT_L "<Exit Flow Settings>.gcode"
|
||||
#define SM_FLOW_EXIT_S "<EXTFLW1.GCO"
|
||||
|
||||
#define SM_EZLVL_MENU_L "<Easy 4 Point Level>.gcode"
|
||||
@@ -211,8 +222,20 @@ char *ftostr32(const float &);
|
||||
#define SM_EZLVL_P3_S "<EZLPC01.GCO"
|
||||
#define SM_EZLVL_P4_L "<Point D> .gcode"
|
||||
#define SM_EZLVL_P4_S "<EZLPD01.GCO"
|
||||
#define SM_EZLVL_EXIT_L "<End Easy Leveling> .gcode"
|
||||
#define SM_EZLVL_EXIT_L "<Exit Easy Leveling>.gcode"
|
||||
#define SM_EZLVL_EXIT_S "<EZLEXT1.GCO"
|
||||
|
||||
#define SM_BLTZMENU_L "<Auto Leveling> .gcode"
|
||||
#define SM_BLTZMENU_S "<SETOFZ0.GCO"
|
||||
#define SM_BLTZ_DISP_L "<Z Offset: XXXXX> .gcode"
|
||||
#define SM_BLTZ_DISP_S "<OFZDSP0.GCO"
|
||||
#define SM_BLTZ_UP_L "<Up> .gcode"
|
||||
#define SM_BLTZ_UP_S "<UPOFFZ0.GCO"
|
||||
#define SM_BLTZ_DN_L "<Down> .gcode"
|
||||
#define SM_BLTZ_DN_S "<DOWNOFZ.GCO"
|
||||
#define SM_BLTZ_EXIT_L "<SAVE and EXIT> .gcode"
|
||||
#define SM_BLTZ_EXIT_S "<EXTABLM.GCO"
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||
@@ -258,7 +281,7 @@ private:
|
||||
int serial3_count = 0;
|
||||
char *TFTstrchr_pointer;
|
||||
char FlagResumFromOutage = 0;
|
||||
uint16_t filenumber = 0;
|
||||
int filenumber = 0;
|
||||
unsigned long starttime = 0;
|
||||
unsigned long stoptime = 0;
|
||||
uint8_t tmp_extruder = 0;
|
||||
@@ -299,12 +322,14 @@ private:
|
||||
char currentTouchscreenSelection[64];
|
||||
char currentFileOrDirectory[64];
|
||||
String flowRateBuffer;
|
||||
String zOffsetBuffer;
|
||||
uint16_t MyFileNrCnt = 0;
|
||||
uint8_t FilamentSensorEnabled = true;
|
||||
|
||||
uint8_t SpecialMenu = false;
|
||||
uint8_t MMLMenu = false;
|
||||
uint8_t FlowMenu = false;
|
||||
uint8_t BLTouchMenu = false;
|
||||
uint8_t LevelMenu = false;
|
||||
|
||||
#if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
|
||||
|
@@ -1101,7 +1101,7 @@ void CardReader::fileHasFinished() {
|
||||
uint8_t CardReader::auto_report_sd_interval = 0;
|
||||
millis_t CardReader::next_sd_report_ms;
|
||||
#if NUM_SERIAL > 1
|
||||
int8_t CardReader::auto_report_port;
|
||||
serial_index_t CardReader::auto_report_port;
|
||||
#endif
|
||||
|
||||
void CardReader::auto_report_sd_status() {
|
||||
|
@@ -255,7 +255,7 @@ private:
|
||||
static uint8_t auto_report_sd_interval;
|
||||
static millis_t next_sd_report_ms;
|
||||
#if NUM_SERIAL > 1
|
||||
static int8_t auto_report_port;
|
||||
static serial_index_t auto_report_port;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
149
README.md
@@ -1,145 +1,28 @@
|
||||
# Knutwurst's i3 MEGA M/S/P/X und Chiron Firmware <br>(based on Marlin 2.0.x)
|
||||
# Knutwurst's i3 MEGA M/S/P/X/Chiron Hybrid Firmware <br>(based on Marlin 2.0.x)
|
||||
|
||||
<span style="color: red;">(BITTE GENAU DURCHLESEN! / PLEASE READ CAREFULLY!)</span>
|
||||
# Übersicht
|
||||
|
||||
- [Funktionen](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Features-(Deutsch))
|
||||
- [Einsteiger-Leitfaden](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Beginner's-Guide-(Deutsch))
|
||||
- [Häufig gestellte Fragen (FAQ)](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/FAQ-(deutsch))
|
||||
- [Wiki/Umbau-Anleitungen](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki)
|
||||
- [Offiziell Facebook-Gruppe (deutsch)](https://www.facebook.com/groups/3094090037303577/)
|
||||
- [Downloads](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/releases)
|
||||
|
||||
### 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>
|
||||
|
||||
|
||||
Wenn Du Fragen hast, schaue gern in der offiziellen [Facebook-Gruppe](https://www.facebook.com/groups/3094090037303577/) vorbei.
|
||||
# Overview
|
||||
|
||||
|
||||
# Inhaltsverzeichnis (Deutsch)
|
||||
<b>WARNUNG:</b> Der Mega Pro / Mega P Support befindet sich noch in der Entwicklung. Aktuell wird der Laser noch nicht unterstützt, ebensowenig wie das Piezo-Leveling!
|
||||
|
||||
- [Funktionen](#funktionen)
|
||||
- [Häufig gestellte Fragen (FAQ)](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/FAQ-(deutsch))
|
||||
- [Fotos / Bilder](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Pictures)
|
||||
- [Downloads](#downloads)
|
||||
|
||||
|
||||
# Table of Contents (English)
|
||||
<b>WARNING:</b> The Mega Pro / Mega P support is still under development. The laser is currently not supported, nor is piezo leveling!
|
||||
|
||||
- [Features](#features)
|
||||
- [Features](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Features-(English))
|
||||
- [Beginner's Guide](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Beginner's-Guide-(English))
|
||||
- [Frequently asked questions (FAQ)](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/FAQ-(english))
|
||||
- [Photos / Pictures](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Pictures)
|
||||
- [Download](#download)
|
||||
- [Wiki/Tutotrials](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki)
|
||||
- [Official Facebook-Group (german)](https://www.facebook.com/groups/3094090037303577/)
|
||||
- [Downloads](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/releases)
|
||||
|
||||
|
||||
# Readme - German
|
||||
|
||||
## Funktionen
|
||||
|
||||
* 4-Punkt Leveling-Hilfe "Easy Leveling"
|
||||
* Mesh-Bed Kalibrierung / Autokalibrierung mit [BLTouch (Installations-Anleitung)](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/BLTouch-Installation-(deutsch))
|
||||
* S-Kurven Beschleunigung
|
||||
* "Linear Pressure Control v1.5" aktiviert (kann mit M900 konfiguriert werden)
|
||||
* Babystepping während des Druckvorgangs
|
||||
* Bilinear Bed Leveling (BBL)
|
||||
* Manuelles Editieren der Messpunkte
|
||||
* Volle Unterstützung aller [Anycubic Touchscreens](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Types-of-Anycubic-Touchscreens)
|
||||
* Bauteilkühler läuft nun auf 100% statt maximal 70%
|
||||
* Pause & Filamentwechselfunktion
|
||||
* Automatische EEPROM Initialisierung
|
||||
* Filament Runout Sensor kann im Menü temporär deaktiviert werden
|
||||
* [Druckbettgröße erweitert auf 225 x 220 x 210 mm](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Set-new-print-bed-size)
|
||||
* Automatischer 'Slowdown', falls Daten nicht schnell genug fließen
|
||||
* Vollautomatisches Hotend und Ultrabase PID Tuning
|
||||
* Optimierungen für [Trinamic TMC Schrittmotortreiber](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Schrittmotortreiber-gegen-TMC2xxx-tauschen)
|
||||
|
||||
|
||||
---
|
||||
|
||||
# Downloads
|
||||
|
||||
Du kannst die fertigen Binärdateien hier herunterladen: https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/releases. Natürlich kannst du die Firmware mit PlatformIO auch [selbst kompilieren](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Howto:-Compile-Firmware-with-PlatformIO).
|
||||
|
||||
Um es übersichtlich zu gestalten, beinhalten die Dateinamen die einzelnen Features.
|
||||
|
||||
<b>Das Fehlen von Zusätzen (z.B. MEGA_1.0.0.hex) bedeutet, dass die Firmware für den "normalen" i3 Mega gedacht ist, an dem keine Veränderungen vorgenommen wurden.</b>
|
||||
|
||||
`_1G` steht für die erste Generation des i3 Mega mit nur einem Z Endstop. Diese Firmware ist nicht für den normalen i3 Mega geeignet!
|
||||
|
||||
`_S` steht für den Mega S mit dem Titan Extruder.
|
||||
|
||||
`_P` steht für den Mega P mit dem BMG Extruder.
|
||||
|
||||
`_X` steht für den Mega X.
|
||||
|
||||
`_TMC` steht für Trinamic TMC Motortreiber. Hierbei wird die Drehrichtung der Motoren invertiert. Sollten die Stecker der Motoren jedoch bereits gedreht sein, nimmt man einfach die Nicht-TMC Version.
|
||||
|
||||
`_DGUS` steht für das "neue" blau/gelbe DGUS II Display, welches sonst kein Special-Menü anzeigen kann. (Nur für MEGA S relevant)
|
||||
|
||||
`_BLT` steht für die BL-Touch Version mit Autoleveling-Sensor. Das manuelle Mesh-Leveling ist hier deaktiviert.
|
||||
|
||||
`_10` steht für das Trigorilla_14 v1.0 Mainboard, welches normalerweise der Standard sein sollte. (nur für BLTouch relevant)
|
||||
|
||||
`_11` steht für das Trigorilla_14 v1.1 Mainboard, bei welchem sich die Pinbelegung für den Servo-Port geändert hat. (nur für BLTouch relevant)
|
||||
|
||||
<b>Anmerkung: Die Mainboard-Version 1.0 oder 1.1 ist nur für den Einbau des BLTouch Sensors relevant und kann normalerweise ignoriert werden.</b>
|
||||
|
||||
|
||||
Für (fast) jede Kombination gibt es eine passende Firmware im Download-Bereich. ;)
|
||||
|
||||
---
|
||||
|
||||
### If you like what I do you can buy me a coffee: [](https://paypal.me/oliverkoester)
|
||||
### 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
|
||||
|
||||
## Features:
|
||||
|
||||
* 4-Point Leveling-Assistant "Easy Leveling"
|
||||
* Mesh bed calibration / Auto calibration with [BLTouch (Installation Manual)](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/BLTouch-Installation-(english))
|
||||
* S-curve acceleration
|
||||
* "Linear Pressure Control v1.5" activated (can be configured with M900)
|
||||
* Baby stepping during the printing process
|
||||
* Bilinear Bed Leveling (BBL)
|
||||
* Manual editing of the measuring points
|
||||
* Full Support for all [Anycubic Touchscreens](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Types-of-Anycubic-Touchscreens)
|
||||
* Part cooling fan now runs at 100% instead of 70%
|
||||
* Pause & filament change function
|
||||
* Automatic EEPROM initialization
|
||||
* Filament runout sensor can be temporarily deactivated in the menu
|
||||
* [Print bed size enlarged to 225 x 220 x 210 mm](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Set-new-print-bed-size)
|
||||
* Automatic 'slowdown' if data does not flow fast enough
|
||||
* Fully automatic hotend and ultrabase PID tuning
|
||||
* Optimizations for [Trinamic TMC Stepper drivers](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Swap-stepper-motor-driver-for-TMC2xxx)
|
||||
|
||||
---
|
||||
|
||||
# Download
|
||||
|
||||
You can download the precompiled binary files from here: https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/releases. Of course you can also [compile the firmware yourself](https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Howto:-Compile-Firmware-with-PlatformIO) with PlatformIO.
|
||||
|
||||
In order to make it clear, the file names contain the individual features.
|
||||
|
||||
<b>The lack of additions (e.g. MEGA_1.0.0.hex) means that the firmware is intended for the "normal" i3 Mega on which no changes have been made.</b>
|
||||
|
||||
`_1G` stands for the firt generation i3 Mega with only one Z endstop. Do NOT use this Firmware on the regular i3 Mega!
|
||||
|
||||
`_S` stands for the Mega S with the titan extruder.
|
||||
|
||||
`_P` stands for the Mega P with the BMG extruder.
|
||||
|
||||
`_X` stands for the Mega X.
|
||||
|
||||
`_TMC` stands for Trinamic TMC motor driver. The direction of rotation of the motors is inverted. However, if the plugs of the motors are already turned, you simply take the non-TMC version.
|
||||
|
||||
`_DGUS` stands for the "new" blue / yellow DGUS II display, which otherwise cannot show a special menu. (Only relevant for MEGA S)
|
||||
|
||||
`_BLT` stands for the BL-Touch version with auto-leveling sensor. Manual mesh leveling is deactivated here.
|
||||
|
||||
`_10` stands for the Trigorilla_14 v1.0 mainboard, which should normally be the standard. (Only relevant for BLTouch)
|
||||
|
||||
`_11` stands for the Trigorilla_14 v1.1 mainboard, on which the pin assignment for the servo port has changed. (Only relevant for BLTouch)
|
||||
|
||||
<b>Note: The mainboard version 1.0 or 1.1 is only relevant for the installation of the BLTouch sensor and can normally be ignored.</b>
|
||||
|
||||
For (almost) every combination there is a suitable firmware in the download area. ;)
|
||||
|
||||
|
||||
### 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>
|
||||
|
@@ -8,6 +8,7 @@ set -e
|
||||
|
||||
# Build examples
|
||||
restore_configs
|
||||
opt_enable MEATPACK
|
||||
use_example_configs FYSETC/S6
|
||||
exec_test $1 $2 "FYSETC S6 Example"
|
||||
|
||||
|
BIN
images/ESP01_Flash.jpg
Normal file
After Width: | Height: | Size: 374 KiB |
BIN
images/ESP3D_00.jpg
Normal file
After Width: | Height: | Size: 154 KiB |
BIN
images/ESP3D_01.jpg
Normal file
After Width: | Height: | Size: 594 KiB |
BIN
images/ESP3D_02.jpg
Normal file
After Width: | Height: | Size: 274 KiB |
BIN
images/ESP3D_03.jpg
Normal file
After Width: | Height: | Size: 303 KiB |
BIN
images/ESP3D_04.jpg
Normal file
After Width: | Height: | Size: 147 KiB |
BIN
images/ESP3D_Inst_01.jpg
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
images/ESP3D_Inst_02.jpg
Normal file
After Width: | Height: | Size: 270 KiB |
BIN
images/ESP3D_Inst_03.jpg
Normal file
After Width: | Height: | Size: 234 KiB |
BIN
images/ESP_01.jpg
Normal file
After Width: | Height: | Size: 690 KiB |
BIN
images/ESP_02.jpg
Normal file
After Width: | Height: | Size: 473 KiB |
BIN
images/ESP_03.jpg
Normal file
After Width: | Height: | Size: 718 KiB |
BIN
images/ESP_04.jpg
Normal file
After Width: | Height: | Size: 570 KiB |
BIN
images/ESP_05.jpg
Normal file
After Width: | Height: | Size: 592 KiB |
BIN
images/ESP_06.jpg
Normal file
After Width: | Height: | Size: 382 KiB |
BIN
images/install_cura_01.jpg
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
images/install_cura_02.jpg
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
images/install_cura_03.jpg
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
images/install_cura_04.jpg
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
images/manual_anycubic_main.jpg
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
images/manual_anycubic_setup.jpg
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
images/manual_anycubic_specialmenu.jpg
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
images/manual_dgus2_main.jpg
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
images/manual_dgus2_setup.jpg
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
images/manual_dgus2_specialmenu.jpg
Normal file
After Width: | Height: | Size: 98 KiB |
BIN
images/manual_dgus_main.jpg
Normal file
After Width: | Height: | Size: 88 KiB |
BIN
images/manual_dgus_setup.jpg
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
images/manual_dgus_specialmenu.jpg
Normal file
After Width: | Height: | Size: 104 KiB |
BIN
images/manual_specialmenu_open.jpg
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
images/manual_specialmenu_pid.jpg
Normal file
After Width: | Height: | Size: 104 KiB |
BIN
images/manual_specialmenu_saveeeprom.jpg
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
images/max_fanspeed_cura.jpg
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
images/trigorilla_002.jpg
Normal file
After Width: | Height: | Size: 144 KiB |
BIN
images/trigorilla_003.jpg
Normal file
After Width: | Height: | Size: 134 KiB |
BIN
images/trigorilla_1_0.jpg
Normal file
After Width: | Height: | Size: 146 KiB |
BIN
images/trigorilla_1_1.jpg
Normal file
After Width: | Height: | Size: 145 KiB |