Skip to content

Commit

Permalink
Merge branch 'bugfix-2.1.x' into mike-anet-evo
Browse files Browse the repository at this point in the history
* bugfix-2.1.x:
  πŸ§‘β€πŸ’» Fix build_all_examples
  [cron] Bump distribution date (2024-01-23)
  ♻️ LCD pins migration precursor (MarlinFirmware#26719)
  🎨 Move EXIT_M303
  πŸ§‘β€πŸ’» ExtUI::onPlayTone optional duration
  Misc. aesthetic adjustments
  [cron] Bump distribution date (2024-01-22)
  ✨ BIQU MicroProbe (MarlinFirmware#26527)
  🩹 Fix M592 report (MarlinFirmware#26680)
  🩹 Fix STM32 CPU serial UUID (MarlinFirmware#26715)
  πŸ”₯ Remove ALLOW_LOW_EJERK (MarlinFirmware#26712)
  [cron] Bump distribution date (2024-01-21)
  πŸ”¨ Fix POLAR build (MarlinFirmware#26687)
  [cron] Bump distribution date (2024-01-20)
  πŸ”§ Adjust DEFAULT_EJERK settings (MarlinFirmware#26665)
  πŸ“ Fix Anet pins typo (MarlinFirmware#26660)
  ✨ Status Screen flow adjustment (MarlinFirmware#26627)
  • Loading branch information
mikezs committed Jan 23, 2024
2 parents 2fb70e7 + 4309e6a commit 807d371
Show file tree
Hide file tree
Showing 178 changed files with 15,641 additions and 14,591 deletions.
14 changes: 12 additions & 2 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@
#define DEFAULT_XJERK 10.0
#define DEFAULT_YJERK 10.0
#define DEFAULT_ZJERK 0.3
#define DEFAULT_EJERK 5.0
//#define DEFAULT_IJERK 0.3
//#define DEFAULT_JJERK 0.3
//#define DEFAULT_KJERK 0.3
Expand All @@ -1308,8 +1309,6 @@
#endif
#endif

#define DEFAULT_EJERK 5.0 // May be used by Linear Advance

/**
* Junction Deviation Factor
*
Expand Down Expand Up @@ -1449,6 +1448,17 @@
//#define BD_SENSOR_PROBE_NO_STOP // Probe bed without stopping at each probe point
#endif

/**
* BIQU MicroProbe
*
* A lightweight, solenoid-driven probe.
* For information about this sensor https://github.com/bigtreetech/MicroProbe
*
* Also requires: PROBE_ENABLE_DISABLE
*/
//#define BIQU_MICROPROBE_V1 // Triggers HIGH
//#define BIQU_MICROPROBE_V2 // Triggers LOW

// A probe that is deployed and stowed with a solenoid pin (SOL1_PIN)
//#define SOLENOID_PROBE

Expand Down
2 changes: 1 addition & 1 deletion Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1474,6 +1474,7 @@
#if IS_ULTIPANEL
#define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position"
#define ULTIPANEL_FEEDMULTIPLY // Encoder sets the feedrate multiplier on the Status Screen
//#define ULTIPANEL_FLOWPERCENT // Encoder sets the flow percentage on the Status Screen
#endif
#endif

Expand Down Expand Up @@ -2319,7 +2320,6 @@
#endif
//#define ADVANCE_K_EXTRA // Add a second linear advance constant, configurable with M900 L.
//#define LA_DEBUG // Print debug information to serial during operation. Disable for production use.
//#define ALLOW_LOW_EJERK // Allow a DEFAULT_EJERK value of <10. Recommended for direct drive hotends.
//#define EXPERIMENTAL_I2S_LA // Allow I2S_STEPPER_STREAM to be used with LA. Performance degrades as the LA step rate reaches ~20kHz.
#endif

Expand Down
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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-01-19"
//#define STRING_DISTRIBUTION_DATE "2024-01-23"

/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/DUE/HAL_SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
// Public functions
// ------------------------

#if ANY(DUE_SOFTWARE_SPI, FORCE_SOFT_SPI)
#if ANY(SOFTWARE_SPI, FORCE_SOFT_SPI)

// ------------------------
// Software SPI
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/DUE/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@

#if HAS_MEDIA && HAS_DRIVER(TMC2130)
#if ENABLED(TMC_USE_SW_SPI)
#if DISABLED(DUE_SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
#if DISABLED(SOFTWARE_SPI) && (_IS_HW_SPI(MOSI) || _IS_HW_SPI(MISO) || _IS_HW_SPI(SCK))
#error "DUE hardware SPI is required but is incompatible with TMC2130 software SPI. Either disable TMC_USE_SW_SPI or use separate pins for the two SPIs."
#endif
#elif ENABLED(DUE_SOFTWARE_SPI)
#elif ENABLED(SOFTWARE_SPI)
#error "DUE software SPI is required but is incompatible with TMC2130 hardware SPI. Enable TMC_USE_SW_SPI to fix."
#endif
#endif
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/DUE/spi_pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#define SD_MOSI_PIN 75
#else
// defaults
#define DUE_SOFTWARE_SPI
#define SOFTWARE_SPI
#ifndef SD_SCK_PIN
#define SD_SCK_PIN 52
#endif
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HC32/MarlinSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/**
* Not every MarlinSerial instance should handle emergency parsing, as
* it would not make sense to parse GCode from TMC responses
* it would not make sense to parse G-Code from TMC responses
*/
constexpr bool serial_handles_emergency(int port) {
return false
Expand Down
3 changes: 0 additions & 3 deletions Marlin/src/HAL/LINUX/spi_pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
*/
#pragma once

#include "../../core/macros.h"
#include "../../inc/MarlinConfigPre.h"

#if ALL(HAS_MARLINUI_U8GLIB, HAS_MEDIA) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different.
Expand Down
4 changes: 1 addition & 3 deletions Marlin/src/HAL/LPC1768/spi_pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
*/
#pragma once

#include "../../core/macros.h"

#if ALL(HAS_MEDIA, HAS_MARLINUI_U8GLIB) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#if ALL(HAS_MARLINUI_U8GLIB, HAS_MEDIA) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different.
// This requirement can be removed if the SPI access to these devices is updated to use
Expand Down
3 changes: 0 additions & 3 deletions Marlin/src/HAL/NATIVE_SIM/spi_pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
*/
#pragma once

#include "../../core/macros.h"
#include "../../inc/MarlinConfigPre.h"

#if ALL(HAS_MARLINUI_U8GLIB, HAS_MEDIA) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_EN == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN)
#define SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently
// needed due to the speed and mode required for communicating with each device being different.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ inline void tmc_standby_setup() {
* - Init the buzzer, possibly a custom timer
* - Init more optional hardware:
* β€’ Color LED illumination
* β€’ Neopixel illumination
* β€’ NeoPixel illumination
* β€’ Controller Fan
* β€’ Creality DWIN LCD (show boot image)
* β€’ Tare the Probe if possible
Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/core/language.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@
#define MACHINE_NAME DEFAULT_MACHINE_NAME
#endif

#ifndef MACHINE_UUID
#define MACHINE_UUID DEFAULT_MACHINE_UUID
#endif

#define MARLIN_WEBSITE_URL "marlinfw.org"

//#if !defined(STRING_SPLASH_LINE3) && defined(WEBSITE_URL)
Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/core/utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ void safe_delay(millis_t ms) {
TERN_(Z_PROBE_ALLEN_KEY, "Z_PROBE_ALLEN_KEY")
TERN_(SOLENOID_PROBE, "SOLENOID_PROBE")
TERN_(MAGLEV4, "MAGLEV4")
TERN_(BIQU_MICROPROBE_V1, "BIQU_MICROPROBE_V1")
TERN_(BIQU_MICROPROBE_V2, "BIQU_MICROPROBE_V2")
IF_DISABLED(PROBE_SELECTED, "NONE")
);

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/digipot/digipot_mcp4018.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#ifndef DIGIPOT_A4988_Vrefmax
#define DIGIPOT_A4988_Vrefmax 1.666
#endif
#define DIGIPOT_MCP4018_MAX_VALUE 127
#define DIGIPOT_MCP4018_MAX_VALUE 127

#define DIGIPOT_A4988_Itripmax(Vref) ((Vref) / (8.0 * DIGIPOT_A4988_Rsx))

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/feature/digipot/digipot_mcp4451.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@

// Settings for the I2C based DIGIPOT (MCP4451) on Azteeg X3 Pro
#if MB(5DPRINT)
#define DIGIPOT_I2C_FACTOR 117.96f
#define DIGIPOT_I2C_MAX_CURRENT 1.736f
#define DIGIPOT_I2C_FACTOR 117.96f
#define DIGIPOT_I2C_MAX_CURRENT 1.736f
#elif MB(AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI)
#define DIGIPOT_I2C_FACTOR 113.5f
#define DIGIPOT_I2C_MAX_CURRENT 2.0f
Expand Down
9 changes: 4 additions & 5 deletions Marlin/src/gcode/calibrate/M48.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ void GcodeSuite::M48() {
return;
}

if (verbose_level > 0)
SERIAL_ECHOLNPGM("M48 Z-Probe Repeatability Test");

const int8_t n_samples = parser.byteval('P', 10);
if (!WITHIN(n_samples, 4, 50)) {
SERIAL_ECHOLNPGM("?Sample size not plausible (4-50).");
Expand Down Expand Up @@ -102,6 +99,9 @@ void GcodeSuite::M48() {
const bool schizoid_flag = parser.boolval('S');
if (schizoid_flag && !seen_L) n_legs = 7;

if (verbose_level > 0)
SERIAL_ECHOLNPGM("M48 Z-Probe Repeatability Test");

if (verbose_level > 2)
SERIAL_ECHOLNPGM("Positioning the probe...");

Expand Down Expand Up @@ -261,8 +261,7 @@ void GcodeSuite::M48() {

#if HAS_STATUS_MESSAGE
// Display M48 results in the status bar
char sigma_str[8];
ui.status_printf(0, F(S_FMT ": %s"), GET_TEXT(MSG_M48_DEVIATION), dtostrf(sigma, 2, 6, sigma_str));
ui.set_status_and_level(MString<30>(GET_TEXT_F(MSG_M48_DEVIATION), F(": "), w_float_t(sigma, 2, 6)));
#endif
}

Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/gcode/feature/nonlinear/M592.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

void GcodeSuite::M592_report(const bool forReplay/*=true*/) {
report_heading(forReplay, F(STR_NONLINEAR_EXTRUSION));
SERIAL_ECHOLNPGM(" M593 A", stepper.ne.A, " B", stepper.ne.B, " C", stepper.ne.C);
SERIAL_ECHOLNPGM(" M592 A", stepper.ne.A, " B", stepper.ne.B, " C", stepper.ne.C);
}

/**
Expand All @@ -43,6 +43,8 @@ void GcodeSuite::M592_report(const bool forReplay/*=true*/) {
* Only adjusts forward extrusions, since those are the ones affected by backpressure.
*/
void GcodeSuite::M592() {
if (!parser.seen_any()) return M592_report();

if (parser.seenval('A')) stepper.ne.A = parser.value_float();
if (parser.seenval('B')) stepper.ne.B = parser.value_float();
if (parser.seenval('C')) stepper.ne.C = parser.value_float();
Expand Down
6 changes: 2 additions & 4 deletions Marlin/src/gcode/host/M114.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,17 @@
#if ENABLED(M114_DETAIL)

void report_all_axis_pos(const xyze_pos_t &pos, const uint8_t n=LOGICAL_AXES, const uint8_t precision=3) {
char str[12];
for (uint8_t a = 0; a < n; ++a) {
SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_LBL[a]));
if (pos[a] >= 0) SERIAL_CHAR(' ');
SERIAL_ECHO(dtostrf(pos[a], 1, precision, str));
SERIAL_ECHO(p_float_t(pos[a], precision));
}
SERIAL_EOL();
}
inline void report_linear_axis_pos(const xyze_pos_t &pos) { report_all_axis_pos(pos, XYZ); }

void report_linear_axis_pos(const xyz_pos_t &pos, const uint8_t precision=3) {
char str[12];
LOOP_NUM_AXES(a) SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_LBL[a]), dtostrf(pos[a], 1, precision, str));
LOOP_NUM_AXES(a) SERIAL_ECHO(FPSTR(pgm_read_ptr(&SP_AXIS_LBL[a])), p_float_t(pos[a], precision));
SERIAL_EOL();
}

Expand Down
38 changes: 23 additions & 15 deletions Marlin/src/gcode/host/M115.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "../../feature/caselight.h"
#endif

#if ENABLED(HAS_STM32_UID) && !defined(MACHINE_UUID)
#if !defined(MACHINE_UUID) && HAS_STM32_UID
#include "../../libs/hex_print.h"
#endif

Expand All @@ -62,6 +62,7 @@
* at https://reprap.org/wiki/Firmware_Capabilities_Protocol
*/
void GcodeSuite::M115() {

SERIAL_ECHOPGM("FIRMWARE_NAME:Marlin"
" " DETAILED_BUILD_VERSION " (" __DATE__ " " __TIME__ ")"
" SOURCE_CODE_URL:" SOURCE_CODE_URL
Expand All @@ -71,24 +72,31 @@ void GcodeSuite::M115() {
#if NUM_AXES != XYZ
" AXIS_COUNT:" STRINGIFY(NUM_AXES)
#endif
#if defined(MACHINE_UUID) || HAS_STM32_UID
" UUID:"
#endif
#ifdef MACHINE_UUID
" UUID:" MACHINE_UUID
MACHINE_UUID
#endif
);

// STM32UID:111122223333
#if ENABLED(HAS_STM32_UID) && !defined(MACHINE_UUID)
// STM32 based devices output the CPU device serial number
// Used by LumenPnP / OpenPNP to keep track of unique hardware/configurations
// https://github.com/opulo-inc/lumenpnp
// Although this code should work on all STM32 based boards
SERIAL_ECHOPGM(" UUID:");
uint32_t *uid_address = (uint32_t*)UID_BASE;
for (uint8_t i = 0; i < 3; ++i) {
const uint32_t UID = uint32_t(READ_REG(*(uid_address)));
uid_address += 4U;
for (int B = 24; B >= 0; B -= 8) print_hex_byte(UID >> B);
}
#if !defined(MACHINE_UUID) && HAS_STM32_UID
/**
* STM32-based devices have a 96-bit CPU device serial number.
* Used by LumenPnP / OpenPNP to keep track of unique hardware/configurations.
* https://github.com/opulo-inc/lumenpnp
* This code should work on all STM32-based boards.
*/
#if ENABLED(STM32_UID_SHORT_FORM)
uint32_t * const UID = (uint32_t*)UID_BASE;
SERIAL_ECHO(hex_long(UID[0]), hex_long(UID[1]), hex_long(UID[2]));
#else
uint16_t * const UID = (uint16_t*)UID_BASE;
SERIAL_ECHO(
F("CEDE2A2F-"), hex_word(UID[0]), '-', hex_word(UID[1]), '-', hex_word(UID[2]), '-',
hex_word(UID[3]), hex_word(UID[4]), hex_word(UID[5])
);
#endif
#endif

SERIAL_EOL();
Expand Down
6 changes: 5 additions & 1 deletion Marlin/src/gcode/host/M360.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ void GcodeSuite::M360() {
config_line(F("NumExtruder"), EXTRUDERS);
#if HAS_EXTRUDERS
EXTRUDER_LOOP() {
config_line_e(e, JERK_STR, TERN(HAS_LINEAR_E_JERK, planner.max_e_jerk[E_INDEX_N(e)], TERN(CLASSIC_JERK, planner.max_jerk.e, DEFAULT_EJERK)));
#if HAS_LINEAR_E_JERK
config_line_e(e, JERK_STR, planner.max_e_jerk[E_INDEX_N(e)]);
#elif ENABLED(CLASSIC_JERK)
config_line_e(e, JERK_STR, planner.max_jerk.e);
#endif
config_line_e(e, F("MaxSpeed"), planner.settings.max_feedrate_mm_s[E_AXIS_N(e)]);
config_line_e(e, F("Acceleration"), planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(e)]);
config_line_e(e, F("Diameter"), TERN(NO_VOLUMETRICS, DEFAULT_NOMINAL_FILAMENT_DIA, planner.filament_size[e]));
Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/inc/Changes.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@
#error "Z_ENDSTOP_SERVO_NR is now Z_PROBE_SERVO_NR."
#elif defined(DEFAULT_XYJERK)
#error "DEFAULT_XYJERK is deprecated. Use DEFAULT_XJERK and DEFAULT_YJERK instead."
#elif defined(ALLOW_LOW_EJERK)
#error "ALLOW_LOW_EJERK is deprecated and should be removed."
#elif defined(XY_TRAVEL_SPEED)
#error "XY_TRAVEL_SPEED is now XY_PROBE_FEEDRATE."
#elif defined(XY_PROBE_SPEED)
Expand Down
5 changes: 3 additions & 2 deletions Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@
#define MKS_MINI_12864
#endif

// MKS_MINI_12864_V3 , BTT_MINI_12864 and BEEZ_MINI_12864 have identical pinouts to FYSETC_MINI_12864_2_1
// MKS_MINI_12864_V3 , BTT_MINI_12864 and BEEZ_MINI_12864 are nearly identical to FYSETC_MINI_12864_2_1
#if ANY(MKS_MINI_12864_V3, BTT_MINI_12864, BEEZ_MINI_12864)
#define FYSETC_MINI_12864_2_1
#endif
Expand Down Expand Up @@ -972,6 +972,7 @@
#define DETECT_I2C_LCD_DEVICE 1
#endif

// Encoder behavior
#ifndef STD_ENCODER_PULSES_PER_STEP
#if ENABLED(TOUCH_SCREEN)
#define STD_ENCODER_PULSES_PER_STEP 2
Expand Down Expand Up @@ -1168,7 +1169,7 @@
/**
* Set flags for any form of bed probe
*/
#if ANY(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, HAS_Z_SERVO_PROBE, SOLENOID_PROBE, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING, MAGLEV4, MAG_MOUNTED_PROBE)
#if ANY(TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, HAS_Z_SERVO_PROBE, SOLENOID_PROBE, Z_PROBE_SLED, RACK_AND_PINION_PROBE, SENSORLESS_PROBING, MAGLEV4, MAG_MOUNTED_PROBE, BIQU_MICROPROBE_V1, BIQU_MICROPROBE_V2)
#define HAS_STOWABLE_PROBE 1
#endif
#if ANY(HAS_STOWABLE_PROBE, FIX_MOUNTED_PROBE, BD_SENSOR, NOZZLE_AS_PROBE)
Expand Down
5 changes: 0 additions & 5 deletions Marlin/src/inc/Conditionals_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1243,11 +1243,6 @@
#define NO_EEPROM_SELECTED 1
#endif

// Flag whether hex_print.cpp is used
#if ANY(AUTO_BED_LEVELING_UBL, M100_FREE_MEMORY_WATCHER, DEBUG_GCODE_PARSER, TMC_DEBUG, MARLIN_DEV_MODE, DEBUG_CARDREADER, M20_TIMESTAMP_SUPPORT)
#define NEED_HEX_PRINT 1
#endif

// Flags for Case Light having a color property or a single pin
#if ENABLED(CASE_LIGHT_ENABLE)
#if ANY(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_USE_RGB_LED)
Expand Down
Loading

0 comments on commit 807d371

Please sign in to comment.