Compare commits
27 Commits
sui77/klic
...
1.5.0-beta
Author | SHA1 | Date | |
---|---|---|---|
|
c83dad91f3 | ||
|
429b8cc1fa | ||
|
2e030524e2 | ||
|
45cbc380d9 | ||
|
cf0611a7d9 | ||
|
9c4c58235b | ||
|
75ffa32980 | ||
|
e0d858d812 | ||
|
ad86d96a31 | ||
|
6c4a0a887a | ||
|
e940c218cd | ||
|
1df0ee59d2 | ||
|
9244ea5890 | ||
|
8e34d7dc7c | ||
|
7fbbbba752 | ||
|
2b5816037a | ||
|
e008a96269 | ||
|
952e0db31e | ||
|
69efa3376a | ||
|
b3f22b2b11 | ||
|
bb8d41c0e1 | ||
|
ae82913d1f | ||
|
22dedaeb81 | ||
|
2b57ebccaa | ||
|
4a3071aa56 | ||
|
595bdd00cc | ||
|
d5aa1e1823 |
@@ -1939,7 +1939,7 @@
|
|||||||
#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
|
#define Z_CLEARANCE_MULTI_PROBE 5 // Z Clearance between multiple probes
|
||||||
// #define Z_AFTER_PROBING 5 // Z position after probing is done
|
// #define Z_AFTER_PROBING 5 // Z position after probing is done
|
||||||
|
|
||||||
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
|
#define Z_PROBE_LOW_POINT -10 // Farthest distance below the trigger-point to go before stopping
|
||||||
|
|
||||||
// For M851 give a range for adjusting the Z probe offset
|
// For M851 give a range for adjusting the Z probe offset
|
||||||
#define Z_PROBE_OFFSET_RANGE_MIN -50
|
#define Z_PROBE_OFFSET_RANGE_MIN -50
|
||||||
|
@@ -989,7 +989,7 @@
|
|||||||
*
|
*
|
||||||
* Set the default state here, change with 'M401 S' or UI, use M500 to save, M502 to reset.
|
* Set the default state here, change with 'M401 S' or UI, use M500 to save, M502 to reset.
|
||||||
*/
|
*/
|
||||||
#define BLTOUCH_HS_MODE true
|
#define BLTOUCH_HS_MODE false
|
||||||
|
|
||||||
// Safety: Enable voltage mode settings in the LCD menu.
|
// Safety: Enable voltage mode settings in the LCD menu.
|
||||||
// #define BLTOUCH_LCD_VOLTAGE_MENU
|
// #define BLTOUCH_LCD_VOLTAGE_MENU
|
||||||
@@ -2658,6 +2658,7 @@
|
|||||||
*/
|
*/
|
||||||
#define ADVANCED_PAUSE_FEATURE
|
#define ADVANCED_PAUSE_FEATURE
|
||||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||||
|
#if DISABLED(KNUTWURST_4MAXP2)
|
||||||
#define PAUSE_PARK_RETRACT_FEEDRATE 40 // (mm/s) Initial retract feedrate.
|
#define PAUSE_PARK_RETRACT_FEEDRATE 40 // (mm/s) Initial retract feedrate.
|
||||||
#define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
|
#define PAUSE_PARK_RETRACT_LENGTH 4 // (mm) Initial retract.
|
||||||
// This short retract is done immediately, before parking the nozzle.
|
// This short retract is done immediately, before parking the nozzle.
|
||||||
@@ -2675,12 +2676,33 @@
|
|||||||
#define FILAMENT_CHANGE_FAST_LOAD_LENGTH 538 // (mm) Load length of filament, from extruder gear to nozzle.
|
#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 Bowden, the full length of the tube and nozzle.
|
||||||
// For direct drive, the full length of the 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.
|
#define ADVANCED_PAUSE_CONTINUOUS_PURGE // Purge continuously up to the purge length until interrupted.
|
||||||
#define ADVANCED_PAUSE_PURGE_FEEDRATE 2 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
|
#define ADVANCED_PAUSE_PURGE_FEEDRATE 2 // (mm/s) Extrude feedrate (after loading). Should be slower than load feedrate.
|
||||||
#define ADVANCED_PAUSE_PURGE_LENGTH 2 // (mm) Length to extrude after loading.
|
#define ADVANCED_PAUSE_PURGE_LENGTH 2 // (mm) Length to extrude after loading.
|
||||||
// Set to 0 for manual extrusion.
|
// Set to 0 for manual extrusion.
|
||||||
// Filament can be extruded repeatedly from the Filament Change menu
|
// Filament can be extruded repeatedly from the Filament Change menu
|
||||||
// until extrusion is consistent, and to purge old filament.
|
// until extrusion is consistent, and to purge old filament.
|
||||||
|
|
||||||
// #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
|
// #define ADVANCED_PAUSE_RESUME_PRIME 0 // (mm) Extra distance to prime nozzle after returning from park.
|
||||||
#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.
|
#define ADVANCED_PAUSE_FANS_PAUSE // Turn off print-cooling fans while the machine is paused.
|
||||||
|
|
||||||
|
@@ -41,10 +41,10 @@
|
|||||||
* here we define this default string as the date where the latest release
|
* here we define this default string as the date where the latest release
|
||||||
* version was tagged.
|
* version was tagged.
|
||||||
*/
|
*/
|
||||||
#define CUSTOM_BUILD_VERSION "1.5.0-b5"
|
#define CUSTOM_BUILD_VERSION "1.5.0-b6"
|
||||||
|
|
||||||
#ifndef STRING_DISTRIBUTION_DATE
|
#ifndef STRING_DISTRIBUTION_DATE
|
||||||
#define STRING_DISTRIBUTION_DATE "2023-05-24"
|
#define STRING_DISTRIBUTION_DATE "2023-05-30"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -84,6 +84,8 @@
|
|||||||
*value = c;
|
*value = c;
|
||||||
pos++;
|
pos++;
|
||||||
value++;
|
value++;
|
||||||
|
if(pos > 32766)
|
||||||
|
break;
|
||||||
} while (--size);
|
} while (--size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,42 +168,6 @@
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
char *itostr2(const uint8_t &x) {
|
|
||||||
int xx = x;
|
|
||||||
_conv[0] = (xx / 10) % 10 + '0';
|
|
||||||
_conv[1] = (xx) % 10 + '0';
|
|
||||||
_conv[2] = 0;
|
|
||||||
return _conv;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifndef ULTRA_LCD
|
|
||||||
#define DIGIT(n) ('0' + (n))
|
|
||||||
#define DIGIMOD(n, f) DIGIT((n) / (f) % 10)
|
|
||||||
#define RJDIGIT(n, f) ((n) >= (f) ? DIGIMOD(n, f) : ' ')
|
|
||||||
#define MINUSOR(n, alt) (n >= 0 ? (alt) : (n = -n, '-'))
|
|
||||||
|
|
||||||
char *itostr3(const int x) {
|
|
||||||
int xx = x;
|
|
||||||
_conv[4] = MINUSOR(xx, RJDIGIT(xx, 100));
|
|
||||||
_conv[5] = RJDIGIT(xx, 10);
|
|
||||||
_conv[6] = DIGIMOD(xx, 1);
|
|
||||||
return &_conv[4];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Convert signed float to fixed-length string with 023.45 / -23.45 format
|
|
||||||
|
|
||||||
char *ftostr32(const float &x) {
|
|
||||||
long xx = x * 100;
|
|
||||||
_conv[1] = MINUSOR(xx, DIGIMOD(xx, 10000));
|
|
||||||
_conv[2] = DIGIMOD(xx, 1000);
|
|
||||||
_conv[3] = DIGIMOD(xx, 100);
|
|
||||||
_conv[4] = '.';
|
|
||||||
_conv[5] = DIGIMOD(xx, 10);
|
|
||||||
_conv[6] = DIGIMOD(xx, 1);
|
|
||||||
return &_conv[1];
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace ExtUI;
|
using namespace ExtUI;
|
||||||
|
|
||||||
AnycubicTouchscreenClass::AnycubicTouchscreenClass() {
|
AnycubicTouchscreenClass::AnycubicTouchscreenClass() {
|
||||||
@@ -229,7 +195,6 @@
|
|||||||
BLTouchMenu = false;
|
BLTouchMenu = false;
|
||||||
LevelMenu = false;
|
LevelMenu = false;
|
||||||
CaseLight = false;
|
CaseLight = false;
|
||||||
MyFileNrCnt = 0;
|
|
||||||
currentFlowRate = 100;
|
currentFlowRate = 100;
|
||||||
flowRateBuffer = SM_FLOW_DISP_L;
|
flowRateBuffer = SM_FLOW_DISP_L;
|
||||||
|
|
||||||
@@ -249,10 +214,12 @@
|
|||||||
setup_OutageTestPin();
|
setup_OutageTestPin();
|
||||||
setup_PowerOffPin();
|
setup_PowerOffPin();
|
||||||
|
|
||||||
SENDLINE_DBG_PGM("J12", "TFT Serial Debug: Ready... J12"); // J12 Ready
|
SENDLINE_DBG_PGM("J12", "TFT Serial Debug: Ready... J12");
|
||||||
|
|
||||||
|
CheckHeaterError();
|
||||||
DoFilamentRunoutCheck();
|
DoFilamentRunoutCheck();
|
||||||
|
|
||||||
|
|
||||||
#ifdef STARTUP_CHIME
|
#ifdef STARTUP_CHIME
|
||||||
BUZZ(100, 554);
|
BUZZ(100, 554);
|
||||||
BUZZ(100, 740);
|
BUZZ(100, 740);
|
||||||
@@ -347,7 +314,7 @@
|
|||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||||
if (READ(FIL_RUNOUT_PIN)) {
|
if (READ(FIL_RUNOUT_PIN)) {
|
||||||
#if ENABLED(ANYCUBIC_LCD_DEBUG)
|
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Resume Print with filament sensor still tripped... ");
|
SERIAL_ECHOLNPGM("TFT Serial Debug: Resume Print with filament sensor still tripped... ");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -394,7 +361,7 @@
|
|||||||
void AnycubicTouchscreenClass::HandleSpecialMenu() {
|
void AnycubicTouchscreenClass::HandleSpecialMenu() {
|
||||||
#if ENABLED(KNUTWURST_SPECIAL_MENU)
|
#if ENABLED(KNUTWURST_SPECIAL_MENU)
|
||||||
#ifdef ANYCUBIC_TFT_DEBUG
|
#ifdef ANYCUBIC_TFT_DEBUG
|
||||||
SERIAL_ECHOPGM("DEBUG: Special Menu Selection: ", currentTouchscreenSelection);
|
SERIAL_ECHOPGM("TFT Serial Debug: Special Menu Selection: ", currentTouchscreenSelection);
|
||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
#endif
|
#endif
|
||||||
if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_SPECIAL_MENU_L)) != NULL)
|
if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_SPECIAL_MENU_L)) != NULL)
|
||||||
@@ -408,19 +375,19 @@
|
|||||||
SERIAL_ECHOLNPGM("Special Menu: PID Tune Hotend");
|
SERIAL_ECHOLNPGM("Special Menu: PID Tune Hotend");
|
||||||
|
|
||||||
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P)
|
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P)
|
||||||
queue.inject_P(PSTR("G28\nG90\nG1 Z20\nG1 X110 Y110 F4000\nG1 Z5\nM106 S172\nG4 P500\nM303 E0 S215 C15 U1\nG4 P500\nM107\nG28\nG1 Z10\nM84\nM500\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300"));
|
injectCommands(F("G28\nG90\nG1 Z20\nG1 X110 Y110 F4000\nG1 Z5\nM106 S172\nG4 P500\nM303 E0 S215 C15 U1\nG4 P500\nM107\nG28\nG1 Z10\nM84\nM500\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_MEGA_X)
|
#if ENABLED(KNUTWURST_MEGA_X)
|
||||||
queue.inject_P(PSTR("G28\nG90\nG1 Z20\nG1 X155 Y155 F4000\nG1 Z5\nM106 S172\nG4 P500\nM303 E0 S215 C15 U1\nG4 P500\nM107\nG28\nG1 Z10\nM84\nM500\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300"));
|
injectCommands(F("G28\nG90\nG1 Z20\nG1 X155 Y155 F4000\nG1 Z5\nM106 S172\nG4 P500\nM303 E0 S215 C15 U1\nG4 P500\nM107\nG28\nG1 Z10\nM84\nM500\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_CHIRON)
|
#if ENABLED(KNUTWURST_CHIRON)
|
||||||
queue.inject_P(PSTR("G28\nG90\nG1 Z20\nG1 X205 Y205 F4000\nG1 Z5\nM106 S172\nG4 P500\nM303 E0 S215 C15 U1\nG4 P500\nM107\nG28\nG1 Z10\nM84\nM500\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300"));
|
injectCommands(F("G28\nG90\nG1 Z20\nG1 X205 Y205 F4000\nG1 Z5\nM106 S172\nG4 P500\nM303 E0 S215 C15 U1\nG4 P500\nM107\nG28\nG1 Z10\nM84\nM500\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_4MAXP2)
|
#if ENABLED(KNUTWURST_4MAXP2)
|
||||||
queue.inject_P(PSTR("G28\nG90\nG1 Z20\nG1 X105 Y135 F4000\nG1 Z5\nM106 S172\nG4 P500\nM303 E0 S215 C15 U1\nG4 P500\nM107\nG28\nG1 Z10\nM84\nM500\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300"));
|
injectCommands(F("G28\nG90\nG1 Z20\nG1 X105 Y135 F4000\nG1 Z5\nM106 S172\nG4 P500\nM303 E0 S215 C15 U1\nG4 P500\nM107\nG28\nG1 Z10\nM84\nM500\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
BUZZ(200, 1108);
|
BUZZ(200, 1108);
|
||||||
@@ -432,7 +399,11 @@
|
|||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_PID_BED_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_PID_BED_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: PID Tune Ultrabase");
|
SERIAL_ECHOLNPGM("Special Menu: PID Tune Ultrabase");
|
||||||
queue.inject_P(PSTR("M303 E-1 S60 C6 U1\nM500\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300"));
|
BUZZ(200, 1108);
|
||||||
|
BUZZ(200, 1661);
|
||||||
|
BUZZ(200, 1108);
|
||||||
|
BUZZ(600, 1661);
|
||||||
|
injectCommands(F("M303 E-1 S60 C6 U1\nM500\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300"));
|
||||||
BUZZ(200, 1108);
|
BUZZ(200, 1108);
|
||||||
BUZZ(200, 1661);
|
BUZZ(200, 1661);
|
||||||
BUZZ(200, 1108);
|
BUZZ(200, 1108);
|
||||||
@@ -461,7 +432,7 @@
|
|||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_PREHEAT_BED_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_PREHEAT_BED_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Preheat Ultrabase");
|
SERIAL_ECHOLNPGM("Special Menu: Preheat Ultrabase");
|
||||||
queue.inject_P(PSTR("M140 S60"));
|
injectCommands(F("M140 S60"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING)
|
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING)
|
||||||
@@ -474,49 +445,49 @@
|
|||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_MESH_START_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_MESH_START_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Start Mesh Leveling");
|
SERIAL_ECHOLNPGM("Special Menu: Start Mesh Leveling");
|
||||||
queue.inject_P(PSTR("G28\nG29 S1"));
|
injectCommands(F("G28\nG29 S1"));
|
||||||
}
|
}
|
||||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_MESH_NEXT_L)) != NULL)
|
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_MESH_NEXT_L)) != NULL)
|
||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_MESH_NEXT_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_MESH_NEXT_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Next Mesh Point");
|
SERIAL_ECHOLNPGM("Special Menu: Next Mesh Point");
|
||||||
queue.inject_P(PSTR("G29 S2"));
|
injectCommands(F("G29 S2"));
|
||||||
}
|
}
|
||||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_UP_01_L)) != NULL)
|
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_UP_01_L)) != NULL)
|
||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_UP_01_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_UP_01_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Z Up 0.1");
|
SERIAL_ECHOLNPGM("Special Menu: Z Up 0.1");
|
||||||
queue.inject_P(PSTR("G91\nG1 Z+0.1\nG90"));
|
injectCommands(F("G91\nG1 Z+0.1\nG90"));
|
||||||
}
|
}
|
||||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_DN_01_L)) != NULL)
|
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_DN_01_L)) != NULL)
|
||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_DN_01_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_DN_01_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Z Down 0.1");
|
SERIAL_ECHOLNPGM("Special Menu: Z Down 0.1");
|
||||||
queue.inject_P(PSTR("G91\nG1 Z-0.1\nG90"));
|
injectCommands(F("G91\nG1 Z-0.1\nG90"));
|
||||||
}
|
}
|
||||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_UP_002_L)) != NULL)
|
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_UP_002_L)) != NULL)
|
||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_UP_002_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_UP_002_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Z Up 0.02");
|
SERIAL_ECHOLNPGM("Special Menu: Z Up 0.02");
|
||||||
queue.inject_P(PSTR("G91\nG1 Z+0.02\nG90"));
|
injectCommands(F("G91\nG1 Z+0.02\nG90"));
|
||||||
}
|
}
|
||||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_DN_002_L)) != NULL)
|
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_DN_002_L)) != NULL)
|
||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_DN_002_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_DN_002_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Z Down 0.02");
|
SERIAL_ECHOLNPGM("Special Menu: Z Down 0.02");
|
||||||
queue.inject_P(PSTR("G91\nG1 Z-0.02\nG90"));
|
injectCommands(F("G91\nG1 Z-0.02\nG90"));
|
||||||
}
|
}
|
||||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_UP_001_L)) != NULL)
|
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_UP_001_L)) != NULL)
|
||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_UP_001_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_UP_001_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Z Up 0.01");
|
SERIAL_ECHOLNPGM("Special Menu: Z Up 0.01");
|
||||||
queue.inject_P(PSTR("G91\nG1 Z+0.03\nG4 P250\nG1 Z-0.02\nG90"));
|
injectCommands(F("G91\nG1 Z+0.03\nG4 P250\nG1 Z-0.02\nG90"));
|
||||||
}
|
}
|
||||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_DN_001_L)) != NULL)
|
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_DN_001_L)) != NULL)
|
||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_DN_001_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_Z_DN_001_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Z Down 0.01");
|
SERIAL_ECHOLNPGM("Special Menu: Z Down 0.01");
|
||||||
queue.inject_P(PSTR("G91\nG1 Z+0.02\nG4 P250\nG1 Z-0.03\nG90"));
|
injectCommands(F("G91\nG1 Z+0.02\nG4 P250\nG1 Z-0.03\nG90"));
|
||||||
}
|
}
|
||||||
#endif // if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING)
|
#endif // if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING)
|
||||||
|
|
||||||
@@ -525,7 +496,7 @@
|
|||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTOUCH_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_BLTOUCH_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: BLTouch Leveling");
|
SERIAL_ECHOLNPGM("Special Menu: BLTouch Leveling");
|
||||||
queue.inject_P(PSTR("G28\nG29\nM500\nG90\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300\nG1 Z30 F4000\nG1 X0 F4000\nG91\nM84\nM420 S1"));
|
injectCommands(F("G28\nG29\nM500\nG90\nM300 S440 P200\nM300 S660 P250\nM300 S880 P300\nG1 Z30 F4000\nG1 X0 F4000\nG91\nM84\nM420 S1"));
|
||||||
BUZZ(105, 1108);
|
BUZZ(105, 1108);
|
||||||
BUZZ(210, 1661);
|
BUZZ(210, 1661);
|
||||||
}
|
}
|
||||||
@@ -547,7 +518,7 @@
|
|||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_PAUSE_L)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_PAUSE_L)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Fil. Change Pause");
|
SERIAL_ECHOLNPGM("Special Menu: Fil. Change Pause");
|
||||||
PausePrint();
|
injectCommands(F("M600"));
|
||||||
}
|
}
|
||||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_RESUME_L)) != NULL)
|
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_RESUME_L)) != NULL)
|
||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_RESUME_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_RESUME_S)) != NULL)
|
||||||
@@ -559,7 +530,7 @@
|
|||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_DIS_FILSENS_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_DIS_FILSENS_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Disable Filament Sensor");
|
SERIAL_ECHOLNPGM("Special Menu: Disable Filament Sensor");
|
||||||
queue.inject_P(PSTR("M412 H0 S0\nM500"));
|
injectCommands(F("M412 H0 S0\nM500"));
|
||||||
BUZZ(105, 1108);
|
BUZZ(105, 1108);
|
||||||
BUZZ(105, 1108);
|
BUZZ(105, 1108);
|
||||||
BUZZ(105, 1108);
|
BUZZ(105, 1108);
|
||||||
@@ -568,7 +539,7 @@
|
|||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EN_FILSENS_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EN_FILSENS_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Enable Filament Sensor");
|
SERIAL_ECHOLNPGM("Special Menu: Enable Filament Sensor");
|
||||||
queue.inject_P(PSTR("M412 H0 S1\nM500"));
|
injectCommands(F("M412 H0 S1\nM500"));
|
||||||
BUZZ(105, 1108);
|
BUZZ(105, 1108);
|
||||||
BUZZ(105, 1108);
|
BUZZ(105, 1108);
|
||||||
}
|
}
|
||||||
@@ -656,32 +627,32 @@
|
|||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Enter Easy Level Menu");
|
SERIAL_ECHOLNPGM("Special Menu: Enter Easy Level Menu");
|
||||||
LevelMenu = true;
|
LevelMenu = true;
|
||||||
queue.inject_P(PSTR("G28\nM420 S0\nG90\nG1 Z5\nG1 X15 Y15 F4000\nG1 Z0"));
|
injectCommands(F("G28\nM420 S0\nG90\nG1 Z5\nG1 X15 Y15 F4000\nG1 Z0"));
|
||||||
}
|
}
|
||||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P1_L)) != NULL)
|
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P1_L)) != NULL)
|
||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P1_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P1_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 1");
|
SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 1");
|
||||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y15 F4000\nG1 Z0"));
|
injectCommands(F("G90\nG1 Z5\nG1 X15 Y15 F4000\nG1 Z0"));
|
||||||
}
|
}
|
||||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P2_L)) != NULL)
|
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P2_L)) != NULL)
|
||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P2_S)) != NULL)
|
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P2_S)) != NULL)
|
||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 2");
|
SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 2");
|
||||||
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P)
|
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P)
|
||||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X205 Y15 F4000\nG1 Z0"));
|
injectCommands(F("G90\nG1 Z5\nG1 X205 Y15 F4000\nG1 Z0"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_MEGA_X)
|
#if ENABLED(KNUTWURST_MEGA_X)
|
||||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X295 Y15 F4000\nG1 Z0"));
|
injectCommands(F("G90\nG1 Z5\nG1 X295 Y15 F4000\nG1 Z0"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_CHIRON)
|
#if ENABLED(KNUTWURST_CHIRON)
|
||||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X385 Y15 F4000\nG1 Z0"));
|
injectCommands(F("G90\nG1 Z5\nG1 X385 Y15 F4000\nG1 Z0"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_4MAXP2)
|
#if ENABLED(KNUTWURST_4MAXP2)
|
||||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X255 Y15 F4000\nG1 Z0"));
|
injectCommands(F("G90\nG1 Z5\nG1 X255 Y15 F4000\nG1 Z0"));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P3_L)) != NULL)
|
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P3_L)) != NULL)
|
||||||
@@ -689,19 +660,19 @@
|
|||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 3");
|
SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 3");
|
||||||
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P)
|
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P)
|
||||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X205 Y200 F4000\nG1 Z0"));
|
injectCommands(F("G90\nG1 Z5\nG1 X205 Y200 F4000\nG1 Z0"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_MEGA_X)
|
#if ENABLED(KNUTWURST_MEGA_X)
|
||||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X295 Y295 F4000\nG1 Z0"));
|
injectCommands(F("G90\nG1 Z5\nG1 X295 Y295 F4000\nG1 Z0"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_CHIRON)
|
#if ENABLED(KNUTWURST_CHIRON)
|
||||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X395 Y395 F4000\nG1 Z0"));
|
injectCommands(F("G90\nG1 Z5\nG1 X395 Y395 F4000\nG1 Z0"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_4MAXP2)
|
#if ENABLED(KNUTWURST_4MAXP2)
|
||||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X255 Y195 F4000\nG1 Z0"));
|
injectCommands(F("G90\nG1 Z5\nG1 X255 Y195 F4000\nG1 Z0"));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P4_L)) != NULL)
|
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_P4_L)) != NULL)
|
||||||
@@ -709,19 +680,19 @@
|
|||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 4");
|
SERIAL_ECHOLNPGM("Special Menu: Easy Level POINT 4");
|
||||||
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P)
|
#if ANY(KNUTWURST_MEGA, KNUTWURST_MEGA_S, KNUTWURST_MEGA_P)
|
||||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y200 F4000\nG1 Z0"));
|
injectCommands(F("G90\nG1 Z5\nG1 X15 Y200 F4000\nG1 Z0"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_MEGA_X)
|
#if ENABLED(KNUTWURST_MEGA_X)
|
||||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y295 F4000\nG1 Z0"));
|
injectCommands(F("G90\nG1 Z5\nG1 X15 Y295 F4000\nG1 Z0"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_CHIRON)
|
#if ENABLED(KNUTWURST_CHIRON)
|
||||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y395 F4000\nG1 Z0"));
|
injectCommands(F("G90\nG1 Z5\nG1 X15 Y395 F4000\nG1 Z0"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_4MAXP2)
|
#if ENABLED(KNUTWURST_4MAXP2)
|
||||||
queue.inject_P(PSTR("G90\nG1 Z5\nG1 X15 Y195 F4000\nG1 Z0"));
|
injectCommands(F("G90\nG1 Z5\nG1 X15 Y195 F4000\nG1 Z0"));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_EXIT_L)) != NULL)
|
else if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_EZLVL_EXIT_L)) != NULL)
|
||||||
@@ -729,16 +700,48 @@
|
|||||||
) {
|
) {
|
||||||
SERIAL_ECHOLNPGM("Special Menu: Exit Easy Level Menu");
|
SERIAL_ECHOLNPGM("Special Menu: Exit Easy Level Menu");
|
||||||
LevelMenu = false;
|
LevelMenu = false;
|
||||||
queue.inject_P(PSTR("G90\nG1 Z10\nG1 X15 Y15 F4000\nM420 S1"));
|
injectCommands(F("G90\nG1 Z10\nG1 X15 Y15 F4000\nM420 S1"));
|
||||||
}
|
}
|
||||||
#endif // if ENABLED(KNUTWURST_SPECIAL_MENU)
|
#endif // if ENABLED(KNUTWURST_SPECIAL_MENU)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AnycubicTouchscreenClass::PrintList() {
|
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 {
|
||||||
|
if (CodeSeen('S')) {
|
||||||
|
selectedNumber = CodeValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SpecialMenu) {
|
||||||
|
RenderSpecialMenu(selectedNumber);
|
||||||
|
} else if (selectedNumber <= currentFileList.count()) {
|
||||||
|
RenderCurrentFolder(selectedNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SENDLINE_PGM("END"); // Filelist stop
|
||||||
|
}
|
||||||
|
|
||||||
|
void AnycubicTouchscreenClass::RenderSpecialMenu(uint16_t selectedNumber) {
|
||||||
#if ENABLED(KNUTWURST_SPECIAL_MENU)
|
#if ENABLED(KNUTWURST_SPECIAL_MENU)
|
||||||
if (MMLMenu) {
|
if (MMLMenu) {
|
||||||
switch (filenumber) {
|
switch (selectedNumber) {
|
||||||
case 0: // Page 1
|
case 0: // Page 1
|
||||||
SENDLINE_PGM(SM_MESH_START_S);
|
SENDLINE_PGM(SM_MESH_START_S);
|
||||||
SENDLINE_PGM(SM_MESH_START_L);
|
SENDLINE_PGM(SM_MESH_START_L);
|
||||||
@@ -776,7 +779,7 @@
|
|||||||
flowRateBuffer = SM_FLOW_DISP_L;
|
flowRateBuffer = SM_FLOW_DISP_L;
|
||||||
flowRateBuffer.replace("XXX", String(currentFlowRate));
|
flowRateBuffer.replace("XXX", String(currentFlowRate));
|
||||||
|
|
||||||
switch (filenumber) {
|
switch (selectedNumber) {
|
||||||
case 0: // Page 1
|
case 0: // Page 1
|
||||||
SENDLINE_PGM(SM_FLOW_DISP_S);
|
SENDLINE_PGM(SM_FLOW_DISP_S);
|
||||||
SENDLINE(flowRateBuffer.c_str());
|
SENDLINE(flowRateBuffer.c_str());
|
||||||
@@ -796,13 +799,13 @@
|
|||||||
zOffsetBuffer = SM_BLTZ_DISP_L;
|
zOffsetBuffer = SM_BLTZ_DISP_L;
|
||||||
|
|
||||||
#ifdef ANYCUBIC_TFT_DEBUG
|
#ifdef ANYCUBIC_TFT_DEBUG
|
||||||
SERIAL_ECHOPGM("DEBUG: Current probe.offset.z: ", float(probe.offset.z));
|
SERIAL_ECHOPGM("TFT Serial Debug: Current probe.offset.z: ", float(probe.offset.z));
|
||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
zOffsetBuffer.replace("XXXXX", String(float(probe.offset.z)));
|
zOffsetBuffer.replace("XXXXX", String(float(probe.offset.z)));
|
||||||
|
|
||||||
switch (filenumber) {
|
switch (selectedNumber) {
|
||||||
case 0: // Page 1
|
case 0: // Page 1
|
||||||
SENDLINE_PGM(SM_BLTZ_DISP_S);
|
SENDLINE_PGM(SM_BLTZ_DISP_S);
|
||||||
SENDLINE(zOffsetBuffer.c_str());
|
SENDLINE(zOffsetBuffer.c_str());
|
||||||
@@ -824,7 +827,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (LevelMenu) {
|
else if (LevelMenu) {
|
||||||
switch (filenumber) {
|
switch (selectedNumber) {
|
||||||
case 0: // Page 1
|
case 0: // Page 1
|
||||||
SENDLINE_PGM(SM_EZLVL_P1_S);
|
SENDLINE_PGM(SM_EZLVL_P1_S);
|
||||||
SENDLINE_PGM(SM_EZLVL_P1_L);
|
SENDLINE_PGM(SM_EZLVL_P1_L);
|
||||||
@@ -846,7 +849,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (SpecialMenu) {
|
else if (SpecialMenu) {
|
||||||
switch (filenumber) {
|
switch (selectedNumber) {
|
||||||
case 0: // Page 1
|
case 0: // Page 1
|
||||||
SENDLINE_PGM(SM_FLOWMENU_S);
|
SENDLINE_PGM(SM_FLOWMENU_S);
|
||||||
SENDLINE_PGM(SM_FLOWMENU_L);
|
SENDLINE_PGM(SM_FLOWMENU_L);
|
||||||
@@ -918,26 +921,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // if ENABLED(KNUTWURST_SPECIAL_MENU)
|
#endif // if ENABLED(KNUTWURST_SPECIAL_MENU)
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef SDSUPPORT
|
void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
|
||||||
#if ENABLED(KNUTWURST_SPECIAL_MENU)
|
FileList currentFileList;
|
||||||
else if (card.isMounted())
|
uint16_t count = selectedNumber;
|
||||||
#else
|
uint16_t max_files;
|
||||||
if (card.isMounted())
|
uint16_t filesOnSDCard = currentFileList.count();
|
||||||
#endif
|
|
||||||
{
|
|
||||||
int count = filenumber;
|
|
||||||
int max_files;
|
|
||||||
int filesOnSDCard = card.countFilesInWorkDir();
|
|
||||||
|
|
||||||
if ((filesOnSDCard - filenumber) < 4) {
|
if ((filesOnSDCard - selectedNumber) < 4) {
|
||||||
max_files = filesOnSDCard;
|
max_files = filesOnSDCard;
|
||||||
#ifdef ANYCUBIC_TFT_DEBUG
|
#ifdef ANYCUBIC_TFT_DEBUG
|
||||||
SERIAL_ECHOLN("max_files = filesOnSDCard;");
|
SERIAL_ECHOLN("max_files = filesOnSDCard;");
|
||||||
#endif
|
#endif
|
||||||
}
|
} else {
|
||||||
else {
|
max_files = selectedNumber + 3;
|
||||||
max_files = filenumber + 3;
|
|
||||||
#ifdef ANYCUBIC_TFT_DEBUG
|
#ifdef ANYCUBIC_TFT_DEBUG
|
||||||
SERIAL_ECHOLN("max_files = filenumber + 3;");
|
SERIAL_ECHOLN("max_files = filenumber + 3;");
|
||||||
#endif
|
#endif
|
||||||
@@ -945,39 +943,47 @@
|
|||||||
|
|
||||||
if (filesOnSDCard == 3) filenumber = 0;
|
if (filesOnSDCard == 3) filenumber = 0;
|
||||||
|
|
||||||
#ifdef ANYCUBIC_TFT_DEBUG
|
for (count = selectedNumber; count <= max_files; count++) {
|
||||||
SERIAL_ECHOPGM("filesOnSDCard: ");
|
|
||||||
SERIAL_ECHOLN(filesOnSDCard);
|
|
||||||
SERIAL_ECHOPGM("filenumber: ");
|
|
||||||
SERIAL_ECHOLN(filenumber);
|
|
||||||
SERIAL_ECHOPGM("max_files: ");
|
|
||||||
SERIAL_ECHOLN(max_files);
|
|
||||||
SERIAL_ECHOPGM("count: ");
|
|
||||||
SERIAL_ECHOLN(count);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (count = filenumber; count <= max_files; count++) {
|
|
||||||
if (count == 0) { // Special Entry
|
if (count == 0) { // Special Entry
|
||||||
if (strcmp(card.getWorkDirName(), "/") == 0) {
|
if (currentFileList.isAtRootDir()) {
|
||||||
SENDLINE_PGM(SM_SPECIAL_MENU_S);
|
SENDLINE_PGM(SM_SPECIAL_MENU_S);
|
||||||
SENDLINE_PGM(SM_SPECIAL_MENU_L);
|
SENDLINE_PGM(SM_SPECIAL_MENU_L);
|
||||||
|
#ifdef ANYCUBIC_TFT_DEBUG
|
||||||
SERIAL_ECHO(count);
|
SERIAL_ECHO(count);
|
||||||
SERIAL_ECHO(": ");
|
SERIAL_ECHO(": ");
|
||||||
SERIAL_ECHOLNPGM(SM_SPECIAL_MENU_L);
|
SERIAL_ECHOLNPGM(SM_SPECIAL_MENU_L);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SENDLINE_PGM(SM_DIR_UP_S);
|
SENDLINE_PGM(SM_DIR_UP_S);
|
||||||
SENDLINE_PGM(SM_DIR_UP_L);
|
SENDLINE_PGM(SM_DIR_UP_L);
|
||||||
|
#ifdef ANYCUBIC_TFT_DEBUG
|
||||||
SERIAL_ECHO(count);
|
SERIAL_ECHO(count);
|
||||||
SERIAL_ECHO(": ");
|
SERIAL_ECHO(": ");
|
||||||
SERIAL_ECHOLNPGM(SM_DIR_UP_L);
|
SERIAL_ECHOLNPGM(SM_DIR_UP_L);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
currentFileList.seek(count - 1, false);
|
||||||
|
|
||||||
|
#if ENABLED(ANYCUBIC_LCD_DEBUG)
|
||||||
|
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());
|
||||||
}
|
}
|
||||||
else {
|
*/
|
||||||
card.selectFileByIndex(count - 1);
|
|
||||||
|
|
||||||
// The longname may not be filed, so we use the built-in fallback here.
|
// The longname may not be filed, so we use the built-in fallback here.
|
||||||
char* fileName = card.longest_filename();
|
const char* fileName = currentFileList.filename();
|
||||||
int fileNameLen = strlen(fileName);
|
int fileNameLen = strlen(fileName);
|
||||||
bool fileNameWasCut = false;
|
bool fileNameWasCut = false;
|
||||||
|
|
||||||
@@ -1018,25 +1024,25 @@
|
|||||||
|
|
||||||
outputString[fileNameLen] = '\0';
|
outputString[fileNameLen] = '\0';
|
||||||
|
|
||||||
if (card.flag.filenameIsDir) {
|
if (currentFileList.isDir()) {
|
||||||
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
#if ENABLED(KNUTWURST_DGUS2_TFT)
|
||||||
SEND_PGM("/");
|
SEND_PGM("/");
|
||||||
SEND(card.filename);
|
SEND(currentFileList.shortFilename());
|
||||||
SENDLINE_PGM(".GCO");
|
SENDLINE_PGM(".GCO");
|
||||||
SEND_PGM("/");
|
SEND_PGM("/");
|
||||||
SEND(outputString);
|
SEND(outputString);
|
||||||
SENDLINE_PGM(".gcode");
|
SENDLINE_PGM(".gcode");
|
||||||
#else
|
#else
|
||||||
SEND_PGM("/");
|
SEND_PGM("/");
|
||||||
SEND(card.filename);
|
SENDLINE(currentFileList.shortFilename());
|
||||||
SEND_PGM("/");
|
SEND_PGM("/");
|
||||||
SENDLINE(outputString);
|
SENDLINE(currentFileList.filename());
|
||||||
#endif
|
#endif
|
||||||
SERIAL_ECHO(count);
|
SERIAL_ECHO(count);
|
||||||
SERIAL_ECHOPGM(": /");
|
SERIAL_ECHOPGM(": /");
|
||||||
SERIAL_ECHOLN(outputString);
|
SERIAL_ECHOLN(outputString);
|
||||||
} else {
|
} else { // The current selection is a file and not a directory
|
||||||
SENDLINE(card.filename);
|
SENDLINE(currentFileList.shortFilename());
|
||||||
SENDLINE(outputString);
|
SENDLINE(outputString);
|
||||||
SERIAL_ECHO(count);
|
SERIAL_ECHO(count);
|
||||||
SERIAL_ECHOPGM(": ");
|
SERIAL_ECHOPGM(": ");
|
||||||
@@ -1045,14 +1051,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // ifdef SDSUPPORT
|
|
||||||
else {
|
|
||||||
#if ENABLED(KNUTWURST_SPECIAL_MENU_WO_SD)
|
|
||||||
SENDLINE_PGM(SM_SPECIAL_MENU_S);
|
|
||||||
SENDLINE_PGM(SM_SPECIAL_MENU_L);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AnycubicTouchscreenClass::CheckSDCardChange() {
|
void AnycubicTouchscreenClass::CheckSDCardChange() {
|
||||||
#if BOTH(SDSUPPORT, HAS_SD_DETECT)
|
#if BOTH(SDSUPPORT, HAS_SD_DETECT)
|
||||||
@@ -1080,7 +1078,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AnycubicTouchscreenClass::CheckHeaterError() {
|
void AnycubicTouchscreenClass::CheckHeaterError() {
|
||||||
if ((thermalManager.degHotend(0) < 5) || (thermalManager.degHotend(0) > 300)) {
|
if ( (getTargetTemp_celsius((extruder_t)E0) < 5)
|
||||||
|
|| (getTargetTemp_celsius((extruder_t)E0) > 300)) {
|
||||||
if (HeaterCheckCount > 600000) {
|
if (HeaterCheckCount > 600000) {
|
||||||
HeaterCheckCount = 0;
|
HeaterCheckCount = 0;
|
||||||
SENDLINE_DBG_PGM("J10", "TFT Serial Debug: Hotend temperature abnormal... J10");
|
SENDLINE_DBG_PGM("J10", "TFT Serial Debug: Hotend temperature abnormal... J10");
|
||||||
@@ -1122,7 +1121,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
void AnycubicTouchscreenClass::UserConfirmRequired(const char * const msg) {
|
void AnycubicTouchscreenClass::UserConfirmRequired(const char * const msg) {
|
||||||
#if ENABLED(ANYCUBIC_LCD_DEBUG)
|
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||||
SERIAL_ECHOLNPGM("TFT Serial Debug: OnUserConfirmRequired triggered... ", msg);
|
SERIAL_ECHOLNPGM("TFT Serial Debug: OnUserConfirmRequired triggered... ", msg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1154,10 +1153,6 @@
|
|||||||
mediaPrintingState = AMPRINTSTATE_PAUSED;
|
mediaPrintingState = AMPRINTSTATE_PAUSED;
|
||||||
mediaPauseState = AMPAUSESTATE_FILAMENT_PURGING;
|
mediaPauseState = AMPAUSESTATE_FILAMENT_PURGING;
|
||||||
|
|
||||||
// TODO: JBA I don't think J05 just disables the continue button, i think it injects a rogue M25. So taking this out
|
|
||||||
// disable continue button
|
|
||||||
// SENDLINE_DBG_PGM("J05", "TFT Serial Debug: UserConfirm SD Filament Purging... J05"); // J05 printing pause
|
|
||||||
|
|
||||||
// enable continue button
|
// enable continue button
|
||||||
SENDLINE_DBG_PGM("J18", "TFT Serial Debug: UserConfirm Filament is purging... J18");
|
SENDLINE_DBG_PGM("J18", "TFT Serial Debug: UserConfirm Filament is purging... J18");
|
||||||
}
|
}
|
||||||
@@ -1235,30 +1230,23 @@
|
|||||||
TFTstrchr_pointer = strchr(TFTcmdbuffer[TFTbufindw], 'A');
|
TFTstrchr_pointer = strchr(TFTcmdbuffer[TFTbufindw], 'A');
|
||||||
switch ((int)((strtod(&TFTcmdbuffer[TFTbufindw][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindw] + 1], NULL)))) {
|
switch ((int)((strtod(&TFTcmdbuffer[TFTbufindw][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindw] + 1], NULL)))) {
|
||||||
case 0: // A0 GET HOTEND TEMP
|
case 0: // A0 GET HOTEND TEMP
|
||||||
SEND_PGM_VAL("A0V ", int(thermalManager.degHotend(0) + 0.5));
|
SEND_PGM_VAL("A0V ", int(getActualTemp_celsius(E0) + 0.5));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: // A1 GET HOTEND TARGET TEMP
|
case 1: // A1 GET HOTEND TARGET TEMP
|
||||||
SEND_PGM_VAL("A1V ", int(thermalManager.degTargetHotend(0) + 0.5));
|
SEND_PGM_VAL("A1V ", int(getTargetTemp_celsius(E0) + 0.5));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // A2 GET HOTBED TEMP
|
case 2: // A2 GET HOTBED TEMP
|
||||||
SEND_PGM_VAL("A2V ", int(thermalManager.degBed() + 0.5));
|
SEND_PGM_VAL("A2V ", int(getActualTemp_celsius(BED) + 0.5));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: // A3 GET HOTBED TARGET TEMP
|
case 3: // A3 GET HOTBED TARGET TEMP
|
||||||
SEND_PGM_VAL("A3V ", int(thermalManager.degTargetBed() + 0.5));
|
SEND_PGM_VAL("A3V ", int(getTargetTemp_celsius(BED) + 0.5));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4: // A4 GET FAN SPEED
|
case 4: // A4 GET FAN SPEED
|
||||||
{
|
SEND_PGM_VAL("A4V ", int(getActualFan_percent(FAN0)));
|
||||||
unsigned int temp;
|
|
||||||
|
|
||||||
temp = ((thermalManager.fan_speed[0] * 100) / 255);
|
|
||||||
temp = constrain(temp, 0, 100);
|
|
||||||
|
|
||||||
SEND_PGM_VAL("A4V ", temp);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 5: // A5 GET CURRENT COORDINATE
|
case 5: // A5 GET CURRENT COORDINATE
|
||||||
SEND_PGM("A5V X: "); LCD_SERIAL.print(current_position[X_AXIS]);
|
SEND_PGM("A5V X: "); LCD_SERIAL.print(current_position[X_AXIS]);
|
||||||
@@ -1269,16 +1257,16 @@
|
|||||||
|
|
||||||
case 6: // A6 GET SD CARD PRINTING STATUS
|
case 6: // A6 GET SD CARD PRINTING STATUS
|
||||||
#ifdef SDSUPPORT
|
#ifdef SDSUPPORT
|
||||||
if (card.isPrinting()) {
|
if (isPrintingFromMedia())
|
||||||
|
{
|
||||||
SEND_PGM("A6V ");
|
SEND_PGM("A6V ");
|
||||||
if (card.isMounted())
|
if (isMediaInserted())
|
||||||
SENDLINE(itostr3(card.percentDone()));
|
SENDLINE(ui8tostr3rj(getProgress_percent()));
|
||||||
else
|
else
|
||||||
SENDLINE_DBG_PGM("J02", "TFT Serial Debug: SD Card initialized... J02");
|
SENDLINE_DBG_PGM("J02", "TFT Serial Debug: No SD Card mounted to return printing status... J02");
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
SENDLINE_PGM("A6V ---");
|
SENDLINE_PGM("A6V ---");
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 7: // A7 GET PRINTING TIME
|
case 7: // A7 GET PRINTING TIME
|
||||||
@@ -1310,9 +1298,8 @@
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (CodeSeen('S')) filenumber = CodeValue();
|
if (CodeSeen('S')) filenumber = CodeValue();
|
||||||
SENDLINE_PGM("FN "); // Filelist start
|
//PrintList();
|
||||||
PrintList();
|
RenderCurrentFileList();
|
||||||
SENDLINE_PGM("END"); // Filelist stop
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
@@ -1341,7 +1328,7 @@
|
|||||||
|
|
||||||
case 13: // A13 SELECTION FILE
|
case 13: // A13 SELECTION FILE
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
if (isMediaInserted()) {
|
{
|
||||||
starpos = (strchr(TFTstrchr_pointer + 4, '*'));
|
starpos = (strchr(TFTstrchr_pointer + 4, '*'));
|
||||||
if (TFTstrchr_pointer[4] == '/') {
|
if (TFTstrchr_pointer[4] == '/') {
|
||||||
strcpy(currentTouchscreenSelection, TFTstrchr_pointer + 5);
|
strcpy(currentTouchscreenSelection, TFTstrchr_pointer + 5);
|
||||||
@@ -1392,14 +1379,14 @@
|
|||||||
unsigned int tempvalue;
|
unsigned int tempvalue;
|
||||||
if (CodeSeen('S')) {
|
if (CodeSeen('S')) {
|
||||||
tempvalue = constrain(CodeValue(), 0, 260);
|
tempvalue = constrain(CodeValue(), 0, 260);
|
||||||
if (thermalManager.degTargetHotend(0) <= 260)
|
if (getTargetTemp_celsius((extruder_t)E0) <= 260)
|
||||||
thermalManager.setTargetHotend(tempvalue, 0); // do not set Temp from TFT if it is set via gcode
|
setTargetTemp_celsius(tempvalue, (extruder_t)E0);; // do not set Temp from TFT if it is set via gcode
|
||||||
}
|
}
|
||||||
else if ((CodeSeen('C')) && (!planner.movesplanned())) {
|
else if ((CodeSeen('C')) && (!isPrinting())) {
|
||||||
if ((current_position[Z_AXIS] < 10))
|
if ((getAxisPosition_mm(Z) < 10))
|
||||||
queue.inject_P(PSTR("G1 Z10")); // RASE Z AXIS
|
injectCommands(F("G1 Z10")); // RASE Z AXIS
|
||||||
tempvalue = constrain(CodeValue(), 0, 260);
|
tempvalue = constrain(CodeValue(), 0, 260);
|
||||||
thermalManager.setTargetHotend(tempvalue, 0);
|
setTargetTemp_celsius(tempvalue, (extruder_t)E0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1408,36 +1395,33 @@
|
|||||||
{
|
{
|
||||||
unsigned int tempbed;
|
unsigned int tempbed;
|
||||||
if (CodeSeen('S')) {
|
if (CodeSeen('S')) {
|
||||||
tempbed = constrain(CodeValue(), 0, 115);
|
tempbed = constrain(CodeValue(), 0, 120);
|
||||||
thermalManager.setTargetBed(tempbed);
|
if (getTargetTemp_celsius((heater_t)BED) <= 100)
|
||||||
if (thermalManager.degTargetBed() <= 100)
|
setTargetTemp_celsius(tempbed, (heater_t)BED); // do not set Temp from TFT if it is set via gcode
|
||||||
thermalManager.setTargetBed(tempbed); // do not set Temp from TFT if it is set via gcode
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 18: // A18 set fan speed
|
case 18: // A18 set fan speed
|
||||||
unsigned int temp;
|
float fanPercent;
|
||||||
if (CodeSeen('S')) {
|
if (CodeSeen('S')) {
|
||||||
temp = (CodeValue() * 255 / 100);
|
fanPercent = CodeValue();
|
||||||
temp = constrain(temp, 0, 255);
|
fanPercent = constrain(fanPercent, 0, 100);
|
||||||
thermalManager.set_fan_speed(0, temp);
|
setTargetFan_percent(fanPercent, FAN0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
thermalManager.set_fan_speed(0, 255);
|
fanPercent = 100;
|
||||||
|
setTargetFan_percent(fanPercent, FAN0);
|
||||||
}
|
}
|
||||||
SENDLINE_PGM("");
|
SENDLINE_PGM("");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 19: // A19 stop stepper drivers
|
case 19: // A19 stop stepper drivers
|
||||||
if ((!planner.movesplanned())
|
if (!isPrinting()) {
|
||||||
#ifdef SDSUPPORT
|
|
||||||
&& (!card.isPrinting())
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
quickstop_stepper();
|
quickstop_stepper();
|
||||||
stepper.disable_all_steppers();
|
stepper.disable_all_steppers();
|
||||||
}
|
}
|
||||||
|
|
||||||
SENDLINE_PGM("");
|
SENDLINE_PGM("");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1553,16 +1537,18 @@
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 26: // A26 refresh SD
|
case 26: // A26 refresh SD
|
||||||
|
{
|
||||||
#ifdef SDSUPPORT
|
#ifdef SDSUPPORT
|
||||||
#ifdef ANYCUBIC_TFT_DEBUG
|
#ifdef ANYCUBIC_TFT_DEBUG
|
||||||
SERIAL_ECHOPGM(" TFT Serial Debug: currentTouchscreenSelection: ", currentTouchscreenSelection);
|
SERIAL_ECHOPGM("TFT Serial Debug: RefreshSD(): currentTouchscreenSelection: ", currentTouchscreenSelection);
|
||||||
|
SERIAL_EOL();
|
||||||
|
SERIAL_ECHOPGM("TFT Serial Debug: RefreshSD(): currentFileOrDirectory: ", currentFileOrDirectory);
|
||||||
SERIAL_EOL();
|
SERIAL_EOL();
|
||||||
#endif
|
#endif
|
||||||
if (isMediaInserted()) {
|
|
||||||
if (strlen(currentTouchscreenSelection) > 0) {
|
|
||||||
FileList currentFileList;
|
FileList currentFileList;
|
||||||
if ((strcasestr_P(currentTouchscreenSelection, PSTR(SM_DIR_UP_S)) != NULL)
|
if ((strcasestr_P(currentFileOrDirectory, PSTR(SM_DIR_UP_S)) != NULL)
|
||||||
|| (strcasestr_P(currentTouchscreenSelection, PSTR(SM_DIR_UP_L)) != NULL)
|
|| (strcasestr_P(currentFileOrDirectory, PSTR(SM_DIR_UP_L)) != NULL)
|
||||||
) {
|
) {
|
||||||
#ifdef ANYCUBIC_TFT_DEBUG
|
#ifdef ANYCUBIC_TFT_DEBUG
|
||||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Directory UP (cd ..)");
|
SERIAL_ECHOLNPGM("TFT Serial Debug: Directory UP (cd ..)");
|
||||||
@@ -1585,23 +1571,19 @@
|
|||||||
strcpy(currentFileOrDirectory, currentTouchscreenSelection);
|
strcpy(currentFileOrDirectory, currentTouchscreenSelection);
|
||||||
int currentFileLen = strlen(currentFileOrDirectory);
|
int currentFileLen = strlen(currentFileOrDirectory);
|
||||||
currentFileOrDirectory[currentFileLen - 4] = '\0';
|
currentFileOrDirectory[currentFileLen - 4] = '\0';
|
||||||
card.cd(currentFileOrDirectory);
|
currentFileList.changeDir(currentFileOrDirectory);
|
||||||
#else
|
#else
|
||||||
currentFileList.changeDir(currentTouchscreenSelection);
|
currentFileList.changeDir(currentTouchscreenSelection);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (SpecialMenu == false) {
|
||||||
if (SpecialMenu == false)
|
|
||||||
currentTouchscreenSelection[0] = 0;
|
currentTouchscreenSelection[0] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
#endif // ifdef SDSUPPORT
|
#endif // ifdef SDSUPPORT
|
||||||
break;
|
break;
|
||||||
#ifdef SERVO_ENDSTOPS
|
|
||||||
case 27: // A27 servos angles adjust
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case 28: // A28 filament test
|
case 28: // A28 filament test
|
||||||
{
|
{
|
||||||
@@ -1633,7 +1615,7 @@
|
|||||||
|
|
||||||
if (!isPrinting()) {
|
if (!isPrinting()) {
|
||||||
if (!all_axes_trusted()) {
|
if (!all_axes_trusted()) {
|
||||||
queue.inject_P(PSTR("G28\n"));
|
injectCommands(F("G28\n"));
|
||||||
/*
|
/*
|
||||||
set_axis_is_at_home(X_AXIS);
|
set_axis_is_at_home(X_AXIS);
|
||||||
sync_plan_position();
|
sync_plan_position();
|
||||||
@@ -1777,12 +1759,12 @@
|
|||||||
case 42:
|
case 42:
|
||||||
if (CaseLight == true) {
|
if (CaseLight == true) {
|
||||||
SERIAL_ECHOLNPGM("Case Light OFF");
|
SERIAL_ECHOLNPGM("Case Light OFF");
|
||||||
queue.inject_P(PSTR("M355 S1 P0"));
|
injectCommands(F("M355 S1 P0"));
|
||||||
CaseLight = false;
|
CaseLight = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SERIAL_ECHOLNPGM("Case Light ON");
|
SERIAL_ECHOLNPGM("Case Light ON");
|
||||||
queue.inject_P(PSTR("M355 S1 P255"));
|
injectCommands(F("M355 S1 P255"));
|
||||||
CaseLight = true;
|
CaseLight = true;
|
||||||
}
|
}
|
||||||
// break; <-- TODO: do we need it?
|
// break; <-- TODO: do we need it?
|
||||||
@@ -1993,7 +1975,7 @@
|
|||||||
if (ELAPSED(ms, nextStopCheck)) {
|
if (ELAPSED(ms, nextStopCheck)) {
|
||||||
nextStopCheck = ms + 1000UL;
|
nextStopCheck = ms + 1000UL;
|
||||||
if (mediaPrintingState == AMPRINTSTATE_STOP_REQUESTED) {
|
if (mediaPrintingState == AMPRINTSTATE_STOP_REQUESTED) {
|
||||||
#if ENABLED(ANYCUBIC_LCD_DEBUG)
|
#if ENABLED(ANYCUBIC_TFT_DEBUG)
|
||||||
SERIAL_ECHOLNPGM("TFT Serial Debug: Finished stopping print, releasing motors ...");
|
SERIAL_ECHOLNPGM("TFT Serial Debug: Finished stopping print, releasing motors ...");
|
||||||
#endif
|
#endif
|
||||||
mediaPrintingState = AMPRINTSTATE_NOT_PRINTING;
|
mediaPrintingState = AMPRINTSTATE_NOT_PRINTING;
|
||||||
|
@@ -42,20 +42,6 @@ char *itostr2(const uint8_t &x);
|
|||||||
#define MSG_MY_VERSION CUSTOM_BUILD_VERSION
|
#define MSG_MY_VERSION CUSTOM_BUILD_VERSION
|
||||||
#define MAX_PRINTABLE_FILENAME_LEN 26
|
#define MAX_PRINTABLE_FILENAME_LEN 26
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_CHIRON)
|
|
||||||
#define FIL_RUNOUT_PIN 33
|
|
||||||
#else
|
|
||||||
#define FIL_RUNOUT_PIN 19
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ANYCUBIC_TFT_STATE_IDLE 0
|
|
||||||
#define ANYCUBIC_TFT_STATE_SDPRINT 1
|
|
||||||
#define ANYCUBIC_TFT_STATE_SDPAUSE 2
|
|
||||||
#define ANYCUBIC_TFT_STATE_SDPAUSE_REQ 3
|
|
||||||
#define ANYCUBIC_TFT_STATE_SDPAUSE_OOF 4
|
|
||||||
#define ANYCUBIC_TFT_STATE_SDSTOP_REQ 5
|
|
||||||
#define ANYCUBIC_TFT_STATE_SDOUTAGE 99
|
|
||||||
|
|
||||||
enum AnycubicMediaPrintState {
|
enum AnycubicMediaPrintState {
|
||||||
AMPRINTSTATE_NOT_PRINTING,
|
AMPRINTSTATE_NOT_PRINTING,
|
||||||
AMPRINTSTATE_PRINTING,
|
AMPRINTSTATE_PRINTING,
|
||||||
@@ -259,6 +245,7 @@ enum AnycubicMediaPauseState {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
class AnycubicTouchscreenClass {
|
class AnycubicTouchscreenClass {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AnycubicTouchscreenClass();
|
AnycubicTouchscreenClass();
|
||||||
|
|
||||||
@@ -273,9 +260,11 @@ void KillTFT();
|
|||||||
static void OnPrintTimerStarted();
|
static void OnPrintTimerStarted();
|
||||||
static void OnPrintTimerPaused();
|
static void OnPrintTimerPaused();
|
||||||
static void OnPrintTimerStopped();
|
static void OnPrintTimerStopped();
|
||||||
|
|
||||||
#if BOTH(ANYCUBIC_TFT_DEBUG, KNUTWURST_DGUS2_TFT)
|
#if BOTH(ANYCUBIC_TFT_DEBUG, KNUTWURST_DGUS2_TFT)
|
||||||
void Command(const char * const command);
|
void Command(const char * const command);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
#if ENABLED(KNUTWURST_TFT_LEVELING)
|
||||||
void LevelingDone();
|
void LevelingDone();
|
||||||
#endif
|
#endif
|
||||||
@@ -318,7 +307,6 @@ static AnycubicMediaPauseState mediaPauseState;
|
|||||||
int CodeValueInt();
|
int CodeValueInt();
|
||||||
float CodeValue();
|
float CodeValue();
|
||||||
bool CodeSeen(char);
|
bool CodeSeen(char);
|
||||||
void PrintList();
|
|
||||||
void StartPrint();
|
void StartPrint();
|
||||||
void PausePrint();
|
void PausePrint();
|
||||||
void StopPrint();
|
void StopPrint();
|
||||||
@@ -331,12 +319,14 @@ void FilamentChangePause();
|
|||||||
void ResumePrint();
|
void ResumePrint();
|
||||||
void ReheatNozzle();
|
void ReheatNozzle();
|
||||||
void ParkAfterStop();
|
void ParkAfterStop();
|
||||||
|
void RenderCurrentFileList();
|
||||||
|
void RenderSpecialMenu(uint16_t);
|
||||||
|
void RenderCurrentFolder(uint16_t);
|
||||||
|
|
||||||
char currentTouchscreenSelection[30];
|
char currentTouchscreenSelection[64];
|
||||||
char currentFileOrDirectory[30];
|
char currentFileOrDirectory[64];
|
||||||
String flowRateBuffer;
|
String flowRateBuffer;
|
||||||
String zOffsetBuffer;
|
String zOffsetBuffer;
|
||||||
uint16_t MyFileNrCnt = 0;
|
|
||||||
uint8_t FilamentSensorEnabled = true;
|
uint8_t FilamentSensorEnabled = true;
|
||||||
|
|
||||||
uint8_t SpecialMenu = false;
|
uint8_t SpecialMenu = false;
|
||||||
|
@@ -286,11 +286,27 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// RAMPS 1.4 DIO 4 on the servos connector
|
|
||||||
#ifndef FIL_RUNOUT_PIN
|
#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
|
#define FIL_RUNOUT_PIN 19
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef PS_ON_PIN
|
#ifndef PS_ON_PIN
|
||||||
#define PS_ON_PIN 12
|
#define PS_ON_PIN 12
|
||||||
#endif
|
#endif
|
||||||
|
@@ -142,6 +142,19 @@
|
|||||||
#define Z_CS_PIN 40
|
#define Z_CS_PIN 40
|
||||||
#endif
|
#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_STEP_PIN 26
|
||||||
#define E0_DIR_PIN 28
|
#define E0_DIR_PIN 28
|
||||||
#define E0_ENABLE_PIN 24
|
#define E0_ENABLE_PIN 24
|
||||||
@@ -253,7 +266,7 @@
|
|||||||
|
|
||||||
// RAMPS 1.4 DIO 4 on the servos connector
|
// RAMPS 1.4 DIO 4 on the servos connector
|
||||||
#ifndef FIL_RUNOUT_PIN
|
#ifndef FIL_RUNOUT_PIN
|
||||||
#define FIL_RUNOUT_PIN 4
|
#define FIL_RUNOUT_PIN 33
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PS_ON_PIN
|
#ifndef PS_ON_PIN
|
||||||
|
@@ -86,6 +86,12 @@
|
|||||||
#define OUTAGECON_PIN 58
|
#define OUTAGECON_PIN 58
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ANY(KNUTWURST_CHIRON, KNUTWURST_4MAXP2)
|
||||||
|
#define FIL_RUNOUT_PIN 33
|
||||||
|
#else
|
||||||
|
#define FIL_RUNOUT_PIN 19
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(TRIGORILLA_MAPPING_CHIRON)
|
#if ENABLED(TRIGORILLA_MAPPING_CHIRON)
|
||||||
#ifndef FIL_RUNOUT_PIN
|
#ifndef FIL_RUNOUT_PIN
|
||||||
#define FIL_RUNOUT_PIN 33
|
#define FIL_RUNOUT_PIN 33
|
||||||
@@ -97,7 +103,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EITHER(TRIGORILLA_MAPPING_CHIRON, SWAP_Z_MOTORS)
|
#if ANY(TRIGORILLA_MAPPING_CHIRON, SWAP_Z_MOTORS, KNUTWURST_CHIRON, KNUTWURST_4MAXP2) // PATCH: knutwurst
|
||||||
// Chiron and some Anycubic i3 MEGAs swap Z steppers
|
// Chiron and some Anycubic i3 MEGAs swap Z steppers
|
||||||
#define Z_STEP_PIN 36
|
#define Z_STEP_PIN 36
|
||||||
#define Z_DIR_PIN 34
|
#define Z_DIR_PIN 34
|
||||||
|
@@ -64,7 +64,7 @@
|
|||||||
#define TG_FAN1_PIN 7 // Anycubic Kossel: Unused
|
#define TG_FAN1_PIN 7 // Anycubic Kossel: Unused
|
||||||
#define TG_FAN2_PIN 44 // Anycubic Kossel: Hotend fan
|
#define TG_FAN2_PIN 44 // Anycubic Kossel: Hotend fan
|
||||||
#define CONTROLLER_FAN_PIN TG_FAN1_PIN
|
#define CONTROLLER_FAN_PIN TG_FAN1_PIN
|
||||||
#define FIL_RUNOUT_PIN 19
|
#define FIL_RUNOUT_PIN 33
|
||||||
#define BEEPER_PIN 31
|
#define BEEPER_PIN 31
|
||||||
#define SDSS 53
|
#define SDSS 53
|
||||||
#define LED_PIN 13
|
#define LED_PIN 13
|
||||||
|
Reference in New Issue
Block a user