Compare commits
52 Commits
1.5.0-beta
...
1.5.0
Author | SHA1 | Date | |
---|---|---|---|
|
c77aacbbd9 | ||
|
4206e3c4e8 | ||
|
dfc9cbe8b1 | ||
|
9c7e330363 | ||
|
580d56bd37 | ||
|
588f703684 | ||
|
c48395f801 | ||
|
f7060d5524 | ||
|
acee1592c9 | ||
|
442f66c145 | ||
|
b5b3da41f5 | ||
|
38edd9375b | ||
|
fb7a29ce8e | ||
|
056dd71494 | ||
|
09b448773f | ||
|
223df2956a | ||
|
9376b95148 | ||
|
fbd1b7b9bf | ||
|
61fba37678 | ||
|
7b0aa6ec6a | ||
|
70ccd6a957 | ||
|
6bc410a0e3 | ||
|
011752e02a | ||
|
471d7f47a0 | ||
|
0670fb9253 | ||
|
501ebfd159 | ||
|
dedc00fb0d | ||
|
acc3c74905 | ||
|
d1f269d654 | ||
|
d4fe673b96 | ||
|
862ac308c7 | ||
|
75c541cafb | ||
|
bb4ee37676 | ||
|
bf80c9b8dd | ||
|
79eaf1a8b5 | ||
|
ff5b808dea | ||
|
37ef0ca742 | ||
|
fd84ec3523 | ||
|
afa411f065 | ||
|
d93ff45af6 | ||
|
8fb71f482e | ||
|
325bcb7e01 | ||
|
0af71b9817 | ||
|
8e828a48b9 | ||
|
a356788dc7 | ||
|
6499c6b7c3 | ||
|
fda51c1c46 | ||
|
0c25c876d3 | ||
|
067fe2f074 | ||
|
e8d38ba955 | ||
|
6d257896c0 | ||
|
2af4a2d4e6 |
@@ -59,6 +59,7 @@
|
||||
*/
|
||||
#if ENABLED(KNUTWURST_CHIRON)
|
||||
#define TRIGORILLA_MAPPING_CHIRON
|
||||
#define NO_AUTO_ASSIGN_WARNING
|
||||
#else
|
||||
#define TRIGORILLA_MAPPING_I3MEGA
|
||||
#define SWAP_Z_MOTORS
|
||||
@@ -94,6 +95,7 @@
|
||||
*/
|
||||
#if ENABLED(KNUTWURST_4MAXP2)
|
||||
#define ANYCUBIC_4_MAX_PRO_ENDSTOPS
|
||||
#define NO_AUTO_ASSIGN_WARNING
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2851,14 +2853,14 @@
|
||||
// Preheat Constants - Up to 10 are supported without changes
|
||||
//
|
||||
#define PREHEAT_1_LABEL "PLA"
|
||||
#define PREHEAT_1_TEMP_HOTEND 180
|
||||
#define PREHEAT_1_TEMP_BED 70
|
||||
#define PREHEAT_1_TEMP_HOTEND 200
|
||||
#define PREHEAT_1_TEMP_BED 60
|
||||
// #define PREHEAT_1_TEMP_CHAMBER 35
|
||||
#define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
#define PREHEAT_2_LABEL "ABS"
|
||||
#define PREHEAT_2_TEMP_HOTEND 240
|
||||
#define PREHEAT_2_TEMP_BED 110
|
||||
#define PREHEAT_2_TEMP_BED 90
|
||||
// #define PREHEAT_2_TEMP_CHAMBER 35
|
||||
#define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255
|
||||
|
||||
|
@@ -1611,7 +1611,7 @@
|
||||
* - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!)
|
||||
* - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!)
|
||||
*/
|
||||
// #define SDCARD_SORT_ALPHA
|
||||
#define SDCARD_SORT_ALPHA
|
||||
|
||||
// SD Card Sorting options
|
||||
#if ENABLED(SDCARD_SORT_ALPHA)
|
||||
@@ -2658,7 +2658,47 @@
|
||||
*/
|
||||
#define ADVANCED_PAUSE_FEATURE
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#if DISABLED(KNUTWURST_4MAXP2)
|
||||
#if ENABLED(KNUTWURST_4MAXP2)
|
||||
#define PAUSE_PARK_RETRACT_FEEDRATE 40 // (mm/s) Initial retract feedrate.
|
||||
#define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
|
||||
// This short retract is done immediately, before parking the nozzle.
|
||||
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 30 // (mm/s) Unload filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||
#define FILAMENT_CHANGE_UNLOAD_LENGTH 5 // (mm) The length of filament for a complete unload.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
// Set to 0 for manual unloading.
|
||||
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
|
||||
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
|
||||
// 0 to disable start loading and skip to fast load only
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 30 // (mm/s) Load filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 10 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_CHIRON)
|
||||
#define PAUSE_PARK_RETRACT_FEEDRATE 40 // (mm/s) Initial retract feedrate.
|
||||
#define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
|
||||
// This short retract is done immediately, before parking the nozzle.
|
||||
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 30 // (mm/s) Unload filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||
#define FILAMENT_CHANGE_UNLOAD_LENGTH 5 // (mm) The length of filament for a complete unload.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
// Set to 0 for manual unloading.
|
||||
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
|
||||
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
|
||||
// 0 to disable start loading and skip to fast load only
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 30 // (mm/s) Load filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 25 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 550 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
#endif
|
||||
|
||||
#if NONE(KNUTWURST_CHIRON, KNUTWURST_4MAXP2)
|
||||
#define PAUSE_PARK_RETRACT_FEEDRATE 40 // (mm/s) Initial retract feedrate.
|
||||
#define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
|
||||
// This short retract is done immediately, before parking the nozzle.
|
||||
@@ -2676,24 +2716,6 @@
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 538 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
#else
|
||||
#define PAUSE_PARK_RETRACT_FEEDRATE 40 // (mm/s) Initial retract feedrate.
|
||||
#define PAUSE_PARK_RETRACT_LENGTH 1 // (mm) Initial retract.
|
||||
// This short retract is done immediately, before parking the nozzle.
|
||||
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 0 // (mm/s) Unload filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_UNLOAD_ACCEL 30 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||
#define FILAMENT_CHANGE_UNLOAD_LENGTH 0 // (mm) The length of filament for a complete unload.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
// Set to 0 for manual unloading.
|
||||
#define FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE 6 // (mm/s) Slow move when starting load.
|
||||
#define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 // (mm) Slow length, to allow time to insert material.
|
||||
// 0 to disable start loading and skip to fast load only
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_FEEDRATE 30 // (mm/s) Load filament feedrate. This can be pretty fast.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_ACCEL 10 // (mm/s^2) Lower acceleration may allow a faster feedrate.
|
||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 5 // (mm) Load length of filament, from extruder gear to nozzle.
|
||||
// For Bowden, the full length of the tube and nozzle.
|
||||
// For direct drive, the full length of the nozzle.
|
||||
#endif
|
||||
|
||||
#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
|
||||
|
@@ -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.5.0-b6"
|
||||
#define CUSTOM_BUILD_VERSION "1.5.0"
|
||||
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2023-05-30"
|
||||
#define STRING_DISTRIBUTION_DATE "2023-06-07"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -26,15 +26,15 @@
|
||||
|
||||
#include "../ui_api.h"
|
||||
#include "../../../gcode/queue.h"
|
||||
#include "../../../feature/bedlevel/bedlevel.h"
|
||||
#include "../../../libs/buzzer.h"
|
||||
#include "../../../libs/numtostr.h"
|
||||
#include "../../../module/temperature.h"
|
||||
#include "../../../module/motion.h"
|
||||
#include "../../../module/settings.h"
|
||||
#include "../../../module/stepper.h"
|
||||
|
||||
//#define ANYCUBIC_TFT_DEBUG
|
||||
//#define KNUTWURST_DGUS2_TFT
|
||||
//#define KNUTWURST_TFT_LEVELING
|
||||
|
||||
#ifdef ANYCUBIC_TOUCHSCREEN
|
||||
#include "./anycubic_touchscreen.h"
|
||||
@@ -68,82 +68,6 @@
|
||||
AnycubicMediaPrintState AnycubicTouchscreenClass::mediaPrintingState = AMPRINTSTATE_NOT_PRINTING;
|
||||
AnycubicMediaPauseState AnycubicTouchscreenClass::mediaPauseState = AMPAUSESTATE_NOT_PAUSED;
|
||||
|
||||
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||
int z_values_index;
|
||||
int z_values_size;
|
||||
float SAVE_zprobe_zoffset;
|
||||
uint8_t x;
|
||||
uint8_t y;
|
||||
|
||||
void restore_z_values() {
|
||||
uint16_t size = z_values_size;
|
||||
int pos = z_values_index;
|
||||
uint8_t* value = (uint8_t*)&bedlevel.z_values;
|
||||
do {
|
||||
uint8_t c = eeprom_read_byte((unsigned char*)pos);
|
||||
*value = c;
|
||||
pos++;
|
||||
value++;
|
||||
if(pos > 32766)
|
||||
break;
|
||||
} while (--size);
|
||||
}
|
||||
|
||||
void setupMyZoffset() {
|
||||
#if ENABLED(AUTO_BED_LEVELING_BILINEAR)
|
||||
SERIAL_ECHOPGM("MEANL_L:", 0x55);
|
||||
SAVE_zprobe_zoffset = probe.offset.z;
|
||||
#else
|
||||
SERIAL_ECHOPGM("MEANL_L:", 0xaa);
|
||||
constexpr float dpo[] = NOZZLE_TO_PROBE_OFFSET;
|
||||
probe.offset.z = dpo[Z_AXIS];
|
||||
#endif
|
||||
}
|
||||
|
||||
void initializeGrid() {
|
||||
#if ENABLED(PROBE_MANUALLY)
|
||||
#define ABL_VAR static
|
||||
#else
|
||||
#define ABL_VAR
|
||||
#endif
|
||||
|
||||
ABL_VAR xy_pos_t probe_position_lf, probe_position_rb;
|
||||
// ABL_VAR xy_float_t gridSpacing = { 0, 0 };
|
||||
|
||||
const float x_min = probe.min_x(), x_max = probe.max_x(),
|
||||
y_min = probe.min_y(), y_max = probe.max_y();
|
||||
|
||||
constexpr xy_uint8_t abl_grid_points = { GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y };
|
||||
GCodeParser parser;
|
||||
|
||||
// Reset grid to 0.0 or "not probed". (Also disables ABL)
|
||||
reset_bed_level();
|
||||
|
||||
// Initialize a grid with the given dimensions
|
||||
probe_position_lf.set(
|
||||
parser.seenval('L') ? RAW_X_POSITION(parser.value_linear_units()) : x_min,
|
||||
parser.seenval('F') ? RAW_Y_POSITION(parser.value_linear_units()) : y_min
|
||||
);
|
||||
probe_position_rb.set(
|
||||
parser.seenval('R') ? RAW_X_POSITION(parser.value_linear_units()) : x_max,
|
||||
parser.seenval('B') ? RAW_Y_POSITION(parser.value_linear_units()) : y_max
|
||||
);
|
||||
LevelingBilinear::grid_spacing.set((probe_position_rb.x - probe_position_lf.x) / (abl_grid_points.x - 1),
|
||||
(probe_position_rb.y - probe_position_lf.y) / (abl_grid_points.y - 1));
|
||||
|
||||
LevelingBilinear::grid_start = probe_position_lf;
|
||||
// Can't re-enable (on error) until the new grid is written
|
||||
set_bed_leveling_enabled(false);
|
||||
|
||||
constexpr float dpo[] = NOZZLE_TO_PROBE_OFFSET;
|
||||
probe.offset.z = dpo[Z_AXIS];
|
||||
|
||||
for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++)
|
||||
for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) bedlevel.z_values[x][y] = float(-1.0);
|
||||
bedlevel.refresh_bed_level();
|
||||
set_bed_leveling_enabled(true);
|
||||
}
|
||||
#endif // if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||
|
||||
#if ENABLED(POWER_OUTAGE_TEST)
|
||||
int PowerInt = 6;
|
||||
@@ -197,6 +121,7 @@
|
||||
CaseLight = false;
|
||||
currentFlowRate = 100;
|
||||
flowRateBuffer = SM_FLOW_DISP_L;
|
||||
live_Zoffset = 0.0;
|
||||
|
||||
#if BOTH(SDSUPPORT, HAS_SD_DETECT)
|
||||
SET_INPUT_PULLUP(SD_DETECT_PIN);
|
||||
@@ -206,11 +131,6 @@
|
||||
SET_INPUT_PULLUP(FIL_RUNOUT1_PIN);
|
||||
#endif
|
||||
|
||||
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||
setupMyZoffset();
|
||||
delay(10);
|
||||
#endif
|
||||
|
||||
setup_OutageTestPin();
|
||||
setup_PowerOffPin();
|
||||
|
||||
@@ -219,7 +139,6 @@
|
||||
CheckHeaterError();
|
||||
DoFilamentRunoutCheck();
|
||||
|
||||
|
||||
#ifdef STARTUP_CHIME
|
||||
BUZZ(100, 554);
|
||||
BUZZ(100, 740);
|
||||
@@ -278,6 +197,7 @@
|
||||
SERIAL_ECHOPGM(" ");
|
||||
SERIAL_ECHOLN(currentFileOrDirectory);
|
||||
#endif
|
||||
setSoftEndstopState(false);
|
||||
mediaPrintingState = AMPRINTSTATE_PRINTING;
|
||||
mediaPauseState = AMPAUSESTATE_NOT_PAUSED;
|
||||
printFile(currentFileOrDirectory);
|
||||
@@ -300,6 +220,7 @@
|
||||
|
||||
inline void AnycubicTouchscreenClass::StopPrint() {
|
||||
#if ENABLED(SDSUPPORT)
|
||||
setSoftEndstopState(true);
|
||||
mediaPrintingState = AMPRINTSTATE_STOP_REQUESTED;
|
||||
mediaPauseState = AMPAUSESTATE_NOT_PAUSED;
|
||||
SENDLINE_DBG_PGM("J16", "TFT Serial Debug: SD print stop called... J16");
|
||||
@@ -413,7 +334,7 @@
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_SAVE_EEPROM_S)) != NULL)
|
||||
) {
|
||||
SERIAL_ECHOLNPGM("Special Menu: Save EEPROM");
|
||||
settings.save(); // M500
|
||||
injectCommands(F("M500"));
|
||||
BUZZ(105, 1108);
|
||||
BUZZ(210, 1661);
|
||||
}
|
||||
@@ -421,10 +342,7 @@
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_LOAD_DEFAULTS_S)) != NULL)
|
||||
) {
|
||||
SERIAL_ECHOLNPGM("Special Menu: Load FW Defaults");
|
||||
settings.reset(); // M502
|
||||
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||
initializeGrid();
|
||||
#endif
|
||||
injectCommands(F("M502"));
|
||||
BUZZ(105, 1661);
|
||||
BUZZ(210, 1108);
|
||||
}
|
||||
@@ -440,6 +358,8 @@
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_MESH_MENU_S)) != NULL)
|
||||
) {
|
||||
MMLMenu = true;
|
||||
SERIAL_ECHOLNPGM("Special Menu: Manual Med Leveling + disable soft endstops");
|
||||
setSoftEndstopState(false);
|
||||
}
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_MESH_START_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_MESH_START_S)) != NULL)
|
||||
@@ -507,8 +427,7 @@
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_RESETLV_S)) != NULL)
|
||||
) {
|
||||
SERIAL_ECHOLNPGM("Special Menu: initializeGrid()");
|
||||
initializeGrid();
|
||||
settings.save();
|
||||
injectCommands(F("M501\nM420 S1"));
|
||||
BUZZ(105, 1108);
|
||||
BUZZ(210, 1661);
|
||||
}
|
||||
@@ -531,8 +450,7 @@
|
||||
) {
|
||||
SERIAL_ECHOLNPGM("Special Menu: Disable Filament Sensor");
|
||||
injectCommands(F("M412 H0 S0\nM500"));
|
||||
BUZZ(105, 1108);
|
||||
BUZZ(105, 1108);
|
||||
BUZZ(210, 1661);
|
||||
BUZZ(105, 1108);
|
||||
}
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EN_FILSENS_L)) != NULL)
|
||||
@@ -541,7 +459,7 @@
|
||||
SERIAL_ECHOLNPGM("Special Menu: Enable Filament Sensor");
|
||||
injectCommands(F("M412 H0 S1\nM500"));
|
||||
BUZZ(105, 1108);
|
||||
BUZZ(105, 1108);
|
||||
BUZZ(210, 1661);
|
||||
}
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EXIT_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EXIT_S)) != NULL)
|
||||
@@ -551,6 +469,8 @@
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BACK_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BACK_S)) != NULL)
|
||||
) {
|
||||
SERIAL_ECHOLNPGM("Special Menu: Exit Manual Med Leveling + enable soft endstops");
|
||||
setSoftEndstopState(true);
|
||||
MMLMenu = false;
|
||||
}
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_FLOWMENU_L)) != NULL)
|
||||
@@ -599,6 +519,7 @@
|
||||
) {
|
||||
SERIAL_ECHOLNPGM("Special Menu: Enter BLTouch Menu");
|
||||
BLTouchMenu = true;
|
||||
setSoftEndstopState(false);
|
||||
}
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_UP_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTZ_UP_S)) != NULL)
|
||||
@@ -612,15 +533,34 @@
|
||||
SERIAL_ECHOLNPGM("Special Menu: Offset Down");
|
||||
probe.offset.z -= 0.01F;
|
||||
}
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_HS_ENABLE_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_HS_ENABLE_S)) != NULL)
|
||||
) {
|
||||
SERIAL_ECHOLNPGM("Special Menu: HighSpeed Mode ENABLED");
|
||||
injectCommands(F("M401 S1\nM500"));
|
||||
BUZZ(105, 1108);
|
||||
BUZZ(210, 1661);
|
||||
}
|
||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_HS_DISABLE_L)) != NULL)
|
||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_HS_DISABLE_S)) != NULL)
|
||||
) {
|
||||
SERIAL_ECHOLNPGM("Special Menu: HighSpeed Mode DISABLED!");
|
||||
injectCommands(F("M401 S0\nM500"));
|
||||
BUZZ(210, 1661);
|
||||
BUZZ(105, 1108);
|
||||
}
|
||||
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
|
||||
setSoftEndstopState(true);
|
||||
injectCommands(F("M500"));
|
||||
BUZZ(105, 1108);
|
||||
BUZZ(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)
|
||||
@@ -707,24 +647,21 @@
|
||||
|
||||
|
||||
void AnycubicTouchscreenClass::RenderCurrentFileList() {
|
||||
uint16_t selectedNumber = 0;
|
||||
FileList currentFileList;
|
||||
currentFileOrDirectory[0] = 0;
|
||||
|
||||
if (SpecialMenu == false) {
|
||||
currentTouchscreenSelection[0] = 0;
|
||||
}
|
||||
|
||||
|
||||
SENDLINE_PGM("FN "); // Filelist start
|
||||
|
||||
if (!isMediaInserted() && !SpecialMenu) {
|
||||
SENDLINE_DBG_PGM("J02", "TFT Serial Debug: No SD Card mounted to render Current File List... J02");
|
||||
|
||||
SENDLINE_PGM(SM_SPECIAL_MENU_S);
|
||||
SENDLINE_PGM(SM_SPECIAL_MENU_L);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
uint16_t selectedNumber = 0;
|
||||
FileList currentFileList;
|
||||
|
||||
if (CodeSeen('S')) {
|
||||
selectedNumber = CodeValue();
|
||||
}
|
||||
@@ -818,6 +755,10 @@ void AnycubicTouchscreenClass::RenderSpecialMenu(uint16_t selectedNumber) {
|
||||
break;
|
||||
|
||||
case 4: // Page 2
|
||||
SENDLINE_PGM(SM_HS_ENABLE_S);
|
||||
SENDLINE_PGM(SM_HS_ENABLE_L);
|
||||
SENDLINE_PGM(SM_HS_DISABLE_S);
|
||||
SENDLINE_PGM(SM_HS_DISABLE_L);
|
||||
SENDLINE_PGM(SM_BLTZ_EXIT_S);
|
||||
SENDLINE_PGM(SM_BLTZ_EXIT_L);
|
||||
break;
|
||||
@@ -970,59 +911,68 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||
SERIAL_ECHOLN(currentFileList.filename());
|
||||
#endif
|
||||
|
||||
/*
|
||||
if (currentFileList.isDir()) {
|
||||
SEND_PGM("/");
|
||||
SENDLINE(currentFileList.shortFilename());
|
||||
SEND_PGM("/");
|
||||
SENDLINE(currentFileList.filename());
|
||||
} else {
|
||||
SENDLINE(currentFileList.shortFilename());
|
||||
SENDLINE(currentFileList.filename());
|
||||
}
|
||||
*/
|
||||
|
||||
// The longname may not be filed, so we use the built-in fallback here.
|
||||
const char* fileName = currentFileList.filename();
|
||||
char* fileName = strdup(currentFileList.filename());
|
||||
int fileNameLen = strlen(fileName);
|
||||
bool fileNameWasCut = false;
|
||||
|
||||
// Cut off too long filenames.
|
||||
// They don't fit on the screen anyway.
|
||||
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
||||
bool fileNameWasCut = false;
|
||||
if (fileNameLen >= MAX_PRINTABLE_FILENAME_LEN) {
|
||||
fileNameWasCut = true;
|
||||
fileNameLen = MAX_PRINTABLE_FILENAME_LEN;
|
||||
}
|
||||
char outputString[MAX_PRINTABLE_FILENAME_LEN];
|
||||
#else
|
||||
char outputString[fileNameLen];
|
||||
#endif
|
||||
|
||||
char outputString[fileNameLen];
|
||||
|
||||
// Bugfix for non-printable special characters
|
||||
// which are now replaced by underscores.
|
||||
for (unsigned char i = 0; i <= fileNameLen; i++) {
|
||||
if (i >= fileNameLen) {
|
||||
outputString[i] = ' ';
|
||||
}
|
||||
else {
|
||||
if (isPrintable(fileName[i])) {
|
||||
outputString[i] = fileName[i];
|
||||
if (!isPrintable(outputString[i]))
|
||||
outputString[i] = '_';
|
||||
} else {
|
||||
outputString[i] = '_';
|
||||
}
|
||||
}
|
||||
|
||||
// I know, it's ugly, but it's faster than a string lib
|
||||
if (fileNameWasCut) {
|
||||
outputString[fileNameLen - 7] = '~';
|
||||
outputString[fileNameLen - 6] = '.';
|
||||
outputString[fileNameLen - 5] = 'g';
|
||||
outputString[fileNameLen - 4] = 'c';
|
||||
outputString[fileNameLen - 3] = 'o';
|
||||
outputString[fileNameLen - 2] = 'd';
|
||||
outputString[fileNameLen - 1] = 'e';
|
||||
}
|
||||
|
||||
outputString[fileNameLen] = '\0';
|
||||
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
||||
if (fileNameWasCut) {
|
||||
outputString[MAX_PRINTABLE_FILENAME_LEN - 7] = '~';
|
||||
outputString[MAX_PRINTABLE_FILENAME_LEN - 6] = '.';
|
||||
outputString[MAX_PRINTABLE_FILENAME_LEN - 5] = 'g';
|
||||
outputString[MAX_PRINTABLE_FILENAME_LEN - 4] = 'c';
|
||||
outputString[MAX_PRINTABLE_FILENAME_LEN - 3] = 'o';
|
||||
outputString[MAX_PRINTABLE_FILENAME_LEN - 2] = 'd';
|
||||
outputString[MAX_PRINTABLE_FILENAME_LEN - 1] = 'e';
|
||||
outputString[MAX_PRINTABLE_FILENAME_LEN] = '\0';
|
||||
} else if (currentFileList.isDir()) {
|
||||
for (unsigned char i = fileNameLen; i < MAX_PRINTABLE_FILENAME_LEN - 7; i++) {
|
||||
outputString[i] = ' ';
|
||||
}
|
||||
outputString[MAX_PRINTABLE_FILENAME_LEN - 7] = '\0';
|
||||
} else {
|
||||
for (unsigned char i = fileNameLen; i < MAX_PRINTABLE_FILENAME_LEN; i++) {
|
||||
outputString[i] = ' ';
|
||||
}
|
||||
// fix for .GCO files, which are not displayed correctly.
|
||||
if (outputString[fileNameLen - 4] == '.') {
|
||||
outputString[fileNameLen - 4] = '.';
|
||||
outputString[fileNameLen - 3] = 'g';
|
||||
outputString[fileNameLen - 2] = 'c';
|
||||
outputString[fileNameLen - 1] = 'o';
|
||||
outputString[fileNameLen ] = 'd';
|
||||
outputString[fileNameLen + 1] = 'e';
|
||||
}
|
||||
outputString[MAX_PRINTABLE_FILENAME_LEN] = '\0';
|
||||
}
|
||||
#else
|
||||
outputString[fileNameLen] = '\0';
|
||||
#endif
|
||||
|
||||
|
||||
if (currentFileList.isDir()) {
|
||||
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
||||
@@ -1036,7 +986,7 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||
SEND_PGM("/");
|
||||
SENDLINE(currentFileList.shortFilename());
|
||||
SEND_PGM("/");
|
||||
SENDLINE(currentFileList.filename());
|
||||
SENDLINE(outputString);
|
||||
#endif
|
||||
SERIAL_ECHO(count);
|
||||
SERIAL_ECHOPGM(": /");
|
||||
@@ -1186,46 +1136,6 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||
TFTcmdbuffer[TFTbufindw][serial3_count] = 0; // terminate string
|
||||
|
||||
if (!TFTcomment_mode) {
|
||||
/*
|
||||
// -------- START ERROR CORRECTION ----------
|
||||
TFTcomment_mode = false; //for new command
|
||||
if (strchr(TFTcmdbuffer[TFTbufindw], 'N') != NULL)
|
||||
{
|
||||
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)
|
||||
{
|
||||
SEND_PGM("ERR ");
|
||||
LCD_SERIAL.flush();
|
||||
SEND_PGM("ERR ");
|
||||
LCD_SERIAL.flush();
|
||||
serial3_count = 0;
|
||||
return;
|
||||
}
|
||||
//if no errors, continue parsing
|
||||
} else {
|
||||
SEND_PGM("ERR ");
|
||||
LCD_SERIAL.flush();
|
||||
serial3_count = 0;
|
||||
return;
|
||||
}
|
||||
//if no errors, continue parsing
|
||||
} else { // if we don't receive 'N' but still see '*'
|
||||
if ((strchr(TFTcmdbuffer[TFTbufindw], '*') != NULL))
|
||||
{
|
||||
SEND_PGM("ERR ");
|
||||
serial3_count = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
// -------- FINISH ERROR CORRECTION ----------
|
||||
*/
|
||||
|
||||
if ((strchr(TFTcmdbuffer[TFTbufindw], 'A') != NULL)) {
|
||||
TFTstrchr_pointer = strchr(TFTcmdbuffer[TFTbufindw], 'A');
|
||||
switch ((int)((strtod(&TFTcmdbuffer[TFTbufindw][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindw] + 1], NULL)))) {
|
||||
@@ -1287,20 +1197,8 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||
|
||||
case 8: // A8 GET SD LIST
|
||||
#ifdef SDSUPPORT
|
||||
if (SpecialMenu == false)
|
||||
currentTouchscreenSelection[0] = 0;
|
||||
|
||||
#if DISABLED(KNUTWURST_SPECIAL_MENU_WO_SD)
|
||||
if (!IS_SD_INSERTED()) {
|
||||
SENDLINE_DBG_PGM("J02", "TFT Serial Debug: No SD Card mounted to render Current File List... J02");
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (CodeSeen('S')) filenumber = CodeValue();
|
||||
//PrintList();
|
||||
if (SpecialMenu == false) currentTouchscreenSelection[0] = 0;
|
||||
RenderCurrentFileList();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
@@ -1363,12 +1261,11 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||
|
||||
case 15: // A15 RESUMING FROM OUTAGE
|
||||
#if defined(POWER_OUTAGE_TEST)
|
||||
if ((!planner.movesplanned()) && (TFTstate != ANYCUBIC_TFT_STATE_SDPAUSE)) {
|
||||
if (!isPrinting()) {
|
||||
if (card.isFileOpen()) FlagResumFromOutage = true;
|
||||
|
||||
ResumingFlag = 1;
|
||||
card.startOrResumeFilePrinting();
|
||||
starttime = millis();
|
||||
resumePrint();
|
||||
SENDLINE_PGM("OK");
|
||||
}
|
||||
#endif
|
||||
@@ -1605,85 +1502,146 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||
case 29: // A29 bed grid read
|
||||
{
|
||||
int mx, my;
|
||||
xy_uint8_t pos;
|
||||
float pos_z;
|
||||
|
||||
if (CodeSeen('X')) mx = CodeValueInt();
|
||||
if (CodeSeen('Y')) my = CodeValueInt();
|
||||
if (CodeSeen('X')) pos.x = CodeValueInt();
|
||||
if (CodeSeen('Y')) pos.y = CodeValueInt();
|
||||
|
||||
float Zvalue = bedlevel.z_values[mx][my];
|
||||
Zvalue = Zvalue * 100;
|
||||
pos_z = getMeshPoint(pos);
|
||||
|
||||
SEND_PGM("A29V ");
|
||||
LCD_SERIAL.print(pos_z * 100, 2);
|
||||
SENDLINE_PGM("");
|
||||
|
||||
if (!isPrinting()) {
|
||||
if (!all_axes_trusted()) {
|
||||
injectCommands(F("G28\n"));
|
||||
/*
|
||||
set_axis_is_at_home(X_AXIS);
|
||||
sync_plan_position();
|
||||
set_axis_is_at_home(Y_AXIS);
|
||||
sync_plan_position();
|
||||
set_axis_is_at_home(Z_AXIS);
|
||||
sync_plan_position();
|
||||
report_current_position();
|
||||
*/
|
||||
}
|
||||
else {
|
||||
// Go up before moving
|
||||
// SERIAL_ECHOLNPGM("Z Up");
|
||||
setAxisPosition_mm(5.0, Z);
|
||||
// report_current_position();
|
||||
setAxisPosition_mm(LevelingBilinear::get_mesh_x(mx), X);
|
||||
// report_current_position();
|
||||
setAxisPosition_mm(LevelingBilinear::get_mesh_y(my), Y);
|
||||
// report_current_position();
|
||||
setAxisPosition_mm(EXT_LEVEL_HIGH, Z);
|
||||
setSoftEndstopState(true);
|
||||
if ((selectedmeshpoint.x == pos.x) && (selectedmeshpoint.y == pos.y)) {
|
||||
if (!isPositionKnown())
|
||||
injectCommands_P(G28_STR);
|
||||
|
||||
report_current_position();
|
||||
if (isPositionKnown()) {
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNPGM("Moving to mesh point at x: ", pos.x, " y: ", pos.y, " z: ", pos_z);
|
||||
#endif
|
||||
setAxisPosition_mm(5.0,Z);
|
||||
setAxisPosition_mm(17 + (93 * pos.x), X);
|
||||
setAxisPosition_mm(20 + (93 * pos.y), Y);
|
||||
setAxisPosition_mm(0.0, Z);
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNPGM("Current Z: ", getAxisPosition_mm(Z));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
selectedmeshpoint.x = pos.x;
|
||||
selectedmeshpoint.y = pos.y;
|
||||
}
|
||||
SEND_PGM("A29V ");
|
||||
LCD_SERIAL.print(Zvalue, 2);
|
||||
SENDLINE_PGM("");
|
||||
}
|
||||
break;
|
||||
|
||||
case 30: // A30 auto leveling (Old Anycubic TFT)
|
||||
if (isPrinting())
|
||||
SENDLINE_DBG_PGM("J24", "TFT Serial Debug: Forbid auto leveling... J24");
|
||||
else
|
||||
SENDLINE_DBG_PGM("J26", "TFT Serial Debug: Start auto leveling... J26");
|
||||
if (CodeSeen('S'))
|
||||
queue.enqueue_now_P(PSTR("G28\nG29\nM500\nG90\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300\nG1 Z30 F4000\nG1 X0 F4000\nG91\nM84"));
|
||||
case 30: // A30 auto leveling (Old Anycubic TFT)
|
||||
if (CodeSeen('S')) {
|
||||
if (isPrinting()) {
|
||||
SENDLINE_DBG_PGM("J24", "TFT Serial Debug: Forbid auto leveling... J24");
|
||||
} else {
|
||||
SENDLINE_DBG_PGM("J26", "TFT Serial Debug: Start auto leveling... J26");
|
||||
//injectCommands(F("G28\nG29"));
|
||||
injectCommands(F("G28\nG29\nG90\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300\nG1 Z30 F4000\nG1 X5 F4000\nG91\nM84\nM420 S1"));
|
||||
mediaPrintingState = AMPRINTSTATE_PROBING;
|
||||
}
|
||||
} else {
|
||||
SENDLINE_DBG_PGM("J26", "TFT Serial Debug: Enable level menu... J26");
|
||||
}
|
||||
break;
|
||||
|
||||
case 31: // A31 z-offset
|
||||
if (CodeSeen('S')) { // set
|
||||
// soft_endstops_enabled = false; // disable endstops
|
||||
float value = constrain(CodeValue(), -1.0, 1.0);
|
||||
probe.offset.z += value;
|
||||
for (x = 0; x < GRID_MAX_POINTS_X; x++)
|
||||
for (y = 0; y < GRID_MAX_POINTS_Y; y++) bedlevel.z_values[x][y] += value;
|
||||
set_bed_leveling_enabled(true);
|
||||
bedlevel.refresh_bed_level();
|
||||
|
||||
SEND_PGM("A31V ");
|
||||
LCD_SERIAL.print(float(probe.offset.z), 2);
|
||||
SENDLINE_PGM("");
|
||||
if (CodeSeen('C')) { // Restore and apply original offsets
|
||||
if (!isPrinting()) {
|
||||
injectCommands(F("M501\nM420 S1"));
|
||||
selectedmeshpoint.x = selectedmeshpoint.y = 99;
|
||||
SERIAL_ECHOLNF(F("Mesh changes abandoned, previous mesh restored."));
|
||||
}
|
||||
}
|
||||
|
||||
if (CodeSeen('G')) { // get
|
||||
SAVE_zprobe_zoffset = probe.offset.z;
|
||||
SEND_PGM("A31V ");
|
||||
LCD_SERIAL.print(float(SAVE_zprobe_zoffset), 2);
|
||||
SENDLINE_PGM("");
|
||||
else if (CodeSeen('D')) { // Save Z Offset tables and restore leveling state
|
||||
if (!isPrinting()) {
|
||||
setAxisPosition_mm(5.0,Z); // Lift nozzle before any further movements are made
|
||||
injectCommands(F("M500"));
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNF(F("Mesh changes saved."));
|
||||
#endif
|
||||
selectedmeshpoint.x = selectedmeshpoint.y = 99;
|
||||
}
|
||||
}
|
||||
|
||||
if (CodeSeen('D')) { // save
|
||||
SAVE_zprobe_zoffset = probe.offset.z;
|
||||
settings.save();
|
||||
set_bed_leveling_enabled(true);
|
||||
bedlevel.refresh_bed_level();
|
||||
else if (CodeSeen('G')) { // Get current offset
|
||||
if (isPrinting()) {
|
||||
SEND_PGM("A31V ");
|
||||
LCD_SERIAL.print(live_Zoffset, 2);
|
||||
SENDLINE_PGM("");
|
||||
} else {
|
||||
SEND_PGM("A31V ");
|
||||
LCD_SERIAL.print(getZOffset_mm(), 2);
|
||||
SENDLINE_PGM("");
|
||||
selectedmeshpoint.x = selectedmeshpoint.y = 99;
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
if (CodeSeen('S')) { // Set offset (adjusts all points by value)
|
||||
float Zshift = CodeValue();
|
||||
setSoftEndstopState(false);
|
||||
if (isPrinting()) {
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNPGM("Change Zoffset from:", live_Zoffset, " to ", live_Zoffset + Zshift);
|
||||
#endif
|
||||
if (isAxisPositionKnown(Z)) {
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
const float currZpos = getAxisPosition_mm(Z);
|
||||
SERIAL_ECHOLNPGM("Nudge Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05));
|
||||
#endif
|
||||
int16_t steps = mmToWholeSteps(constrain(Zshift,-0.05,0.05), Z);
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNPGM("Steps to move Z: ", steps);
|
||||
#endif
|
||||
babystepAxis_steps(steps, Z);
|
||||
live_Zoffset += Zshift;
|
||||
}
|
||||
|
||||
SEND_PGM("A31V ");
|
||||
LCD_SERIAL.print(live_Zoffset, 2);
|
||||
SENDLINE_PGM("");
|
||||
}
|
||||
else {
|
||||
GRID_LOOP(x, y) {
|
||||
const xy_uint8_t pos { x, y };
|
||||
const float currval = getMeshPoint(pos);
|
||||
setMeshPoint(pos, constrain(currval + Zshift, -10, 2));
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNPGM("Change mesh point X", x," Y",y ," from ", currval, " to ", getMeshPoint(pos) );
|
||||
#endif
|
||||
}
|
||||
const float currZOffset = getZOffset_mm();
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNPGM("Change probe offset from ", currZOffset, " to ", currZOffset + Zshift);
|
||||
#endif
|
||||
|
||||
setZOffset_mm(currZOffset + Zshift);
|
||||
|
||||
SEND_PGM("A31V ");
|
||||
LCD_SERIAL.print(getZOffset_mm(), 2);
|
||||
SENDLINE_PGM("");
|
||||
|
||||
if (isAxisPositionKnown(Z)) {
|
||||
const float currZpos = getAxisPosition_mm(Z);
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNPGM("Move Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05));
|
||||
#endif
|
||||
setAxisPosition_mm(currZpos+constrain(Zshift,-0.05,0.05),Z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
SENDLINE_PGM("");
|
||||
break;
|
||||
|
||||
case 32: // a32 clean leveling beep flag
|
||||
@@ -1697,25 +1655,36 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||
|
||||
case 34: // a34 bed grid write
|
||||
{
|
||||
if (CodeSeen('X')) x = constrain(CodeValueInt(), 0, GRID_MAX_POINTS_X);
|
||||
if (CodeSeen('Y')) y = constrain(CodeValueInt(), 0, GRID_MAX_POINTS_Y);
|
||||
xy_uint8_t pos;
|
||||
if (CodeSeen('X')) pos.x = constrain(CodeValueInt(), 0, GRID_MAX_POINTS_X);
|
||||
if (CodeSeen('Y')) pos.y = constrain(CodeValueInt(), 0, GRID_MAX_POINTS_Y);
|
||||
|
||||
float currmesh = getMeshPoint(pos);
|
||||
|
||||
if (CodeSeen('V')) {
|
||||
float new_z_value = float(constrain(CodeValue() / 100, -10, 10));
|
||||
bedlevel.z_values[x][y] = new_z_value;
|
||||
set_bed_leveling_enabled(true);
|
||||
bedlevel.refresh_bed_level();
|
||||
float newval = float(constrain(CodeValue() / 100, -10, 10));
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNPGM("Change mesh point x:", pos.x, " y:", pos.y);
|
||||
SERIAL_ECHOLNPGM("from ", currmesh, " to ", newval);
|
||||
#endif
|
||||
setMeshPoint(pos,newval);
|
||||
if (mediaPrintingState == AMPRINTSTATE_NOT_PRINTING || mediaPrintingState == AMPRINTSTATE_PROBING) {
|
||||
if (selectedmeshpoint.x == pos.x && selectedmeshpoint.y == pos.y) {
|
||||
setSoftEndstopState(false);
|
||||
float currZpos = getAxisPosition_mm(Z);
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNPGM("Move Z pos from ", currZpos, " to ", currZpos + constrain(newval - currmesh, -0.05, 0.05));
|
||||
#endif
|
||||
setAxisPosition_mm(currZpos + constrain(newval - currmesh, -0.05, 0.05), Z);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CodeSeen('S')) {
|
||||
bedlevel.refresh_bed_level();
|
||||
set_bed_leveling_enabled(true);
|
||||
settings.save();
|
||||
injectCommands(F("M500"));
|
||||
}
|
||||
if (CodeSeen('C')) {
|
||||
restore_z_values();
|
||||
probe.offset.z = SAVE_zprobe_zoffset;
|
||||
set_bed_leveling_enabled(true);
|
||||
bedlevel.refresh_bed_level();
|
||||
injectCommands(F("M501\nM420 S1"));
|
||||
selectedmeshpoint.x = selectedmeshpoint.y = 99;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1725,13 +1694,8 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||
break;
|
||||
|
||||
case 36: // A36 auto leveling (New Anycubic TFT)
|
||||
if (isPrinting())
|
||||
SENDLINE_DBG_PGM("J24", "TFT Serial Debug: Forbid auto leveling... J24");
|
||||
else
|
||||
SENDLINE_DBG_PGM("J26", "TFT Serial Debug: Start auto leveling... J26");
|
||||
if (CodeSeen('S'))
|
||||
queue.enqueue_now_P(PSTR("G28\nG29\nM500\nG90\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300\nG1 Z30 F4000\nG1 X0 F4000\nG91\nM84"));
|
||||
|
||||
SENDLINE_DBG_PGM("J26", "TFT Serial Debug: Start auto leveling... J26");
|
||||
break;
|
||||
#endif // if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||
|
||||
#if ENABLED(KNUTWURST_4MAXP2)
|
||||
@@ -1743,19 +1707,35 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||
case 41:
|
||||
if (CodeSeen('O')) {
|
||||
PrintdoneAndPowerOFF = true;
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNPGM("TFT Serial Debug: PrintdoneAndPowerOFF is set!");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
else if (CodeSeen('C')) {
|
||||
PrintdoneAndPowerOFF = false;
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNPGM("TFT Serial Debug: PrintdoneAndPowerOFF is disabled!");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
if (CodeSeen('S')) {
|
||||
if (PrintdoneAndPowerOFF)
|
||||
SENDLINE_PGM("J35 ");
|
||||
else
|
||||
SENDLINE_PGM("J34 ");
|
||||
if (PrintdoneAndPowerOFF) {
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Sending J35 because PrintdoneAndPowerOFF = true");
|
||||
#endif
|
||||
SEND_PGM("J35 ");
|
||||
SENDLINE_PGM("");
|
||||
} else {
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Sending J34 because PrintdoneAndPowerOFF = false");
|
||||
#endif
|
||||
SEND_PGM("J34 ");
|
||||
SENDLINE_PGM("");
|
||||
}
|
||||
}
|
||||
// break; <-- TODO: do we need it?
|
||||
break;
|
||||
|
||||
case 42:
|
||||
if (CaseLight == true) {
|
||||
SERIAL_ECHOLNPGM("Case Light OFF");
|
||||
@@ -1767,7 +1747,8 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||
injectCommands(F("M355 S1 P255"));
|
||||
CaseLight = true;
|
||||
}
|
||||
// break; <-- TODO: do we need it?
|
||||
break;
|
||||
|
||||
#endif
|
||||
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
||||
case 50:
|
||||
@@ -1959,6 +1940,9 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||
|
||||
#if ENABLED(KNUTWURST_4MAXP2)
|
||||
void PowerDown() {
|
||||
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||
SERIAL_ECHOLNPGM("TFT Serial Debug: PowerDown is called!");
|
||||
#endif
|
||||
for (unsigned char i = 0; i < 3; i++) {
|
||||
WRITE(POWER_OFF_PIN, LOW);
|
||||
delay(10);
|
||||
@@ -1987,6 +1971,13 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED(KNUTWURST_4MAXP2)
|
||||
if (PrintdoneAndPowerOFF && powerOFFflag && (thermalManager.degHotend(0) < 50 )) {
|
||||
powerOFFflag = 0;
|
||||
PowerDown();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (TFTbuflen < (TFTBUFSIZE - 1))
|
||||
GetCommandFromTFT();
|
||||
|
||||
@@ -1998,9 +1989,12 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||
|
||||
void AnycubicTouchscreenClass::OnPrintTimerStarted() {
|
||||
#if ENABLED(SDSUPPORT)
|
||||
if (mediaPrintingState == AMPRINTSTATE_PRINTING)
|
||||
SENDLINE_DBG_PGM("J04", "TFT Serial Debug: Starting SD Print... J04"); // J04 Starting Print
|
||||
|
||||
if (mediaPrintingState == AMPRINTSTATE_PRINTING) {
|
||||
SENDLINE_DBG_PGM("J04", "TFT Serial Debug: Starting SD Print... soft endstops disabled J04"); // J04 Starting Print
|
||||
setSoftEndstopState(false);
|
||||
live_Zoffset = 0.0;
|
||||
powerOFFflag = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -2018,7 +2012,9 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||
if (mediaPrintingState == AMPRINTSTATE_PRINTING) {
|
||||
mediaPrintingState = AMPRINTSTATE_NOT_PRINTING;
|
||||
mediaPauseState = AMPAUSESTATE_NOT_PAUSED;
|
||||
SENDLINE_DBG_PGM("J14", "TFT Serial Debug: SD Print Completed... J14");
|
||||
setSoftEndstopState(true);
|
||||
powerOFFflag = 1;
|
||||
SENDLINE_DBG_PGM("J14", "TFT Serial Debug: SD Print Completed... soft endstops enabled J14");
|
||||
}
|
||||
// otherwise it was stopped by the printer so don't send print completed signal to TFT
|
||||
#endif
|
||||
|
@@ -21,15 +21,9 @@
|
||||
#ifndef anycubic_touchscreen_h
|
||||
#define anycubic_touchscreen_h
|
||||
|
||||
// #include <stdio.h>
|
||||
// #include "../inc/MarlinConfig.h"
|
||||
// #include "../module/configuration_store.h"
|
||||
|
||||
#include "../../../inc/MarlinConfigPre.h"
|
||||
#include "../../../module/probe.h"
|
||||
|
||||
void initializeGrid();
|
||||
|
||||
char *itostr2(const uint8_t &x);
|
||||
|
||||
#ifndef ULTRA_LCD
|
||||
@@ -47,7 +41,8 @@ enum AnycubicMediaPrintState {
|
||||
AMPRINTSTATE_PRINTING,
|
||||
AMPRINTSTATE_PAUSE_REQUESTED,
|
||||
AMPRINTSTATE_PAUSED,
|
||||
AMPRINTSTATE_STOP_REQUESTED
|
||||
AMPRINTSTATE_STOP_REQUESTED,
|
||||
AMPRINTSTATE_PROBING
|
||||
};
|
||||
|
||||
enum AnycubicMediaPauseState {
|
||||
@@ -62,188 +57,141 @@ enum AnycubicMediaPauseState {
|
||||
AMPAUSESTATE_PAUSED
|
||||
};
|
||||
|
||||
|
||||
#define SM_DIR_UP_S "DIR_UP~1.GCO"
|
||||
#define SM_SPECIAL_MENU_S "<SPECI~1.GCO"
|
||||
#define SM_PID_HOTEND_S "<PIDTU~1.GCO"
|
||||
#define SM_PID_BED_S "<PIDTU~2.GCO"
|
||||
#define SM_SAVE_EEPROM_S "<SAVEE~1.GCO"
|
||||
#define SM_LOAD_DEFAULTS_S "<LOADF~1.GCO"
|
||||
#define SM_PREHEAT_BED_S "<PREHE~1.GCO"
|
||||
#define SM_MESH_MENU_S "<MESHL~1.GCO"
|
||||
#define SM_MESH_START_S "<START~1.GCO"
|
||||
#define SM_MESH_NEXT_S "<NEXTM~1.GCO"
|
||||
#define SM_Z_UP_01_S "<ZUP01~1.GCO"
|
||||
#define SM_Z_DN_01_S "<ZDOWN~1.GCO"
|
||||
#define SM_Z_UP_002_S "<ZUP00~1.GCO"
|
||||
#define SM_Z_DN_002_S "<ZDOWN~2.GCO"
|
||||
#define SM_Z_UP_001_S "<ZUP00~2.GCO"
|
||||
#define SM_Z_DN_001_S "<ZDOWN~3.GCO"
|
||||
#define SM_BLTOUCH_S "<BLTOU~1.GCO"
|
||||
#define SM_RESETLV_S "<RSTLV~1.GCO"
|
||||
#define SM_PAUSE_S "<FILCH~2.GCO"
|
||||
#define SM_RESUME_S "<FILCH~1.GCO"
|
||||
#define SM_DIS_FILSENS_S "<DISAB~1.GCO"
|
||||
#define SM_EN_FILSENS_S "<ENABL~1.GCO"
|
||||
#define SM_EXIT_S "<EXIT_~1.GCO"
|
||||
#define SM_BACK_S "<BACK_~1.GCO"
|
||||
#define SM_FLOWMENU_S "<SETFLO1.GCO"
|
||||
#define SM_FLOW_DISP_S "<FLDISPL.GCO"
|
||||
#define SM_FLOW_UP_S "<UPFLOW1.GCO"
|
||||
#define SM_FLOW_DN_S "<DWNFLOW.GCO"
|
||||
#define SM_FLOW_EXIT_S "<EXTFLW1.GCO"
|
||||
#define SM_EZLVL_MENU_S "<EZLVLM1.GCO"
|
||||
#define SM_EZLVL_P1_S "<EZLPA01.GCO"
|
||||
#define SM_EZLVL_P2_S "<EZLPB01.GCO"
|
||||
#define SM_EZLVL_P3_S "<EZLPC01.GCO"
|
||||
#define SM_EZLVL_P4_S "<EZLPD01.GCO"
|
||||
#define SM_EZLVL_EXIT_S "<EZLEXT1.GCO"
|
||||
#define SM_BLTZMENU_S "<SETOFZ0.GCO"
|
||||
#define SM_BLTZ_DISP_S "<OFZDSP0.GCO"
|
||||
#define SM_BLTZ_UP_S "<UPOFFZ0.GCO"
|
||||
#define SM_BLTZ_DN_S "<DOWNOFZ.GCO"
|
||||
#define SM_BLTZ_EXIT_S "<EXTABLM.GCO"
|
||||
#define SM_HS_DISABLE_S "<HSDISAB.GCO"
|
||||
#define SM_HS_ENABLE_S "<HSENABL.GCO"
|
||||
|
||||
|
||||
#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 "<SPECM>"
|
||||
#define SM_PID_HOTEND_L "<PID Tune Hotend>"
|
||||
#define SM_PID_HOTEND_S "<PIDHE>"
|
||||
#define SM_PID_BED_L "<PID Tune Ultrabase>"
|
||||
#define SM_PID_BED_S "<PIDUB>"
|
||||
#define SM_SAVE_EEPROM_L "<Save EEPROM>"
|
||||
#define SM_SAVE_EEPROM_S "<SAVEE>"
|
||||
#define SM_LOAD_DEFAULTS_L "<Load FW Defaults>"
|
||||
#define SM_LOAD_DEFAULTS_S "<LDDEF>"
|
||||
#define SM_PREHEAT_BED_L "<Preheat Ultrabase>"
|
||||
#define SM_PREHEAT_BED_S "<PREHE>"
|
||||
#define SM_MESH_MENU_L "<Mesh Leveling>"
|
||||
#define SM_MESH_MENU_S "<MESHL>"
|
||||
#define SM_MESH_START_L "<Start Mesh Leveling>"
|
||||
#define SM_MESH_START_S "<SMESH>"
|
||||
#define SM_MESH_NEXT_L "<Next Mesh Point>"
|
||||
#define SM_MESH_NEXT_S "<NEXTM>"
|
||||
#define SM_Z_UP_01_L "<Z Up 0.1>"
|
||||
#define SM_Z_UP_01_S "<ZUP01>"
|
||||
#define SM_Z_DN_01_L "<Z Down 0.1>"
|
||||
#define SM_Z_DN_01_S "<ZDN01>"
|
||||
#define SM_Z_UP_002_L "<Z Up 0.02>"
|
||||
#define SM_Z_UP_002_S "<ZUP002>"
|
||||
#define SM_Z_DN_002_L "<Z Down 0.02>"
|
||||
#define SM_Z_DN_002_S "<ZDN002>"
|
||||
#define SM_Z_UP_001_L "<Z Up 0.01>"
|
||||
#define SM_Z_UP_001_S "<ZUP001>"
|
||||
#define SM_Z_DN_001_L "<Z Down 0.01>"
|
||||
#define SM_Z_DN_001_S "<ZDN001>"
|
||||
#define SM_BLTOUCH_L "<Start Auto Leveling>"
|
||||
#define SM_BLTOUCH_S "<BLTCH>"
|
||||
#define SM_RESETLV_L "<Reset Level Grid>"
|
||||
#define SM_RESETLV_S "<RSTLV>"
|
||||
#define SM_PAUSE_L "<Fil. Change Pause>"
|
||||
#define SM_PAUSE_S "<PAUSE>"
|
||||
#define SM_RESUME_L "<Fil. Change Resume>"
|
||||
#define SM_RESUME_S "<RESUM>"
|
||||
#define SM_DIS_FILSENS_L "<Disable Fil. Sensor>"
|
||||
#define SM_DIS_FILSENS_S "<DISSEN>"
|
||||
#define SM_EN_FILSENS_L "<Enable Fil. Sensor>"
|
||||
#define SM_EN_FILSENS_S "<ENSEN>"
|
||||
#define SM_EXIT_L "<Exit>"
|
||||
#define SM_EXIT_S "<SMEXIT>"
|
||||
|
||||
#define SM_BACK_L "<End Mesh Leveling>"
|
||||
#define SM_BACK_S "<BACK>"
|
||||
|
||||
#define SM_FLOWMENU_L "<Set Flowrate>"
|
||||
#define SM_FLOWMENU_S "<SETFLO>"
|
||||
#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 "<FLUP>"
|
||||
#define SM_FLOW_DN_L "<Down>"
|
||||
#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>"
|
||||
#define SM_EZLVL_MENU_S "<EZLVLM>"
|
||||
#define SM_EZLVL_P1_L "<Point A>"
|
||||
#define SM_EZLVL_P1_S "<EZLPA>"
|
||||
#define SM_EZLVL_P2_L "<Point B>"
|
||||
#define SM_EZLVL_P2_S "<EZLPB>"
|
||||
#define SM_EZLVL_P3_L "<Point C>"
|
||||
#define SM_EZLVL_P3_S "<EZLPC>"
|
||||
#define SM_EZLVL_P4_L "<Point D>"
|
||||
#define SM_EZLVL_P4_S "<EZLPD>"
|
||||
#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>"
|
||||
#define SM_HS_DISABLE_L "<Disable HiSpeed Mode>"
|
||||
#define SM_HS_ENABLE_L "<Enable HiSpeed Mode>"
|
||||
#endif // !KNUTWURST_DGUS2_TFT
|
||||
|
||||
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
||||
#define SM_DIR_UP_L "<<< BACK <<< .gcode"
|
||||
#define SM_DIR_UP_S "DIR_UP~1.GCO"
|
||||
#define SM_DIR_UP_L "/.. .gcode"
|
||||
#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_MENU_L "<Mesh Leveling> .gcode"
|
||||
#define SM_MESH_MENU_S "<MESHL~1.GCO"
|
||||
#define SM_MESH_START_L "<Start MeshLeveling>.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 "<Start AutoLeveling>.gcode"
|
||||
#define SM_BLTOUCH_S "<BLTOU~1.GCO"
|
||||
#define SM_RESETLV_L "<Reset Level Grid> .gcode"
|
||||
#define SM_RESETLV_S "<RSTLV~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"
|
||||
|
||||
#define SM_BACK_L "<End Mesh Leveling> .gcode"
|
||||
#define SM_BACK_S "<BACK_~1.GCO"
|
||||
|
||||
#define SM_FLOWMENU_L "<Set Flowrate> .gcode"
|
||||
#define SM_FLOWMENU_S "<SETFLO1.GCO"
|
||||
#define SM_FLOW_DISP_L "<Flow is XXX%> .gcode"
|
||||
#define SM_FLOW_DISP_S "<FLDISPL.GCO"
|
||||
#define SM_FLOW_UP_L "<Up> .gcode"
|
||||
#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 "<Exit Flow Settings>.gcode"
|
||||
#define SM_FLOW_EXIT_S "<EXTFLW1.GCO"
|
||||
|
||||
#define SM_EZLVL_MENU_L "<Easy 4 Point Level>.gcode"
|
||||
#define SM_EZLVL_MENU_S "<EZLVLM1.GCO"
|
||||
#define SM_EZLVL_P1_L "<Point A> .gcode"
|
||||
#define SM_EZLVL_P1_S "<EZLPA01.GCO"
|
||||
#define SM_EZLVL_P2_L "<Point B> .gcode"
|
||||
#define SM_EZLVL_P2_S "<EZLPB01.GCO"
|
||||
#define SM_EZLVL_P3_L "<Point C> .gcode"
|
||||
#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 "<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"
|
||||
#define SM_HS_DISABLE_L "<Disable HiSpeed> .gcode"
|
||||
#define SM_HS_ENABLE_L "<Enable HiSpeed> .gcode"
|
||||
#endif // KNUTWURST_DGUS2_TFT
|
||||
|
||||
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||
// eeprom_index
|
||||
extern int z_values_index;
|
||||
extern int z_values_size;
|
||||
// temp value which needs to be saved
|
||||
extern float SAVE_zprobe_zoffset;
|
||||
#endif
|
||||
|
||||
class AnycubicTouchscreenClass {
|
||||
|
||||
public:
|
||||
@@ -257,9 +205,9 @@ void UserConfirmRequired(const char *);
|
||||
void SDCardStateChange(bool);
|
||||
void SDCardError();
|
||||
void KillTFT();
|
||||
static void OnPrintTimerStarted();
|
||||
static void OnPrintTimerPaused();
|
||||
static void OnPrintTimerStopped();
|
||||
void OnPrintTimerStarted();
|
||||
void OnPrintTimerPaused();
|
||||
void OnPrintTimerStopped();
|
||||
|
||||
#if BOTH(ANYCUBIC_TFT_DEBUG, KNUTWURST_DGUS2_TFT)
|
||||
void Command(const char * const command);
|
||||
@@ -279,15 +227,13 @@ int serial3_count = 0;
|
||||
char *TFTstrchr_pointer;
|
||||
char FlagResumFromOutage = 0;
|
||||
int filenumber = 0;
|
||||
unsigned long starttime = 0;
|
||||
unsigned long stoptime = 0;
|
||||
uint8_t tmp_extruder = 0;
|
||||
char LastSDstatus = 0;
|
||||
uint16_t HeaterCheckCount = 0;
|
||||
bool IsParked = false;
|
||||
int currentFlowRate = 0;
|
||||
bool PrintdoneAndPowerOFF = true;
|
||||
bool powerOFFflag = 0;
|
||||
xy_uint8_t selectedmeshpoint;
|
||||
float live_Zoffset;
|
||||
|
||||
static AnycubicMediaPrintState mediaPrintingState;
|
||||
static AnycubicMediaPauseState mediaPauseState;
|
||||
@@ -309,16 +255,13 @@ float CodeValue();
|
||||
bool CodeSeen(char);
|
||||
void StartPrint();
|
||||
void PausePrint();
|
||||
void ResumePrint();
|
||||
void StopPrint();
|
||||
void StateHandler();
|
||||
void GetCommandFromTFT();
|
||||
void CheckSDCardChange();
|
||||
void CheckHeaterError();
|
||||
void HandleSpecialMenu();
|
||||
void FilamentChangePause();
|
||||
void ResumePrint();
|
||||
void ReheatNozzle();
|
||||
void ParkAfterStop();
|
||||
void HandleSpecialMenu();
|
||||
void RenderCurrentFileList();
|
||||
void RenderSpecialMenu(uint16_t);
|
||||
void RenderCurrentFolder(uint16_t);
|
||||
@@ -327,7 +270,6 @@ char currentTouchscreenSelection[64];
|
||||
char currentFileOrDirectory[64];
|
||||
String flowRateBuffer;
|
||||
String zOffsetBuffer;
|
||||
uint8_t FilamentSensorEnabled = true;
|
||||
|
||||
uint8_t SpecialMenu = false;
|
||||
uint8_t MMLMenu = false;
|
||||
|
@@ -289,24 +289,10 @@
|
||||
|
||||
#if ANY(KNUTWURST_CHIRON, KNUTWURST_4MAXP2)
|
||||
#define FIL_RUNOUT_PIN 33
|
||||
#ifndef Z2_STEP_PIN
|
||||
#define Z2_STEP_PIN 46
|
||||
#endif
|
||||
#ifndef Z2_DIR_PIN
|
||||
#define Z2_DIR_PIN 48
|
||||
#endif
|
||||
#ifndef Z2_ENABLE_PIN
|
||||
#define Z2_ENABLE_PIN 62
|
||||
#endif
|
||||
#ifndef Z2_CS_PIN
|
||||
#define Z2_CS_PIN 40
|
||||
#endif
|
||||
#else
|
||||
#define FIL_RUNOUT_PIN 19
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifndef PS_ON_PIN
|
||||
#define PS_ON_PIN 12
|
||||
#endif
|
||||
|
@@ -142,19 +142,6 @@
|
||||
#define Z_CS_PIN 40
|
||||
#endif
|
||||
|
||||
#ifndef Z2_STEP_PIN
|
||||
#define Z2_STEP_PIN 46
|
||||
#endif
|
||||
#ifndef Z2_DIR_PIN
|
||||
#define Z2_DIR_PIN 48
|
||||
#endif
|
||||
#ifndef Z2_ENABLE_PIN
|
||||
#define Z2_ENABLE_PIN 62
|
||||
#endif
|
||||
#ifndef Z2_CS_PIN
|
||||
#define Z2_CS_PIN 40
|
||||
#endif
|
||||
|
||||
#define E0_STEP_PIN 26
|
||||
#define E0_DIR_PIN 28
|
||||
#define E0_ENABLE_PIN 24
|
||||
|
@@ -103,7 +103,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ANY(TRIGORILLA_MAPPING_CHIRON, SWAP_Z_MOTORS, KNUTWURST_CHIRON, KNUTWURST_4MAXP2) // PATCH: knutwurst
|
||||
#if EITHER(TRIGORILLA_MAPPING_CHIRON, SWAP_Z_MOTORS)
|
||||
// Chiron and some Anycubic i3 MEGAs swap Z steppers
|
||||
#define Z_STEP_PIN 36
|
||||
#define Z_DIR_PIN 34
|
||||
|
Reference in New Issue
Block a user