13 Commits

16 changed files with 459 additions and 852 deletions

View File

@@ -21,7 +21,7 @@ jobs:
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label / comment or this will be closed in 5 days.' stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label / comment or this will be closed in 5 days.'
days-before-stale: 30 days-before-stale: 300
days-before-close: 5 days-before-close: 30
stale-issue-label: 'stale-closing-soon' stale-issue-label: 'stale-closing-soon'
exempt-issue-labels: 'T: Feature Request' exempt-issue-labels: 'T: Feature Request'

View File

@@ -21,7 +21,7 @@ jobs:
with: with:
github-token: ${{ github.token }} github-token: ${{ github.token }}
process-only: 'issues' process-only: 'issues'
issue-lock-inactive-days: '60' issue-lock-inactive-days: '300'
issue-exclude-created-before: '' issue-exclude-created-before: ''
issue-exclude-labels: 'no-locking' issue-exclude-labels: 'no-locking'
issue-lock-labels: '' issue-lock-labels: ''

View File

@@ -37,9 +37,6 @@
*/ */
#define CONFIGURATION_H_VERSION 02010200 #define CONFIGURATION_H_VERSION 02010200
#define ANYCUBIC_TOUCHSCREEN #define ANYCUBIC_TOUCHSCREEN
#if DISABLED(KNUTWURST_4MAXP2)
#define ANYCUBIC_FILAMENT_RUNOUT_SENSOR
#endif
#define KNUTWURST_SPECIAL_MENU #define KNUTWURST_SPECIAL_MENU
#define KNUTWURST_SPECIAL_MENU_WO_SD #define KNUTWURST_SPECIAL_MENU_WO_SD
// #define ANYCUBIC_TFT_DEBUG // #define ANYCUBIC_TFT_DEBUG
@@ -1662,7 +1659,7 @@
* Use G29 repeatedly, adjusting the Z height at each point with movement commands * Use G29 repeatedly, adjusting the Z height at each point with movement commands
* or (with LCD_BED_LEVELING) the LCD controller. * or (with LCD_BED_LEVELING) the LCD controller.
*/ */
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING) #if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING, KNUTWURST_KLICKY)
#define PROBE_MANUALLY #define PROBE_MANUALLY
#endif #endif
@@ -1739,21 +1736,24 @@
* Magnetically Mounted Probe * Magnetically Mounted Probe
* For probes such as Euclid, Klicky, Klackender, etc. * For probes such as Euclid, Klicky, Klackender, etc.
*/ */
// #define MAG_MOUNTED_PROBE #if ENABLED(KNUTWURST_KLICKY)
#if ENABLED(MAG_MOUNTED_PROBE) // @see https://www.printables.com/model/489398-anycubic-mega-klicky-probe
#define PROBE_DEPLOY_FEEDRATE (133 * 60) // (mm/min) Probe deploy speed #define MAG_MOUNTED_PROBE
#define PROBE_STOW_FEEDRATE (133 * 60) // (mm/min) Probe stow speed #if ENABLED(MAG_MOUNTED_PROBE)
#define PROBE_DEPLOY_FEEDRATE (133 * 60) // (mm/min) Probe deploy speed
#define PROBE_STOW_FEEDRATE (133 * 60) // (mm/min) Probe stow speed
#define MAG_MOUNTED_DEPLOY_1 { PROBE_DEPLOY_FEEDRATE, { 245, 114, 30 } } // Move to side Dock & Attach probe #define MAG_MOUNTED_DEPLOY_1 { PROBE_DEPLOY_FEEDRATE, { 176, 0, 0 } } // Move to front dock & attach probe
#define MAG_MOUNTED_DEPLOY_2 { PROBE_DEPLOY_FEEDRATE, { 210, 114, 30 } } // Move probe off dock #define MAG_MOUNTED_DEPLOY_2 { PROBE_DEPLOY_FEEDRATE, { 176, 0, 20 } } // Move probe off dock
#define MAG_MOUNTED_DEPLOY_3 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed #define MAG_MOUNTED_DEPLOY_3 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
#define MAG_MOUNTED_DEPLOY_4 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed #define MAG_MOUNTED_DEPLOY_4 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
#define MAG_MOUNTED_DEPLOY_5 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed #define MAG_MOUNTED_DEPLOY_5 { PROBE_DEPLOY_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
#define MAG_MOUNTED_STOW_1 { PROBE_STOW_FEEDRATE, { 245, 114, 20 } } // Move to dock #define MAG_MOUNTED_STOW_1 { PROBE_STOW_FEEDRATE, { 176, 0, 20 } } // Move right above the dock
#define MAG_MOUNTED_STOW_2 { PROBE_STOW_FEEDRATE, { 245, 114, 0 } } // Place probe beside remover #define MAG_MOUNTED_STOW_2 { PROBE_STOW_FEEDRATE, { 176, 0, 0 } } // Move probe into dock
#define MAG_MOUNTED_STOW_3 { PROBE_STOW_FEEDRATE, { 230, 114, 0 } } // Side move to remove probe #define MAG_MOUNTED_STOW_3 { PROBE_STOW_FEEDRATE, { 50, 0, 0 } } // Side move to remove probe
#define MAG_MOUNTED_STOW_4 { PROBE_STOW_FEEDRATE, { 210, 114, 20 } } // Side move to remove probe #define MAG_MOUNTED_STOW_4 { PROBE_STOW_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
#define MAG_MOUNTED_STOW_5 { PROBE_STOW_FEEDRATE, { 0, 0, 0 } } // Extra move if needed #define MAG_MOUNTED_STOW_5 { PROBE_STOW_FEEDRATE, { 0, 0, 0 } } // Extra move if needed
#endif
#endif #endif
// Duet Smart Effector (for delta printers) - https://bit.ly/2ul5U7J // Duet Smart Effector (for delta printers) - https://bit.ly/2ul5U7J
@@ -1852,7 +1852,11 @@
#define NOZZLE_TO_PROBE_OFFSET { 0, 0, -16.8 } #define NOZZLE_TO_PROBE_OFFSET { 0, 0, -16.8 }
#endif #endif
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING) #if ENABLED(KNUTWURST_KLICKY)
#define NOZZLE_TO_PROBE_OFFSET { 0, -25, -7 }
#endif
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING, KNUTWURST_KLICKY)
#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 } #define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }
#endif #endif
@@ -1862,6 +1866,8 @@
#if ENABLED(KNUTWURST_CHIRON) #if ENABLED(KNUTWURST_CHIRON)
#define PROBING_MARGIN 15 #define PROBING_MARGIN 15
#elseif ENABLED(KNUTWURST_KLICKY)
#define PROBING_MARGIN 20
#else #else
#define PROBING_MARGIN 35 #define PROBING_MARGIN 35
#endif #endif
@@ -2380,15 +2386,15 @@
* RAMPS-based boards use SERVO3_PIN for the first runout sensor. * RAMPS-based boards use SERVO3_PIN for the first runout sensor.
* For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
*/ */
// #define FILAMENT_RUNOUT_SENSOR #define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR) #if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500. #define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500.
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. #define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_STATE LOW // Pin state indicating that filament is NOT present. #define FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present.
#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. // #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
// #define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. // #define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins.
// #define WATCH_ALL_RUNOUT_SENSORS // Execute runout script on any triggering sensor, not only for the active extruder. // #define WATCH_ALL_RUNOUT_SENSORS // Execute runout script on any triggering sensor, not only for the active extruder.
// This is automatically enabled for MIXING_EXTRUDERs. // This is automatically enabled for MIXING_EXTRUDERs.
// Override individually if the runout sensors vary // Override individually if the runout sensors vary
@@ -2480,7 +2486,7 @@
* leveling in steps so you can manually adjust the Z height at each grid-point. * leveling in steps so you can manually adjust the Z height at each grid-point.
* With an LCD controller the process is guided step-by-step. * With an LCD controller the process is guided step-by-step.
*/ */
#if EITHER(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING) #if ANY(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING, KNUTWURST_KLICKY)
// #define AUTO_BED_LEVELING_3POINT // #define AUTO_BED_LEVELING_3POINT
// #define AUTO_BED_LEVELING_LINEAR // #define AUTO_BED_LEVELING_LINEAR
#define AUTO_BED_LEVELING_BILINEAR #define AUTO_BED_LEVELING_BILINEAR
@@ -2488,7 +2494,7 @@
// #define MESH_BED_LEVELING // #define MESH_BED_LEVELING
#endif #endif
#if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING) #if NONE(KNUTWURST_BLTOUCH, KNUTWURST_TFT_LEVELING, KNUTWURST_KLICKY)
// #define AUTO_BED_LEVELING_3POINT // #define AUTO_BED_LEVELING_3POINT
// #define AUTO_BED_LEVELING_LINEAR // #define AUTO_BED_LEVELING_LINEAR
// #define AUTO_BED_LEVELING_BILINEAR // #define AUTO_BED_LEVELING_BILINEAR

View File

@@ -1551,7 +1551,7 @@
// #define MEDIA_MENU_AT_TOP // Force the media menu to be listed on the top of the main menu // #define MEDIA_MENU_AT_TOP // Force the media menu to be listed on the top of the main menu
#define EVENT_GCODE_SD_ABORT "G28XY" // G-code to run on SD Abort Print (e.g., "G28XY" or "G27") #define EVENT_GCODE_SD_ABORT "G27" // G-code to run on SD Abort Print (e.g., "G28XY" or "G27")
#if ENABLED(PRINTER_EVENT_LEDS) #if ENABLED(PRINTER_EVENT_LEDS)
#define PE_LEDS_COMPLETED_TIME (30 * 60) // (seconds) Time to keep the LED "done" color before restoring normal illumination #define PE_LEDS_COMPLETED_TIME (30 * 60) // (seconds) Time to keep the LED "done" color before restoring normal illumination
@@ -2658,7 +2658,7 @@
*/ */
#define ADVANCED_PAUSE_FEATURE #define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE) #if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_RETRACT_FEEDRATE 60 // (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.
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 30 // (mm/s) Unload filament feedrate. This can be pretty fast. #define FILAMENT_CHANGE_UNLOAD_FEEDRATE 30 // (mm/s) Unload filament feedrate. This can be pretty fast.
@@ -2675,7 +2675,7 @@
#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.
// #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.
@@ -2690,7 +2690,7 @@
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged. #define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
#define FILAMENT_UNLOAD_PURGE_FEEDRATE 25 // (mm/s) feedrate to purge before unload #define FILAMENT_UNLOAD_PURGE_FEEDRATE 25 // (mm/s) feedrate to purge before unload
#define PAUSE_PARK_NOZZLE_TIMEOUT 60 // (seconds) Time limit before the nozzle is turned off for safety. #define PAUSE_PARK_NOZZLE_TIMEOUT 300 // (seconds) Time limit before the nozzle is turned off for safety.
#define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed. #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed.
#define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
// #define FILAMENT_CHANGE_RESUME_ON_INSERT // Automatically continue / load filament when runout sensor is triggered again. // #define FILAMENT_CHANGE_RESUME_ON_INSERT // Automatically continue / load filament when runout sensor is triggered again.
@@ -4012,7 +4012,7 @@
#define HOST_PAUSE_M76 // Tell the host to pause in response to M76 #define HOST_PAUSE_M76 // Tell the host to pause in response to M76
#define HOST_PROMPT_SUPPORT // Initiate host prompts to get user feedback #define HOST_PROMPT_SUPPORT // Initiate host prompts to get user feedback
#if ENABLED(HOST_PROMPT_SUPPORT) #if ENABLED(HOST_PROMPT_SUPPORT)
// #define HOST_STATUS_NOTIFICATIONS // Send some status messages to the host as notifications #define HOST_STATUS_NOTIFICATIONS // Send some status messages to the host as notifications
#endif #endif
// #define HOST_START_MENU_ITEM // Add a menu item that tells the host to start // #define HOST_START_MENU_ITEM // Add a menu item that tells the host to start
// #define HOST_SHUTDOWN_MENU_ITEM // Add a menu item that tells the host to shut down // #define HOST_SHUTDOWN_MENU_ITEM // Add a menu item that tells the host to shut down

View File

@@ -252,12 +252,6 @@
#include "tests/marlin_tests.h" #include "tests/marlin_tests.h"
#endif #endif
// PATCH START: Knutwurst
#if ENABLED(ANYCUBIC_TOUCHSCREEN)
#include "lcd/extui/knutwurst/anycubic_touchscreen.h"
#endif
// PATCH END: Knutwurst
PGMSTR(M112_KILL_STR, "M112 Shutdown"); PGMSTR(M112_KILL_STR, "M112 Shutdown");
MarlinState marlin_state = MF_INITIALIZING; MarlinState marlin_state = MF_INITIALIZING;
@@ -396,88 +390,6 @@ void startOrResumeJob() {
#endif // SDSUPPORT #endif // SDSUPPORT
// PATCH START: Knutwurst
#ifdef ENDSTOP_BEEP
void EndstopBeep() {
static char last_status = ((READ(X_MIN_PIN) << 2) | (READ(Y_MIN_PIN) << 1) | READ(X_MAX_PIN));
static unsigned char now_status;
now_status = ((READ(X_MIN_PIN) << 2) | (READ(Y_MIN_PIN) << 1) | READ(X_MAX_PIN)) & 0xff;
if (now_status<last_status) {
static millis_t endstop_ms = millis() + 300UL;
if (ELAPSED(millis(), endstop_ms)) {
buzzer.tone(60, 2000);
}
last_status = now_status;
} else if (now_status != last_status) {
last_status=now_status;
}
}
#endif
#if HAS_FILAMENT_SENSOR
void event_filament_runout() {
#if ENABLED(ADVANCED_PAUSE_FEATURE)
if (did_pause_print) return; // Action already in progress. Purge triggered repeated runout.
#endif
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onFilamentRunout(ExtUI::getActiveTool());
#endif
#if EITHER(HOST_PROMPT_SUPPORT, HOST_ACTION_COMMANDS)
const char tool = '0'
#if NUM_RUNOUT_SENSORS > 1
+ active_extruder
#endif
;
#endif
//action:out_of_filament
#if ENABLED(HOST_PROMPT_SUPPORT)
host_prompt_reason = PROMPT_FILAMENT_RUNOUT;
host_action_prompt_end();
host_action_prompt_begin(PSTR("FilamentRunout T"), false);
SERIAL_CHAR(tool);
SERIAL_EOL();
host_action_prompt_show();
#endif
const bool run_runout_script = !runout.host_handling;
#if ENABLED(HOST_ACTION_COMMANDS)
if (run_runout_script
&& ( strstr(FILAMENT_RUNOUT_SCRIPT, "M600")
|| strstr(FILAMENT_RUNOUT_SCRIPT, "M125")
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|| strstr(FILAMENT_RUNOUT_SCRIPT, "M25")
#endif
)
) {
host_action_paused(false);
} else {
// Legacy Repetier command for use until newer version supports standard dialog
// To be removed later when pause command also triggers dialog
#ifdef ACTION_ON_FILAMENT_RUNOUT
host_action(PSTR(ACTION_ON_FILAMENT_RUNOUT " T"), false);
SERIAL_CHAR(tool);
SERIAL_EOL();
#endif
host_action_pause(false);
}
SERIAL_ECHOPGM(" " ACTION_REASON_ON_FILAMENT_RUNOUT " ");
SERIAL_CHAR(tool);
SERIAL_EOL();
#endif // HOST_ACTION_COMMANDS
if (run_runout_script) {
queue.inject_P(PSTR(FILAMENT_RUNOUT_SCRIPT));
}
}
#endif // HAS_FILAMENT_SENSOR
// PATCH END: Knutwurst
/** /**
* Minimal management of Marlin's core activities: * Minimal management of Marlin's core activities:
@@ -493,12 +405,6 @@ void EndstopBeep() {
* - Pulse FET_SAFETY_PIN if it exists * - Pulse FET_SAFETY_PIN if it exists
*/ */
inline void manage_inactivity(const bool no_stepper_sleep=false) { inline void manage_inactivity(const bool no_stepper_sleep=false) {
// PATCH START: Knutwurst
#if ENABLED(ANYCUBIC_TOUCHSCREEN) && ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
AnycubicTouchscreen.FilamentRunout();
#endif
// PATCH END: Knutwurst
queue.get_available_commands(); queue.get_available_commands();
const millis_t ms = millis(); const millis_t ms = millis();
@@ -889,12 +795,6 @@ void idle(bool no_stepper_sleep/*=false*/) {
// Max7219 heartbeat, animation, etc // Max7219 heartbeat, animation, etc
TERN_(MAX7219_DEBUG, max7219.idle_tasks()); TERN_(MAX7219_DEBUG, max7219.idle_tasks());
// PATCH START: Knutwurst
#ifdef ENDSTOP_BEEP
EndstopBeep();
#endif
// PATCH END: Knutwurst
// Return if setup() isn't completed // Return if setup() isn't completed
if (marlin_state == MF_INITIALIZING) goto IDLE_DONE; if (marlin_state == MF_INITIALIZING) goto IDLE_DONE;

View File

@@ -576,17 +576,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep
IF_DISABLED(PAUSE_REHEAT_FAST_RESUME, wait_for_user = true); IF_DISABLED(PAUSE_REHEAT_FAST_RESUME, wait_for_user = true);
nozzle_timed_out = false; nozzle_timed_out = false;
/*
#ifdef ANYCUBIC_TOUCHSCREEN
if (AnycubicTouchscreen.ai3m_pause_state > 3) {
AnycubicTouchscreen.ai3m_pause_state -= 3;
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOPGM(" DEBUG: NTO - AI3M Pause State set to: ", AnycubicTouchscreen.ai3m_pause_state);
SERIAL_EOL();
#endif
}
#endif
*/
first_impatient_beep(max_beep_count); first_impatient_beep(max_beep_count);
} }
idle_no_sleep(); idle_no_sleep();

View File

@@ -30,13 +30,6 @@
#include "../../../module/printcounter.h" #include "../../../module/printcounter.h"
#include "../../../lcd/marlinui.h" #include "../../../lcd/marlinui.h"
// PATCH START: Knutwurst
#ifdef ANYCUBIC_TOUCHSCREEN
#include "../../../lcd/extui/knutwurst/anycubic_touchscreen.h"
#include "../../../sd/cardreader.h"
#endif
// PATCH END: Knutwurst
#if HAS_MULTI_EXTRUDER #if HAS_MULTI_EXTRUDER
#include "../../../module/tool_change.h" #include "../../../module/tool_change.h"
#endif #endif
@@ -78,29 +71,6 @@
* Default values are used for omitted arguments. * Default values are used for omitted arguments.
*/ */
void GcodeSuite::M600() { void GcodeSuite::M600() {
// PATCH START: Knutwurst
#ifdef ANYCUBIC_TOUCHSCREEN
#ifdef SDSUPPORT
if (card.isPrinting()) { // are we printing from sd?
if (AnycubicTouchscreen.ai3m_pause_state < 2) {
AnycubicTouchscreen.ai3m_pause_state = 2;
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOPGM(" DEBUG: M600 - AI3M Pause State set to: ", AnycubicTouchscreen.ai3m_pause_state);
SERIAL_EOL();
#endif
}
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: Enter M600 TFTstate routine");
#endif
AnycubicTouchscreen.TFTstate = ANYCUBIC_TFT_STATE_SDPAUSE_REQ; // enter correct display state to show resume button
#ifdef ANYCUBIC_TFT_DEBUG
SERIAL_ECHOLNPGM("DEBUG: Set TFTstate to SDPAUSE_REQ");
#endif
}
#endif
#endif
// PATCH END: Knutwurst
#if ENABLED(MIXING_EXTRUDER) #if ENABLED(MIXING_EXTRUDER)
const int8_t eindex = get_target_e_stepper_from_command(); const int8_t eindex = get_target_e_stepper_from_command();
if (eindex < 0) return; if (eindex < 0) return;

View File

@@ -38,10 +38,6 @@
#include "../../MarlinCore.h" // for startOrResumeJob, etc. #include "../../MarlinCore.h" // for startOrResumeJob, etc.
#ifdef ANYCUBIC_TOUCHSCREEN
#include "../../lcd/extui/knutwurst/anycubic_touchscreen.h"
#endif
#if ENABLED(PRINTJOB_TIMER_AUTOSTART) #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
#include "../../module/printcounter.h" #include "../../module/printcounter.h"
#if ENABLED(CANCEL_OBJECTS) #if ENABLED(CANCEL_OBJECTS)
@@ -133,10 +129,6 @@ void GcodeSuite::M104_M109(const bool isM109) {
thermalManager.set_heating_message(target_extruder, !isM109 && got_temp); thermalManager.set_heating_message(target_extruder, !isM109 && got_temp);
} }
#ifdef ANYCUBIC_TOUCHSCREEN
AnycubicTouchscreen.HeatingStart();
#endif
TERN_(AUTOTEMP, planner.autotemp_M104_M109()); TERN_(AUTOTEMP, planner.autotemp_M104_M109());
if (isM109 && got_temp) if (isM109 && got_temp)
@@ -144,11 +136,6 @@ void GcodeSuite::M104_M109(const bool isM109) {
// flush the serial buffer after heating to prevent lockup by m105 // flush the serial buffer after heating to prevent lockup by m105
SERIAL_FLUSH(); SERIAL_FLUSH();
#ifdef ANYCUBIC_TOUCHSCREEN
AnycubicTouchscreen.CommandScan();
AnycubicTouchscreen.BedHeatingDone();
#endif
} }
#endif // EXTRUDERS #endif // EXTRUDERS

View File

@@ -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-b3" #define CUSTOM_BUILD_VERSION "1.5.0-b5"
#ifndef STRING_DISTRIBUTION_DATE #ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2023-01-03" #define STRING_DISTRIBUTION_DATE "2023-05-24"
#endif #endif
/** /**

File diff suppressed because it is too large Load Diff

View File

@@ -28,10 +28,6 @@
#include "../../../inc/MarlinConfigPre.h" #include "../../../inc/MarlinConfigPre.h"
#include "../../../module/probe.h" #include "../../../module/probe.h"
enum axis_t : uint8_t { X, Y, Z, X2, Y2, Z2, Z3, Z4 };
enum extruder_t : uint8_t { E0, E1, E2, E3, E4, E5, E6, E7 };
void setAxisPosition_mm(const float, const axis_t, const feedRate_t=0);
void initializeGrid(); void initializeGrid();
char *itostr2(const uint8_t &x); char *itostr2(const uint8_t &x);
@@ -47,9 +43,9 @@ char *itostr2(const uint8_t &x);
#define MAX_PRINTABLE_FILENAME_LEN 26 #define MAX_PRINTABLE_FILENAME_LEN 26
#if ENABLED(KNUTWURST_CHIRON) #if ENABLED(KNUTWURST_CHIRON)
#define FILAMENT_RUNOUT_PIN 33 #define FIL_RUNOUT_PIN 33
#else #else
#define FILAMENT_RUNOUT_PIN 19 #define FIL_RUNOUT_PIN 19
#endif #endif
#define ANYCUBIC_TFT_STATE_IDLE 0 #define ANYCUBIC_TFT_STATE_IDLE 0
@@ -60,6 +56,26 @@ char *itostr2(const uint8_t &x);
#define ANYCUBIC_TFT_STATE_SDSTOP_REQ 5 #define ANYCUBIC_TFT_STATE_SDSTOP_REQ 5
#define ANYCUBIC_TFT_STATE_SDOUTAGE 99 #define ANYCUBIC_TFT_STATE_SDOUTAGE 99
enum AnycubicMediaPrintState {
AMPRINTSTATE_NOT_PRINTING,
AMPRINTSTATE_PRINTING,
AMPRINTSTATE_PAUSE_REQUESTED,
AMPRINTSTATE_PAUSED,
AMPRINTSTATE_STOP_REQUESTED
};
enum AnycubicMediaPauseState {
AMPAUSESTATE_NOT_PAUSED,
AMPAUSESTATE_PARKING,
AMPAUSESTATE_PARKED,
AMPAUSESTATE_FILAMENT_OUT,
AMPAUSESTATE_FILAMENT_PURGING,
AMPAUSESTATE_HEATER_TIMEOUT,
AMPAUSESTATE_REHEATING,
AMPAUSESTATE_REHEAT_FINISHED,
AMPAUSESTATE_PAUSED
};
#if DISABLED(KNUTWURST_DGUS2_TFT) #if DISABLED(KNUTWURST_DGUS2_TFT)
#define SM_DIR_UP_L "/.." #define SM_DIR_UP_L "/.."
#define SM_DIR_UP_S ".." #define SM_DIR_UP_S ".."
@@ -245,37 +261,24 @@ char *itostr2(const uint8_t &x);
class AnycubicTouchscreenClass { class AnycubicTouchscreenClass {
public: public:
AnycubicTouchscreenClass(); AnycubicTouchscreenClass();
void Setup(); void Setup();
void CommandScan(); void CommandScan();
void BedHeatingStart();
void BedHeatingDone();
void HeatingDone();
void HeatingStart();
void FilamentRunout(); void FilamentRunout();
void DoFilamentRunoutCheck();
void UserConfirmRequired(const char *); void UserConfirmRequired(const char *);
void SDCardStateChange(bool); void SDCardStateChange(bool);
void SDCardError(); void SDCardError();
void KillTFT(); void KillTFT();
static void OnPrintTimerStarted();
static void OnPrintTimerPaused();
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
char TFTstate = ANYCUBIC_TFT_STATE_IDLE;
/**
* Anycubic TFT pause states:
*
* 0 - printing / stopped
* 1 - regular pause
* 2 - M600 pause
* 3 - filament runout pause
* 4 - nozzle timeout on regular pause // OBSOLETE
* 5 - nozzle timeout on M600 // OBSOLETE
* 6 - nozzle timeout on filament runout // OBSOLETE
*/
uint8_t ai3m_pause_state = 0;
private: private:
char TFTcmdbuffer[TFTBUFSIZE][TFT_MAX_CMD_SIZE]; char TFTcmdbuffer[TFTBUFSIZE][TFT_MAX_CMD_SIZE];
@@ -297,6 +300,9 @@ int currentFlowRate = 0;
bool PrintdoneAndPowerOFF = true; bool PrintdoneAndPowerOFF = true;
bool powerOFFflag = 0; bool powerOFFflag = 0;
static AnycubicMediaPrintState mediaPrintingState;
static AnycubicMediaPauseState mediaPauseState;
#if defined(POWER_OUTAGE_TEST) #if defined(POWER_OUTAGE_TEST)
struct OutageDataStruct { struct OutageDataStruct {
char OutageDataVersion; char OutageDataVersion;
@@ -322,12 +328,12 @@ void CheckSDCardChange();
void CheckHeaterError(); void CheckHeaterError();
void HandleSpecialMenu(); void HandleSpecialMenu();
void FilamentChangePause(); void FilamentChangePause();
void FilamentChangeResume(); void ResumePrint();
void ReheatNozzle(); void ReheatNozzle();
void ParkAfterStop(); void ParkAfterStop();
char currentTouchscreenSelection[64]; char currentTouchscreenSelection[30];
char currentFileOrDirectory[64]; char currentFileOrDirectory[30];
String flowRateBuffer; String flowRateBuffer;
String zOffsetBuffer; String zOffsetBuffer;
uint16_t MyFileNrCnt = 0; uint16_t MyFileNrCnt = 0;
@@ -340,13 +346,6 @@ uint8_t BLTouchMenu = false;
uint8_t LevelMenu = false; uint8_t LevelMenu = false;
uint8_t CaseLight = true; uint8_t CaseLight = true;
#if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
char FilamentTestStatus = false;
char FilamentTestLastStatus = false;
bool FilamentSetMillis = true;
int FilamentRunoutCounter = 0;
#endif
#if ENABLED(KNUTWURST_MEGA_P_LASER) #if ENABLED(KNUTWURST_MEGA_P_LASER)
typedef struct { typedef struct {
unsigned char bfType[2]; unsigned char bfType[2];

View File

@@ -43,9 +43,9 @@ namespace ExtUI {
void onPlayTone(const uint16_t frequency, const uint16_t duration) { void onPlayTone(const uint16_t frequency, const uint16_t duration) {
TERN_(SPEAKER, ::tone(BEEPER_PIN, frequency, duration)); TERN_(SPEAKER, ::tone(BEEPER_PIN, frequency, duration));
} }
void onPrintTimerStarted() { } void onPrintTimerStarted() { AnycubicTouchscreen.OnPrintTimerStarted(); }
void onPrintTimerPaused() { } void onPrintTimerPaused() { AnycubicTouchscreen.OnPrintTimerPaused(); }
void onPrintTimerStopped() { } void onPrintTimerStopped() { AnycubicTouchscreen.OnPrintTimerStopped(); }
void onFilamentRunout(const extruder_t extruder) { AnycubicTouchscreen.FilamentRunout(); } void onFilamentRunout(const extruder_t extruder) { AnycubicTouchscreen.FilamentRunout(); }
void onUserConfirmRequired(const char * const msg) { AnycubicTouchscreen.UserConfirmRequired(msg); } void onUserConfirmRequired(const char * const msg) { AnycubicTouchscreen.UserConfirmRequired(msg); }
void onStatusChanged(const char * const msg) {} void onStatusChanged(const char * const msg) {}

View File

@@ -164,7 +164,7 @@
#elif MB(TRIGORILLA_13) #elif MB(TRIGORILLA_13)
#include "ramps/pins_TRIGORILLA_13.h" // ATmega2560 env:mega2560 #include "ramps/pins_TRIGORILLA_13.h" // ATmega2560 env:mega2560
#elif MB(TRIGORILLA_14, TRIGORILLA_14_11) #elif MB(TRIGORILLA_14, TRIGORILLA_14_11)
#include "ramps/pins_TRIGORILLA_14.h" // ATmega2560 env:mega2560 env:MEGA_1G env:MEGA_1G_TMC env:MEGA_1G_BLT_10 env:MEGA_1G_BLT_11 env:MEGA_1G_TMC_BLT_10 env:MEGA_1G_TMC_BLT_11 env:MEGA env:MEGA_TMC env:MEGA_BLT_10 env:MEGA_BLT_11 env:MEGA_TMC_BLT_10 env:MEGA_TMC_BLT_11 env:MEGA_S env:MEGA_S_TMC env:MEGA_S_BLT_10 env:MEGA_S_BLT_11 env:MEGA_S_TMC_BLT_10 env:MEGA_S_TMC_BLT_11 env:MEGA_S_DGUS env:MEGA_S_DGUS_TMC env:MEGA_S_DGUS_BLT_10 env:MEGA_S_DGUS_BLT_11 env:MEGA_S_DGUS_TMC_BLT_10 env:MEGA_S_DGUS_TMC_BLT_11 env:MEGA_X env:MEGA_X_TMC env:MEGA_X_BLT_10 env:MEGA_X_BLT_11 env:MEGA_X_TMC_BLT_10 env:MEGA_X_TMC_BLT_11 env:MEGA_X_DGUS env:MEGA_X_DGUS_TMC env:MEGA_X_DGUS_BLT_10 env:MEGA_X_DGUS_BLT_11 env:MEGA_X_DGUS_TMC_BLT_10 env:MEGA_X_DGUS_TMC_BLT_11 env:MEGA_P_DGUS env:MEGA_P_DGUS_TMC env:MEGA_P_DGUS_BLT_10 env:MEGA_P_DGUS_BLT_11 env:MEGA_P_DGUS_TMC_BLT_10 env:MEGA_P_DGUS_TMC_BLT_11 env:4MAXP2 env:4MAXP2_TMC env:4MAXP2_BLT_10 env:4MAXP2_BLT_11 env:4MAXP2_TMC_BLT_10 env:4MAXP2_TMC_BLT_11 env:4MAXP2_DGUS env:4MAXP2_DGUS_TMC env:4MAXP2_DGUS_BLT_10 env:4MAXP2_DGUS_BLT_11 env:4MAXP2_DGUS_TMC_BLT_10 env:4MAXP2_DGUS_TMC_BLT_11 #include "ramps/pins_TRIGORILLA_14.h" // ATmega2560 env:mega2560 env:MEGA_1G env:MEGA_1G_TMC env:MEGA_1G_BLT_10 env:MEGA_1G_BLT_11 env:MEGA_1G_TMC_BLT_10 env:MEGA_1G_TMC_BLT_11 env:MEGA env:MEGA_TMC env:MEGA_TMC_KLICKY env:MEGA_BLT_10 env:MEGA_BLT_11 env:MEGA_TMC_BLT_10 env:MEGA_TMC_BLT_11 env:MEGA_S env:MEGA_S_TMC env:MEGA_S_TMC_KLICKY env:MEGA_S_BLT_10 env:MEGA_S_BLT_11 env:MEGA_S_TMC_BLT_10 env:MEGA_S_TMC_BLT_11 env:MEGA_S_DGUS env:MEGA_S_DGUS_TMC env:MEGA_S_DGUS_BLT_10 env:MEGA_S_DGUS_BLT_11 env:MEGA_S_DGUS_TMC_BLT_10 env:MEGA_S_DGUS_TMC_BLT_11 env:MEGA_X env:MEGA_X_TMC env:MEGA_X_BLT_10 env:MEGA_X_BLT_11 env:MEGA_X_TMC_BLT_10 env:MEGA_X_TMC_BLT_11 env:MEGA_X_DGUS env:MEGA_X_DGUS_TMC env:MEGA_X_DGUS_BLT_10 env:MEGA_X_DGUS_BLT_11 env:MEGA_X_DGUS_TMC_BLT_10 env:MEGA_X_DGUS_TMC_BLT_11 env:MEGA_P_DGUS env:MEGA_P_DGUS_TMC env:MEGA_P_DGUS_BLT_10 env:MEGA_P_DGUS_BLT_11 env:MEGA_P_DGUS_TMC_BLT_10 env:MEGA_P_DGUS_TMC_BLT_11 env:4MAXP2 env:4MAXP2_TMC env:4MAXP2_BLT_10 env:4MAXP2_BLT_11 env:4MAXP2_TMC_BLT_10 env:4MAXP2_TMC_BLT_11 env:4MAXP2_DGUS env:4MAXP2_DGUS_TMC env:4MAXP2_DGUS_BLT_10 env:4MAXP2_DGUS_BLT_11 env:4MAXP2_DGUS_TMC_BLT_10 env:4MAXP2_DGUS_TMC_BLT_11
#elif MB(RAMPS_ENDER_4) #elif MB(RAMPS_ENDER_4)
#include "ramps/pins_RAMPS_ENDER_4.h" // ATmega2560 env:mega2560 #include "ramps/pins_RAMPS_ENDER_4.h" // ATmega2560 env:mega2560
#elif MB(RAMPS_CREALITY) #elif MB(RAMPS_CREALITY)

View File

@@ -288,7 +288,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 19
#endif #endif
#ifndef PS_ON_PIN #ifndef PS_ON_PIN

View File

@@ -79,6 +79,15 @@ build_src_filter = ${common.default_src_filter} +<src/HAL/AVR>
build_flags = ${common.build_flags} -DMOTHERBOARD=BOARD_TRIGORILLA_14 -DKNUTWURST_MEGA -DKNUTWURST_TMC build_flags = ${common.build_flags} -DMOTHERBOARD=BOARD_TRIGORILLA_14 -DKNUTWURST_MEGA -DKNUTWURST_TMC
build_unflags = -DKNUTWURST_MEGA_S -DKNUTWURST_MEGA_X -DKNUTWURST_MEGA_P -DKNUTWURST_DGUS2_TFT -DKNUTWURST_BLTOUCH -DKNUTWURST_ONE_Z_ENDSTOP -DKNUTWURST_CHIRON -DKNUTWURST_4MAXP2 build_unflags = -DKNUTWURST_MEGA_S -DKNUTWURST_MEGA_X -DKNUTWURST_MEGA_P -DKNUTWURST_DGUS2_TFT -DKNUTWURST_BLTOUCH -DKNUTWURST_ONE_Z_ENDSTOP -DKNUTWURST_CHIRON -DKNUTWURST_4MAXP2
[env:MEGA_TMC_KLICKY]
platform = atmelavr
board = megaatmega2560
board_build.f_cpu = 16000000L
lib_deps = ${common.lib_deps}
build_src_filter = ${common.default_src_filter} +<src/HAL/AVR>
build_flags = ${common.build_flags} -DMOTHERBOARD=BOARD_TRIGORILLA_14 -DKNUTWURST_MEGA -DKNUTWURST_TMC -DKNUTWURST_KLICKY
build_unflags = -DKNUTWURST_MEGA_S -DKNUTWURST_MEGA_X -DKNUTWURST_MEGA_P -DKNUTWURST_DGUS2_TFT -DKNUTWURST_BLTOUCH -DKNUTWURST_ONE_Z_ENDSTOP -DKNUTWURST_CHIRON -DKNUTWURST_4MAXP2
[env:MEGA_BLT_10] [env:MEGA_BLT_10]
platform = atmelavr platform = atmelavr
board = megaatmega2560 board = megaatmega2560
@@ -138,6 +147,15 @@ build_src_filter = ${common.default_src_filter} +<src/HAL/AVR>
build_flags = ${common.build_flags} -DMOTHERBOARD=BOARD_TRIGORILLA_14 -DKNUTWURST_MEGA_S -DKNUTWURST_TMC build_flags = ${common.build_flags} -DMOTHERBOARD=BOARD_TRIGORILLA_14 -DKNUTWURST_MEGA_S -DKNUTWURST_TMC
build_unflags = -DKNUTWURST_MEGA -DKNUTWURST_MEGA_X -DKNUTWURST_MEGA_P -DKNUTWURST_DGUS2_TFT -DKNUTWURST_BLTOUCH -DKNUTWURST_ONE_Z_ENDSTOP -DKNUTWURST_CHIRON -DKNUTWURST_4MAXP2 build_unflags = -DKNUTWURST_MEGA -DKNUTWURST_MEGA_X -DKNUTWURST_MEGA_P -DKNUTWURST_DGUS2_TFT -DKNUTWURST_BLTOUCH -DKNUTWURST_ONE_Z_ENDSTOP -DKNUTWURST_CHIRON -DKNUTWURST_4MAXP2
[env:MEGA_S_TMC_KLICKY]
platform = atmelavr
board = megaatmega2560
board_build.f_cpu = 16000000L
lib_deps = ${common.lib_deps}
build_src_filter = ${common.default_src_filter} +<src/HAL/AVR>
build_flags = ${common.build_flags} -DMOTHERBOARD=BOARD_TRIGORILLA_14 -DKNUTWURST_MEGA_S -DKNUTWURST_TMC -DKNUTWURST_KLICKY
build_unflags = -DKNUTWURST_MEGA -DKNUTWURST_MEGA_X -DKNUTWURST_MEGA_P -DKNUTWURST_DGUS2_TFT -DKNUTWURST_BLTOUCH -DKNUTWURST_ONE_Z_ENDSTOP -DKNUTWURST_CHIRON -DKNUTWURST_4MAXP2
[env:MEGA_S_BLT_10] [env:MEGA_S_BLT_10]
platform = atmelavr platform = atmelavr
board = megaatmega2560 board = megaatmega2560

View File

@@ -27,12 +27,14 @@ default_envs =
MEGA_1G_TMC_BLT_11 MEGA_1G_TMC_BLT_11
MEGA MEGA
MEGA_TMC MEGA_TMC
MEGA_TMC_KLICKY
MEGA_BLT_10 MEGA_BLT_10
MEGA_BLT_11 MEGA_BLT_11
MEGA_TMC_BLT_10 MEGA_TMC_BLT_10
MEGA_TMC_BLT_11 MEGA_TMC_BLT_11
MEGA_S MEGA_S
MEGA_S_TMC MEGA_S_TMC
MEGA_S_TMC_KLICKY
MEGA_S_BLT_10 MEGA_S_BLT_10
MEGA_S_BLT_11 MEGA_S_BLT_11
MEGA_S_TMC_BLT_10 MEGA_S_TMC_BLT_10