Merge branch 'master' into 12864-full
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -58,6 +58,7 @@ public:
|
||||
char TFTstate=ANYCUBIC_TFT_STATE_IDLE;
|
||||
bool PausedByRunout=false;
|
||||
bool PausedByFilamentChange=false;
|
||||
bool PausedByNozzleTimeout=false;
|
||||
|
||||
private:
|
||||
char TFTcmdbuffer[TFTBUFSIZE][TFT_MAX_CMD_SIZE];
|
||||
@@ -74,6 +75,7 @@ private:
|
||||
uint8_t tmp_extruder=0;
|
||||
char LastSDstatus=0;
|
||||
uint16_t HeaterCheckCount=0;
|
||||
bool IsParked = false;
|
||||
|
||||
struct OutageDataStruct {
|
||||
char OutageDataVersion;
|
||||
@@ -100,6 +102,8 @@ private:
|
||||
void HandleSpecialMenu();
|
||||
void FilamentChangePause();
|
||||
void FilamentChangeResume();
|
||||
void ReheatNozzle();
|
||||
void ParkAfterStop();
|
||||
|
||||
char SelectedDirectory[30];
|
||||
uint8_t SpecialMenu=false;
|
||||
@@ -107,7 +111,8 @@ private:
|
||||
#if ENABLED(ANYCUBIC_FILAMENT_RUNOUT_SENSOR)
|
||||
char FilamentTestStatus=false;
|
||||
char FilamentTestLastStatus=false;
|
||||
long FilamentRunoutCounter=0;
|
||||
bool FilamentSetMillis=true;
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@@ -1009,7 +1009,7 @@
|
||||
#define FILAMENT_UNLOAD_DELAY 5000 // (ms) Delay for the filament to cool after retract.
|
||||
#define FILAMENT_UNLOAD_PURGE_LENGTH 8 // (mm) An unretract is done, then this length is purged.
|
||||
|
||||
#define PAUSE_PARK_NOZZLE_TIMEOUT 300 // (seconds) Time limit before the nozzle is turned off for safety.
|
||||
#define PAUSE_PARK_NOZZLE_TIMEOUT 600 // (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 PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change.
|
||||
|
||||
|
@@ -271,6 +271,9 @@ FORCE_INLINE bool all_axes_known() { return (axis_known_position & xyz_bits) ==
|
||||
|
||||
extern volatile bool wait_for_heatup;
|
||||
|
||||
// Making sure this flag can be cleared by the Anycubic display
|
||||
extern volatile bool nozzle_timed_out;
|
||||
|
||||
#if HAS_RESUME_CONTINUE
|
||||
extern volatile bool wait_for_user;
|
||||
#endif
|
||||
|
@@ -228,6 +228,7 @@
|
||||
* M867 - Enable/disable or toggle error correction for position encoder modules.
|
||||
* M868 - Report or set position encoder module error correction threshold.
|
||||
* M869 - Report position encoder module error.
|
||||
* M888 - Ultrabase cooldown: Let the parts cooling fan hover above the finished print to cool down the bed. EXPERIMENTAL FEATURE!
|
||||
* M900 - Get or Set Linear Advance K-factor. (Requires LIN_ADVANCE)
|
||||
* M906 - Set or get motor current in milliamps using axis codes X, Y, Z, E. Report values if no axis codes given. (Requires at least one _DRIVER_TYPE defined as TMC2130/TMC2208/TMC2660)
|
||||
* M907 - Set digital trimpot motor current using axis codes. (Requires a board with digital trimpots)
|
||||
@@ -519,6 +520,9 @@ static bool relative_mode; // = false;
|
||||
// For M109 and M190, this flag may be cleared (by M108) to exit the wait loop
|
||||
volatile bool wait_for_heatup = true;
|
||||
|
||||
// Making sure this flag can be cleared by the Anycubic display
|
||||
volatile bool nozzle_timed_out = false;
|
||||
|
||||
// For M0/M1, this flag may be cleared (by M108) to exit the wait-for-user loop
|
||||
#if HAS_RESUME_CONTINUE
|
||||
volatile bool wait_for_user; // = false;
|
||||
@@ -7213,7 +7217,11 @@ inline void gcode_M17() {
|
||||
* Used by M125 and M600
|
||||
*/
|
||||
static void wait_for_filament_reload(const int8_t max_beep_count=0) {
|
||||
bool nozzle_timed_out = false;
|
||||
nozzle_timed_out = false;
|
||||
nozzle_timed_out = false;
|
||||
#ifdef ANYCUBIC_TFT_MODEL
|
||||
AnycubicTFT.PausedByNozzleTimeout = false;
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTIPANEL)
|
||||
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT);
|
||||
@@ -7246,6 +7254,14 @@ inline void gcode_M17() {
|
||||
nozzle_timed_out |= thermalManager.is_heater_idle(e);
|
||||
|
||||
if (nozzle_timed_out) {
|
||||
|
||||
#ifdef ANYCUBIC_TFT_MODEL
|
||||
AnycubicTFT.PausedByNozzleTimeout=true;
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
SERIAL_ECHOLNPGM("DEBUG: Nozzle timeout flag set");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(ULTIPANEL)
|
||||
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE);
|
||||
#endif
|
||||
@@ -7287,6 +7303,9 @@ inline void gcode_M17() {
|
||||
|
||||
wait_for_user = true; // Wait for user to load filament
|
||||
nozzle_timed_out = false;
|
||||
#ifdef ANYCUBIC_TFT_DEBUG
|
||||
AnycubicTFT.PausedByNozzleTimeout = false;
|
||||
#endif
|
||||
|
||||
#if HAS_BUZZER
|
||||
filament_change_beep(max_beep_count, true);
|
||||
@@ -7320,7 +7339,11 @@ inline void gcode_M17() {
|
||||
if (!did_pause_print) return;
|
||||
|
||||
// Re-enable the heaters if they timed out
|
||||
bool nozzle_timed_out = false;
|
||||
nozzle_timed_out = false;
|
||||
#ifdef ANYCUBIC_TFT_MODEL
|
||||
AnycubicTFT.PausedByNozzleTimeout = false;
|
||||
#endif
|
||||
|
||||
HOTEND_LOOP() {
|
||||
nozzle_timed_out |= thermalManager.is_heater_idle(e);
|
||||
thermalManager.reset_heater_idle_timer(e);
|
||||
@@ -11381,6 +11404,56 @@ inline void gcode_M502() {
|
||||
}
|
||||
#endif // MAX7219_GCODE
|
||||
|
||||
/**
|
||||
* M888: Cooldown routine for the Anycubic Ultrabase (EXPERIMENTAL):
|
||||
* This is meant to be placed at the end Gcode of your slicer.
|
||||
* It hovers over the print bed and does circular movements while
|
||||
* running the fan. Works best with custom fan ducts.
|
||||
*
|
||||
* T<int> Target bed temperature (min 15°C), 30°C if not specified
|
||||
* S<int> Fan speed between 0 and 255, full speed if not specified
|
||||
*/
|
||||
inline void gcode_M888() {
|
||||
// don't do this if the machine is not homed
|
||||
if (axis_unhomed_error()) return;
|
||||
|
||||
const float cooldown_arc[2] = { 50, 50 };
|
||||
const uint8_t cooldown_target = MAX((parser.ushortval('T', 30)), 15);
|
||||
|
||||
// set hotbed temperate to zero
|
||||
thermalManager.setTargetBed(0);
|
||||
SERIAL_PROTOCOLLNPGM("Ultrabase cooldown started");
|
||||
|
||||
// set fan to speed <S>, if undefined blast at full speed
|
||||
uint8_t cooldown_fanspeed = parser.ushortval('S', 255);
|
||||
fanSpeeds[0] = MIN(cooldown_fanspeed, 255U);
|
||||
|
||||
// raise z by 2mm and move to X50, Y50
|
||||
do_blocking_move_to_z(MIN(current_position[Z_AXIS] + 2, Z_MAX_POS), 5);
|
||||
do_blocking_move_to_xy(50, 50, 100);
|
||||
|
||||
while ((thermalManager.degBed() > cooldown_target)) {
|
||||
// queue arc movement
|
||||
gcode_get_destination();
|
||||
plan_arc(destination, cooldown_arc, true);
|
||||
SERIAL_PROTOCOLLNPGM("Target not reached, queued an arc");
|
||||
|
||||
// delay while arc is in progress
|
||||
while (planner.movesplanned()) {
|
||||
idle();
|
||||
}
|
||||
idle();
|
||||
}
|
||||
// the bed should be under <T> now
|
||||
fanSpeeds[0]=0;
|
||||
do_blocking_move_to_xy(MAX(X_MIN_POS, 10), MIN(Y_MAX_POS, 190), 100);
|
||||
BUZZ(100, 659);
|
||||
BUZZ(150, 1318);
|
||||
enqueue_and_echo_commands_P(PSTR("M84"));
|
||||
SERIAL_PROTOCOLLNPGM("M888 cooldown routine done");
|
||||
}
|
||||
|
||||
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
/**
|
||||
* M900: Get or Set Linear Advance K-factor
|
||||
@@ -13116,6 +13189,8 @@ void process_parsed_command() {
|
||||
case 869: gcode_M869(); break; // M869: Report axis error
|
||||
#endif
|
||||
|
||||
case 888: gcode_M888(); break; // M888: Ultrabase cooldown (EXPERIMENTAL)
|
||||
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
case 900: gcode_M900(); break; // M900: Set Linear Advance K factor
|
||||
#endif
|
||||
|
@@ -41,20 +41,20 @@
|
||||
* Defines the version of the Marlin-AI3M build. Not to be confused with
|
||||
* Marlin's own build number, e.g. 1.1.9.
|
||||
*/
|
||||
#define CUSTOM_BUILD_VERSION "v1.4.2"
|
||||
#define CUSTOM_BUILD_VERSION "v1.4.4"
|
||||
|
||||
/**
|
||||
* Verbose version identifier which should contain a reference to the location
|
||||
* from where the binary was downloaded or the source code was compiled.
|
||||
*/
|
||||
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION "(Github, davidramiro)"
|
||||
#define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION " (Github, davidramiro)"
|
||||
|
||||
/**
|
||||
* The STRING_DISTRIBUTION_DATE represents when the binary file was built,
|
||||
* here we define this default string as the date where the latest release
|
||||
* version was tagged.
|
||||
*/
|
||||
#define STRING_DISTRIBUTION_DATE "2019-02-24"
|
||||
#define STRING_DISTRIBUTION_DATE "2019-03-13"
|
||||
|
||||
/**
|
||||
* Required minimum Configuration.h and Configuration_adv.h file versions.
|
||||
|
@@ -137,7 +137,7 @@
|
||||
#define MSG_INVALID_EXTRUDER "Invalid extruder"
|
||||
#define MSG_INVALID_SOLENOID "Invalid solenoid"
|
||||
#define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature"
|
||||
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID " MARLIN-AI3M_VERSION:" CUSTOM_BUILD_VERSION
|
||||
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " MARLIN-AI3M_VERSION:" CUSTOM_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID
|
||||
#define MSG_MARLIN_AI3M "Marlin-AI3M"
|
||||
#define MSG_COUNT_X " Count X:"
|
||||
#define MSG_COUNT_A " Count A:"
|
||||
|
Reference in New Issue
Block a user