Merge upstream changes from Marlin 2.1.2.3

This commit is contained in:
Stefan Kalscheuer
2024-05-29 18:50:07 +02:00
parent 5c1cebc7d4
commit 35b6573a54
20 changed files with 104 additions and 91 deletions

View File

@@ -35,7 +35,7 @@
*
* Advanced settings can be found in Configuration_adv.h
*/
#define CONFIGURATION_H_VERSION 02010202
#define CONFIGURATION_H_VERSION 02010203
#define ANYCUBIC_TOUCHSCREEN
#define KNUTWURST_SPECIAL_MENU
// #define ANYCUBIC_TFT_DEBUG
@@ -802,6 +802,7 @@
#else
#define BANG_MAX 255 // Limit hotend current while in bang-bang mode; 255=full current
#endif
/**
* Model Predictive Control for hotend
*
@@ -1851,8 +1852,6 @@
// Most probes should stay away from the edges of the bed, but
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
// #define PROBING_MARGIN 10
#if ENABLED(KNUTWURST_CHIRON)
#define PROBING_MARGIN 15
#else
@@ -4015,10 +4014,10 @@
#define SERVO_DELAY { 300 }
// Only power servos during movement, otherwise leave off to prevent jitter
// #define DEACTIVATE_SERVOS_AFTER_MOVE
//#define DEACTIVATE_SERVOS_AFTER_MOVE
// Edit servo angles with M281 and save to EEPROM with M500
// #define EDITABLE_SERVO_ANGLES
//#define EDITABLE_SERVO_ANGLES
// Disable servo with M282 to reduce power consumption, noise, and heat when not in use
// #define SERVO_DETACH_GCODE
//#define SERVO_DETACH_GCODE

View File

@@ -30,7 +30,7 @@
*
* Basic settings can be found in Configuration.h
*/
#define CONFIGURATION_ADV_H_VERSION 02010202
#define CONFIGURATION_ADV_H_VERSION 02010203
// @section develop
@@ -1191,11 +1191,11 @@
* XY Frequency limit
* Reduce resonance by limiting the frequency of small zigzag infill moves.
* See https://hydraraptor.blogspot.com/2010/12/frequency-limit.html
* Use M201 F<freq> G<min%> to change limits at runtime.
* Use M201 F<freq> S<min%> to change limits at runtime.
*/
//#define XY_FREQUENCY_LIMIT 10 // (Hz) Maximum frequency of small zigzag infill moves. Set with M201 F<hertz>.
#ifdef XY_FREQUENCY_LIMIT
#define XY_FREQUENCY_MIN_PERCENT 5 // (%) Minimum FR percentage to apply. Set with M201 G<min%>.
#define XY_FREQUENCY_MIN_PERCENT 5 // (%) Minimum FR percentage to apply. Set with M201 S<min%>.
#endif
// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
@@ -4195,7 +4195,7 @@
* Extras for an ESP32-based motherboard with WIFISUPPORT
* These options don't apply to add-on WiFi modules based on ESP32 WiFi101.
*/
#if ENABLED(WIFISUPPORT)
#if ANY(WIFISUPPORT, ESP3D_WIFISUPPORT)
//#define WEBSUPPORT // Start a webserver (which may include auto-discovery) using SPIFFS
//#define OTASUPPORT // Support over-the-air firmware updates
//#define WIFI_CUSTOM_COMMAND // Accept feature config commands (e.g., WiFi ESP3D) from the host

View File

@@ -28,7 +28,7 @@
/**
* Marlin release version identifier
*/
//#define SHORT_BUILD_VERSION "2.1.2.2"
//#define SHORT_BUILD_VERSION "2.1.2.3"
/**
* Verbose version identifier which should contain a reference to the location
@@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2024-02-08"
//#define STRING_DISTRIBUTION_DATE "2024-05-29"
/**
* Defines a generic printer name to be output to the LCD after booting Marlin.

View File

@@ -679,7 +679,7 @@
#define DEFER4(M) M EMPTY EMPTY EMPTY EMPTY()()()()
// Force define expansion
#define EVAL EVAL16
#define EVAL(V...) EVAL16(V)
#define EVAL4096(V...) EVAL2048(EVAL2048(V))
#define EVAL2048(V...) EVAL1024(EVAL1024(V))
#define EVAL1024(V...) EVAL512(EVAL512(V))

View File

@@ -451,7 +451,7 @@ struct XYval {
// Length reduced to one dimension
FI constexpr T magnitude() const { return (T)sqrtf(x*x + y*y); }
// Pointer to the data as a simple array
FI operator T* () { return pos; }
explicit FI operator T* () { return pos; }
// If any element is true then it's true
FI constexpr operator bool() const { return x || y; }
// Smallest element
@@ -601,7 +601,7 @@ struct XYZval {
// Length reduced to one dimension
FI constexpr T magnitude() const { return (T)TERN(HAS_X_AXIS, sqrtf(NUM_AXIS_GANG(x*x, + y*y, + z*z, + i*i, + j*j, + k*k, + u*u, + v*v, + w*w)), 0); }
// Pointer to the data as a simple array
FI operator T* () { return pos; }
explicit FI operator T* () { return pos; }
// If any element is true then it's true
FI constexpr operator bool() const { return 0 NUM_AXIS_GANG(|| x, || y, || z, || i, || j, || k, || u, || v, || w); }
// Smallest element
@@ -749,7 +749,7 @@ struct XYZEval {
// Length reduced to one dimension
FI constexpr T magnitude() const { return (T)sqrtf(LOGICAL_AXIS_GANG(+ e*e, + x*x, + y*y, + z*z, + i*i, + j*j, + k*k, + u*u, + v*v, + w*w)); }
// Pointer to the data as a simple array
FI operator T* () { return pos; }
explicit FI operator T* () { return pos; }
// If any element is true then it's true
FI constexpr operator bool() const { return 0 LOGICAL_AXIS_GANG(|| e, || x, || y, || z, || i, || j, || k, || u, || v, || w); }
// Smallest element

View File

@@ -31,6 +31,10 @@
#include "powerloss.h"
#include "../core/macros.h"
#if ENABLED(EXTENSIBLE_UI)
#include "../lcd/extui/ui_api.h"
#endif
bool PrintJobRecovery::enabled; // Initialized by settings.load()
MediaFile PrintJobRecovery::file;

View File

@@ -456,6 +456,7 @@
#endif
#ifdef Y2_DRIVER_TYPE
#define HAS_Y2_STEPPER 1
#define HAS_DUAL_Y_STEPPERS 1
#endif
/**

View File

@@ -2852,7 +2852,7 @@
#ifndef PROBE_OFFSET_YMAX
#define PROBE_OFFSET_YMAX 50
#endif
#if ALL(ENDSTOPPULLUPS, USE_Z_MIN_PROBE)
#if ALL(ENDSTOPPULLUPS, HAS_Z_MIN_PROBE_PIN)
#define ENDSTOPPULLUP_ZMIN_PROBE
#endif
#ifndef XY_PROBE_FEEDRATE

View File

@@ -3679,11 +3679,11 @@ static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."
#if !(defined(WIFI_SSID) && defined(WIFI_PWD))
#error "ESP32 motherboard with WIFISUPPORT requires WIFI_SSID and WIFI_PWD."
#endif
#elif ENABLED(WIFI_CUSTOM_COMMAND)
#elif ENABLED(WIFI_CUSTOM_COMMAND) && NONE(ESP3D_WIFISUPPORT, WIFISUPPORT)
#error "WIFI_CUSTOM_COMMAND requires an ESP32 motherboard and WIFISUPPORT."
#elif ENABLED(OTASUPPORT)
#elif ENABLED(OTASUPPORT) && NONE(ESP3D_WIFISUPPORT, WIFISUPPORT)
#error "OTASUPPORT requires an ESP32 motherboard and WIFISUPPORT."
#elif defined(WIFI_SSID) || defined(WIFI_PWD)
#elif (defined(WIFI_SSID) || defined(WIFI_PWD)) && NONE(ESP3D_WIFISUPPORT, WIFISUPPORT)
#error "WIFI_SSID and WIFI_PWD only apply to ESP32 motherboard with WIFISUPPORT."
#endif

View File

@@ -25,7 +25,7 @@
* Release version. Leave the Marlin version or apply a custom scheme.
*/
#ifndef SHORT_BUILD_VERSION
#define SHORT_BUILD_VERSION "2.1.2.2"
#define SHORT_BUILD_VERSION "2.1.2.3"
#endif
/**
@@ -41,10 +41,10 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
#define CUSTOM_BUILD_VERSION "1.5.4"
#define CUSTOM_BUILD_VERSION "1.5.4"
#ifndef STRING_DISTRIBUTION_DATE
#define STRING_DISTRIBUTION_DATE "2024-03-22"
#define STRING_DISTRIBUTION_DATE "2024-05-29"
#endif
/**
@@ -54,7 +54,7 @@
* to alert users to major changes.
*/
#define MARLIN_HEX_VERSION 02010202
#define MARLIN_HEX_VERSION 02010203
#ifndef REQUIRED_CONFIGURATION_H_VERSION
#define REQUIRED_CONFIGURATION_H_VERSION MARLIN_HEX_VERSION
#endif
@@ -94,10 +94,10 @@
#define DEFAULT_MACHINE_UUID "b6153152-86fb-4cd8-bda7-91c6a04c467d" // PATCH: Knutwurst
#endif
/**
* The WEBSITE_URL is the location where users can get more information such as
* documentation about a specific Marlin release. Displayed in the Info Menu.
*/
/**
* The WEBSITE_URL is the location where users can get more information such as
* documentation about a specific Marlin release. Displayed in the Info Menu.
*/
#ifndef WEBSITE_URL
#define WEBSITE_URL "marlinfw.org"
#endif

View File

@@ -567,6 +567,7 @@ namespace Language_en {
#else
LSTR MSG_ATTACH_MEDIA = _UxGT("Attach ") MEDIA_TYPE_EN;
#endif
LSTR MSG_ATTACH_SD_MEDIA = _UxGT("Attach SD Card");
LSTR MSG_CHANGE_MEDIA = _UxGT("Change ") MEDIA_TYPE_EN;
LSTR MSG_RELEASE_MEDIA = _UxGT("Release ") MEDIA_TYPE_EN;
LSTR MSG_ZPROBE_OUT = _UxGT("Z Probe Past Bed");

View File

@@ -233,12 +233,11 @@ void menu_configuration();
#endif
void menu_main() {
const bool busy = printingIsActive()
#if HAS_MEDIA
, card_detected = card.isMounted()
, card_open = card_detected && card.isFileOpen()
#endif
;
const bool busy = printingIsActive();
#if HAS_MEDIA
const bool card_detected = card.isMounted(),
card_open = card_detected && card.isFileOpen();
#endif
START_MENU();
BACK_ITEM(MSG_INFO_SCREEN);
@@ -275,12 +274,12 @@ void menu_main() {
else {
#if ALL(HAS_MEDIA, MEDIA_MENU_AT_TOP)
// BEGIN MEDIA MENU
#if ENABLED(MENU_ADDAUTOSTART)
ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files
#endif
if (card_detected) {
if (!card_open) {
#if ENABLED(MENU_ADDAUTOSTART)
ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files
#endif
#if HAS_SD_DETECT
GCODES_ITEM(MSG_CHANGE_MEDIA, F("M21" TERN_(MULTI_VOLUME, "S"))); // M21 Change Media
#if ENABLED(MULTI_VOLUME)
@@ -392,12 +391,12 @@ void menu_main() {
#if HAS_MEDIA && DISABLED(MEDIA_MENU_AT_TOP)
// BEGIN MEDIA MENU
#if ENABLED(MENU_ADDAUTOSTART)
ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files
#endif
if (card_detected) {
if (!card_open) {
#if ENABLED(MENU_ADDAUTOSTART)
ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files
#endif
#if HAS_SD_DETECT
GCODES_ITEM(MSG_CHANGE_MEDIA, F("M21" TERN_(MULTI_VOLUME, "S"))); // M21 Change Media
#if ENABLED(MULTI_VOLUME)

View File

@@ -2046,6 +2046,7 @@ void prepare_line_to_destination() {
do_homing_move(axis, -bump, TERN(HOMING_Z_WITH_PROBE, (axis == Z_AXIS ? z_probe_fast_mm_s : 0), 0), false);
#if ENABLED(DETECT_BROKEN_ENDSTOP)
// Check for a broken endstop
EndstopEnum es;
switch (axis) {
@@ -2053,11 +2054,20 @@ void prepare_line_to_destination() {
MAIN_AXIS_MAP(_ESCASE)
default: break;
}
#if ENABLED(DUAL_X_CARRIAGE)
if (axis == X_AXIS && axis_home_dir > 0) {
es = X_MAX;
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("DUAL_X_CARRIAGE: Homing to X_MAX");
}
#endif
if (TEST(endstops.state(), es)) {
SERIAL_ECHO_MSG("Bad ", C(AXIS_CHAR(axis)), " Endstop?");
kill(GET_TEXT_F(MSG_KILL_HOMING_FAILED));
}
#endif
#endif // DETECT_BROKEN_ENDSTOP
#if ALL(HOMING_Z_WITH_PROBE, BLTOUCH)
if (axis == Z_AXIS && !bltouch.high_speed_mode && bltouch.deploy())

View File

@@ -2333,7 +2333,8 @@ uint32_t Stepper::block_phase_isr() {
*/
if (cutter.cutter_mode == CUTTER_MODE_DYNAMIC
&& planner.laser_inline.status.isPowered // isPowered flag set on any parsed G1, G2, G3, or G5 move; cleared on any others.
&& cutter.last_block_power != current_block->laser.power // Prevent constant update without change
&& current_block // Block may not be available if steps completed (see discard_current_block() above)
&& cutter.last_block_power != current_block->laser.power // Only update if the power changed
) {
cutter.apply_power(current_block->laser.power);
cutter.last_block_power = current_block->laser.power;
@@ -3952,22 +3953,22 @@ void Stepper::report_positions() {
break;
#endif
#if HAS_I_MS_PINS
case I_AXIS: WRITE(I_MS1_PIN, ms1); break
case I_AXIS: WRITE(I_MS1_PIN, ms1); break;
#endif
#if HAS_J_MS_PINS
case J_AXIS: WRITE(J_MS1_PIN, ms1); break
case J_AXIS: WRITE(J_MS1_PIN, ms1); break;
#endif
#if HAS_K_MS_PINS
case K_AXIS: WRITE(K_MS1_PIN, ms1); break
case K_AXIS: WRITE(K_MS1_PIN, ms1); break;
#endif
#if HAS_U_MS_PINS
case U_AXIS: WRITE(U_MS1_PIN, ms1); break
case U_AXIS: WRITE(U_MS1_PIN, ms1); break;
#endif
#if HAS_V_MS_PINS
case V_AXIS: WRITE(V_MS1_PIN, ms1); break
case V_AXIS: WRITE(V_MS1_PIN, ms1); break;
#endif
#if HAS_W_MS_PINS
case W_AXIS: WRITE(W_MS1_PIN, ms1); break
case W_AXIS: WRITE(W_MS1_PIN, ms1); break;
#endif
#if HAS_E0_MS_PINS
case E_AXIS: WRITE(E0_MS1_PIN, ms1); break;
@@ -4032,22 +4033,22 @@ void Stepper::report_positions() {
break;
#endif
#if HAS_I_MS_PINS
case I_AXIS: WRITE(I_MS2_PIN, ms2); break
case I_AXIS: WRITE(I_MS2_PIN, ms2); break;
#endif
#if HAS_J_MS_PINS
case J_AXIS: WRITE(J_MS2_PIN, ms2); break
case J_AXIS: WRITE(J_MS2_PIN, ms2); break;
#endif
#if HAS_K_MS_PINS
case K_AXIS: WRITE(K_MS2_PIN, ms2); break
case K_AXIS: WRITE(K_MS2_PIN, ms2); break;
#endif
#if HAS_U_MS_PINS
case U_AXIS: WRITE(U_MS2_PIN, ms2); break
case U_AXIS: WRITE(U_MS2_PIN, ms2); break;
#endif
#if HAS_V_MS_PINS
case V_AXIS: WRITE(V_MS2_PIN, ms2); break
case V_AXIS: WRITE(V_MS2_PIN, ms2); break;
#endif
#if HAS_W_MS_PINS
case W_AXIS: WRITE(W_MS2_PIN, ms2); break
case W_AXIS: WRITE(W_MS2_PIN, ms2); break;
#endif
#if HAS_E0_MS_PINS
case E_AXIS: WRITE(E0_MS2_PIN, ms2); break;
@@ -4111,23 +4112,23 @@ void Stepper::report_positions() {
#endif
break;
#endif
#if HAS_I_MS_PINS
case I_AXIS: WRITE(I_MS3_PIN, ms3); break
#if HAS_I_MS_PINS && PIN_EXISTS(I_MS3)
case I_AXIS: WRITE(I_MS3_PIN, ms3); break;
#endif
#if HAS_J_MS_PINS
case J_AXIS: WRITE(J_MS3_PIN, ms3); break
#if HAS_J_MS_PINS && PIN_EXISTS(J_MS3)
case J_AXIS: WRITE(J_MS3_PIN, ms3); break;
#endif
#if HAS_K_MS_PINS
case K_AXIS: WRITE(K_MS3_PIN, ms3); break
#if HAS_K_MS_PINS && PIN_EXISTS(K_MS3)
case K_AXIS: WRITE(K_MS3_PIN, ms3); break;
#endif
#if HAS_U_MS_PINS
case U_AXIS: WRITE(U_MS3_PIN, ms3); break
#if HAS_U_MS_PINS && PIN_EXISTS(U_MS3)
case U_AXIS: WRITE(U_MS3_PIN, ms3); break;
#endif
#if HAS_V_MS_PINS
case V_AXIS: WRITE(V_MS3_PIN, ms3); break
#if HAS_V_MS_PINS && PIN_EXISTS(V_MS3)
case V_AXIS: WRITE(V_MS3_PIN, ms3); break;
#endif
#if HAS_W_MS_PINS
case W_AXIS: WRITE(W_MS3_PIN, ms3); break
#if HAS_W_MS_PINS && PIN_EXISTS(W_MS3)
case W_AXIS: WRITE(W_MS3_PIN, ms3); break;
#endif
#if HAS_E0_MS_PINS && PIN_EXISTS(E0_MS3)
case E_AXIS: WRITE(E0_MS3_PIN, ms3); break;

View File

@@ -595,7 +595,7 @@ volatile bool Temperature::raw_temps_ready = false;
#endif
#if MILLISECONDS_PREHEAT_TIME > 0
millis_t Temperature::preheat_end_ms_hotend[HOTENDS]; // = { 0 };
millis_t Temperature::preheat_end_ms_hotend[HOTENDS]; // = { 0 }
#endif
#if HAS_HEATED_BED && PREHEAT_TIME_BED_MS > 0
millis_t Temperature::preheat_end_ms_bed = 0;
@@ -1814,7 +1814,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id) {
// Make sure temperature is decreasing
if (watch_cooler.elapsed(ms)) { // Time to check the cooler?
if (degCooler() > watch_cooler.target) // Failed to decrease enough?
_temp_error(H_COOLER, GET_TEXT_F(MSG_COOLING_FAILED), GET_TEXT_F(MSG_COOLING_FAILED));
_temp_error(H_COOLER, GET_EN_TEXT_F(MSG_COOLING_FAILED), GET_TEXT_F(MSG_COOLING_FAILED));
else
start_watching_cooler(); // Start again if the target is still far off
}
@@ -2442,7 +2442,7 @@ void Temperature::updateTemperaturesFromRawValues() {
/**
// DEBUG PREHEATING TIME
SERIAL_ECHOLNPGM("\nExtruder = ", e, " Preheat On/Off = ", is_preheating(e));
const float test_is_preheating = (preheat_end_time[HOTEND_INDEX] - millis()) * 0.001f;
const float test_is_preheating = (preheat_end_ms_hotend[HOTEND_INDEX] - millis()) * 0.001f;
if (test_is_preheating < 31) SERIAL_ECHOLNPGM("Extruder = ", e, " Preheat remaining time = ", test_is_preheating, "s", "\n");
//*/

View File

@@ -747,7 +747,7 @@ class Temperature {
#endif
#if MILLISECONDS_PREHEAT_TIME > 0
static millis_t preheat_end_time[HOTENDS];
static millis_t preheat_end_ms_hotend[HOTENDS];
#endif
#if HAS_FAN_LOGIC
@@ -909,13 +909,13 @@ class Temperature {
*/
#if MILLISECONDS_PREHEAT_TIME > 0
static bool is_preheating(const uint8_t E_NAME) {
return preheat_end_time[HOTEND_INDEX] && PENDING(millis(), preheat_end_time[HOTEND_INDEX]);
return preheat_end_ms_hotend[HOTEND_INDEX] && PENDING(millis(), preheat_end_ms_hotend[HOTEND_INDEX]);
}
static void start_preheat_time(const uint8_t E_NAME) {
preheat_end_time[HOTEND_INDEX] = millis() + MILLISECONDS_PREHEAT_TIME;
preheat_end_ms_hotend[HOTEND_INDEX] = millis() + MILLISECONDS_PREHEAT_TIME;
}
static void reset_preheat_time(const uint8_t E_NAME) {
preheat_end_time[HOTEND_INDEX] = 0;
preheat_end_ms_hotend[HOTEND_INDEX] = 0;
}
#else
#define is_preheating(n) (false)

View File

@@ -18,13 +18,13 @@ def enabled_defines(filepath):
Each entry is a dictionary with a 'name' and a 'section' key. We end up with:
{ MOTHERBOARD: { name: "MOTHERBOARD", section: "hardware" }, ... }
The 'name' key might get dropped as redundant, but it's useful for debugging.
TODO: Drop the 'name' key as redundant. For now it's useful for debugging.
This list is only used to filter config-defined options from those defined elsewhere.
Because the option names are the keys, only the last occurrence is retained.
Use the Schema class for a more complete list of options, soon with full parsing.
This list is used to filter what is actually a config-defined option versus
defines from elsewhere.
This means the actual used value might not be reflected by this function.
The Schema class does more complete parsing for a more accurate list of options.
While the Schema class parses the configurations on its own, this script will
get the preprocessor output and get the intersection of the enabled options from
@@ -44,13 +44,10 @@ def enabled_defines(filepath):
# This will avoid false positives from #defines in comments
f = re.sub(r'/\*.*?\*/', '', '\n'.join(f), flags=re.DOTALL).split("\n")
a = []
for line in f:
sline = line.strip()
m = re.match(spatt, sline) # @section ...
if m:
section = m.group(1).strip()
continue
if m: section = m.group(1).strip() ; continue
if sline[:7] == "#define":
# Extract the key here (we don't care about the value)
kv = sline[8:].strip().split()
@@ -79,6 +76,7 @@ def compute_build_signature(env):
Compute the build signature by extracting all configuration settings and
building a unique reversible signature that can be included in the binary.
The signature can be reversed to get a 1:1 equivalent configuration file.
Used by common-dependencies.py after filtering build files by feature.
'''
if 'BUILD_SIGNATURE' in env: return
env.Append(BUILD_SIGNATURE=1)

View File

@@ -157,14 +157,14 @@ def Upload(source, target, env):
marlin_string_config_h_author = _GetMarlinEnv(MarlinEnv, 'STRING_CONFIG_H_AUTHOR')
# Get firmware upload params
upload_firmware_source_name = env['PROGNAME'] + '.bin' if 'PROGNAME' in env else str(source[0])
upload_firmware_source_path = os.path.join(env["PROJECT_BUILD_DIR"], env["PIOENV"], f"{env['PROGNAME']}.bin") if 'PROGNAME' in env else str(source[0])
# Source firmware filename
upload_speed = env['UPLOAD_SPEED'] if 'UPLOAD_SPEED' in env else 115200
# baud rate of serial connection
upload_port = _GetUploadPort(env) # Serial port to use
# Set local upload params
upload_firmware_target_name = os.path.basename(upload_firmware_source_name)
upload_firmware_target_name = os.path.basename(upload_firmware_source_path)
# Target firmware filename
upload_timeout = 1000 # Communication timout, lossy/slow connections need higher values
upload_blocksize = 512 # Transfer block size. 512 = Autodetect
@@ -216,7 +216,7 @@ def Upload(source, target, env):
print(f' LONG_FILENAME_WRITE_SUPPORT : {marlin_longname_write}')
print(f' CUSTOM_FIRMWARE_UPLOAD : {marlin_custom_firmware_upload}')
print('---- Upload parameters ------------------------')
print(f' Source : {upload_firmware_source_name}')
print(f' Source : {upload_firmware_source_path}')
print(f' Target : {upload_firmware_target_name}')
print(f' Port : {upload_port} @ {upload_speed} baudrate')
print(f' Timeout : {upload_timeout}')
@@ -271,14 +271,14 @@ def Upload(source, target, env):
# WARNING! The serial port must be closed here because the serial transfer that follow needs it!
# Upload firmware file
debugPrint(f"Copy '{upload_firmware_source_name}' --> '{upload_firmware_target_name}'")
debugPrint(f"Copy '{upload_firmware_source_path}' --> '{upload_firmware_target_name}'")
protocol = MarlinBinaryProtocol.Protocol(upload_port, upload_speed, upload_blocksize, float(upload_error_ratio), int(upload_timeout))
#echologger = MarlinBinaryProtocol.EchoProtocol(protocol)
protocol.connect()
# Mark the rollback (delete broken transfer) from this point on
rollback = True
filetransfer = MarlinBinaryProtocol.FileTransferProtocol(protocol)
transferOK = filetransfer.copy(upload_firmware_source_name, upload_firmware_target_name, upload_compression, upload_test)
transferOK = filetransfer.copy(upload_firmware_source_path, upload_firmware_target_name, upload_compression, upload_test)
protocol.disconnect()
# Notify upload completed

View File

@@ -1,3 +1,3 @@
# Where have all the configurations gone?
## https://github.com/MarlinFirmware/Configurations/archive/release-2.1.2.2.zip
## https://github.com/MarlinFirmware/Configurations/archive/release-2.1.2.3.zip

View File

@@ -81,7 +81,7 @@ A reduced entry laser power factor is based on the entry step rate to cruise ste
block entry laser power = laser power * ( entry step rate / cruise step rate )
The initial power will be set to no less than the laser_power_floor or the inital power calculation.
The initial power will be set to no less than the laser_power_floor or the initial power calculation.
The reduced final power factor is based on the final step rate to cruise step rate ratio for deceleration.