From 899e0fcdbba975ce339320094fa6a2cb70a7a983 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 31 Oct 2019 00:00:07 -0500 Subject: [PATCH 1/6] [cron] Bump distribution date --- Marlin/src/inc/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 9cc5f2ab62a1..9996c9962ccb 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2019-10-29" + #define STRING_DISTRIBUTION_DATE "2019-10-31" #endif /** From e3ddf6e81ae8c62632a73e14d3b2d36c98b08a3a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 31 Oct 2019 13:13:51 -0500 Subject: [PATCH 2/6] Fix meshCount signed-ness --- Marlin/src/gcode/bedlevel/abl/G29.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index a662eab07aac..c3e52fe3f9e6 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -225,7 +225,7 @@ G29_TYPE GcodeSuite::G29() { #if ABL_GRID #if ENABLED(PROBE_MANUALLY) - ABL_VAR xy_int8_t meshCount; + ABL_VAR xy_uint8_t meshCount; #endif ABL_VAR xy_int_t probe_position_lf, probe_position_rb; @@ -678,7 +678,7 @@ G29_TYPE GcodeSuite::G29() { measured_z = 0; - xy_int8_t meshCount; + xy_uint8_t meshCount; // Outer loop is X with PROBE_Y_FIRST enabled // Outer loop is Y with PROBE_Y_FIRST disabled @@ -746,7 +746,7 @@ G29_TYPE GcodeSuite::G29() { z_values[meshCount.x][meshCount.y] = measured_z + zoffset; #if ENABLED(EXTENSIBLE_UI) - ExtUI::onMeshUpdate(meshCount.x, meshCount.y, z_values[meshCount.x][meshCount.y]); + ExtUI::onMeshUpdate(meshCount, z_values[meshCount.x][meshCount.y]); #endif #endif From 4e6e02bc3edc9d559b821f7cf38a7a7300b8af02 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 31 Oct 2019 13:18:03 -0500 Subject: [PATCH 3/6] Include pause.h for M701-702 --- Marlin/src/gcode/feature/pause/M701_M702.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Marlin/src/gcode/feature/pause/M701_M702.cpp b/Marlin/src/gcode/feature/pause/M701_M702.cpp index b4bab7e86a26..ffc04915dae7 100644 --- a/Marlin/src/gcode/feature/pause/M701_M702.cpp +++ b/Marlin/src/gcode/feature/pause/M701_M702.cpp @@ -28,6 +28,7 @@ #include "../../../Marlin.h" #include "../../../module/motion.h" #include "../../../module/temperature.h" +#include "../../../feature/pause.h" #if EXTRUDERS > 1 #include "../../../module/tool_change.h" From c6f694a247783443e2b6ee57e635202bf2e301b3 Mon Sep 17 00:00:00 2001 From: The-Force Date: Thu, 31 Oct 2019 20:09:37 +0100 Subject: [PATCH 4/6] Power Loss Recovery for volumetric extrusion (#15734) --- Marlin/src/feature/power_loss_recovery.cpp | 30 ++++++++++++++++++++++ Marlin/src/feature/power_loss_recovery.h | 9 +++++++ 2 files changed, 39 insertions(+) diff --git a/Marlin/src/feature/power_loss_recovery.cpp b/Marlin/src/feature/power_loss_recovery.cpp index c438dffa361e..1cea125dfe46 100644 --- a/Marlin/src/feature/power_loss_recovery.cpp +++ b/Marlin/src/feature/power_loss_recovery.cpp @@ -183,6 +183,15 @@ void PrintJobRecovery::save(const bool force/*=false*/, const bool save_queue/*= info.active_extruder = active_extruder; #endif + #if DISABLED(NO_VOLUMETRICS) + info.volumetric_enabled = parser.volumetric_enabled; + #if EXTRUDERS > 1 + for (int8_t e = 0; e < EXTRUDERS; e++) info.filament_size[e] = planner.filament_size[e]; + #else + if (parser.volumetric_enabled) info.filament_size = planner.filament_size[active_extruder]; + #endif + #endif + #if EXTRUDERS HOTEND_LOOP() info.target_temperature[e] = thermalManager.temp_hotend[e].target; #endif @@ -291,6 +300,27 @@ void PrintJobRecovery::resume() { gcode.process_subcommands_now(cmd); #endif + // Recover volumetric extrusion state + #if DISABLED(NO_VOLUMETRICS) + #if EXTRUDERS > 1 + for (int8_t e = 0; e < EXTRUDERS; e++) { + dtostrf(info.filament_size[e], 1, 3, str_1); + sprintf_P(cmd, PSTR("M200 T%i D%s"), e, str_1); + gcode.process_subcommands_now(cmd); + } + if (!info.volumetric_enabled) { + sprintf_P(cmd, PSTR("M200 T%i D0"), info.active_extruder); + gcode.process_subcommands_now(cmd); + } + #else + if (info.volumetric_enabled) { + dtostrf(info.filament_size, 1, 3, str_1); + sprintf_P(cmd, PSTR("M200 D%s"), str_1); + gcode.process_subcommands_now(cmd); + } + #endif + #endif + #if HAS_HEATED_BED const int16_t bt = info.target_temperature_bed; if (bt) { diff --git a/Marlin/src/feature/power_loss_recovery.h b/Marlin/src/feature/power_loss_recovery.h index 9f947701e30e..20248a2e44b9 100644 --- a/Marlin/src/feature/power_loss_recovery.h +++ b/Marlin/src/feature/power_loss_recovery.h @@ -59,6 +59,15 @@ typedef struct { uint8_t active_extruder; #endif + #if DISABLED(NO_VOLUMETRICS) + bool volumetric_enabled; + #if EXTRUDERS > 1 + float filament_size[EXTRUDERS]; + #else + float filament_size; + #endif + #endif + #if HOTENDS int16_t target_temperature[HOTENDS]; #endif From 7c60853219da0b5305c1d8856873868a1db6c5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20L=C3=A1zaro=20S=C3=A1nchez?= Date: Thu, 31 Oct 2019 23:14:11 +0100 Subject: [PATCH 5/6] Fix blocking delay in Photo G-code M240 (#15728) --- Marlin/src/gcode/feature/camera/M240.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/feature/camera/M240.cpp b/Marlin/src/gcode/feature/camera/M240.cpp index 6fb68d454e65..53d18d64a3cd 100644 --- a/Marlin/src/gcode/feature/camera/M240.cpp +++ b/Marlin/src/gcode/feature/camera/M240.cpp @@ -148,7 +148,7 @@ void GcodeSuite::M240() { #if PIN_EXISTS(CHDK) OUT_WRITE(CHDK_PIN, HIGH); - chdk_timeout = millis() + PHOTO_SWITCH_MS; + chdk_timeout = millis() + parser.intval('D', PHOTO_SWITCH_MS); #elif HAS_PHOTOGRAPH @@ -160,7 +160,8 @@ void GcodeSuite::M240() { #ifdef PHOTO_POSITION #if PHOTO_DELAY_MS > 0 - safe_delay(parser.intval('P', PHOTO_DELAY_MS)); + const millis_t timeout = millis() + parser.intval('P', PHOTO_DELAY_MS); + while (PENDING(millis(), timeout)) idle(); #endif do_blocking_move_to(old_pos, fr_mm_s); #ifdef PHOTO_RETRACT_MM From e7d9db284e55d56f2b9deab54df0ee781be62199 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 31 Oct 2019 17:27:19 -0500 Subject: [PATCH 6/6] Followup to M240 patch --- Marlin/src/gcode/feature/camera/M240.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Marlin/src/gcode/feature/camera/M240.cpp b/Marlin/src/gcode/feature/camera/M240.cpp index 53d18d64a3cd..50b47f397808 100644 --- a/Marlin/src/gcode/feature/camera/M240.cpp +++ b/Marlin/src/gcode/feature/camera/M240.cpp @@ -31,6 +31,10 @@ millis_t chdk_timeout; // = 0 #endif +#ifdef PHOTO_POSITION && PHOTO_DELAY_MS > 0 + #include "../../../Marlin.h" // for idle() +#endif + #ifdef PHOTO_RETRACT_MM #define _PHOTO_RETRACT_MM (PHOTO_RETRACT_MM + 0)