From 81d8663f1f4a877971f1b0fa8552b943dcdc4c7c Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sat, 18 Oct 2025 00:28:29 +0000 Subject: [PATCH 01/16] [cron] Bump distribution date (2025-10-18) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index ba82d7c10d..be1a003a37 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2025-10-17" +//#define STRING_DISTRIBUTION_DATE "2025-10-18" /** * The protocol for communication to the host. Protocol indicates communication diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index f80072ec1f..f4cc9b0d9a 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 "2025-10-17" + #define STRING_DISTRIBUTION_DATE "2025-10-18" #endif /** From 3753cb9a942a1ce351940e614234c9ddd1690710 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun, 19 Oct 2025 11:17:11 +1300 Subject: [PATCH 02/16] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Fill?= =?UTF-8?q?=20in=20debuggable=20pins=20(#28119)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/pins/pinsDebug_list.h | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index ad17fe2436..4bc2eeed52 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -770,6 +770,12 @@ #if PIN_EXISTS(FAN7) REPORT_NAME_DIGITAL(__LINE__, FAN7_PIN) #endif +#if PIN_EXISTS(FAN8) + REPORT_NAME_DIGITAL(__LINE__, FAN8_PIN) +#endif +#if PIN_EXISTS(FAN9) + REPORT_NAME_DIGITAL(__LINE__, FAN9_PIN) +#endif #if PIN_EXISTS(FAN_MUX0) REPORT_NAME_DIGITAL(__LINE__, FAN_MUX0_PIN) #endif @@ -954,6 +960,12 @@ #if PIN_EXISTS(LCD_BACKLIGHT) REPORT_NAME_DIGITAL(__LINE__, LCD_BACKLIGHT_PIN) #endif +#if PIN_EXISTS(DOGLCD_SCL) + REPORT_NAME_DIGITAL(__LINE__, DOGLCD_SCL_PIN) +#endif +#if PIN_EXISTS(DOGLCD_SDA) + REPORT_NAME_DIGITAL(__LINE__, DOGLCD_SDA_PIN) +#endif // // LED Lights @@ -1038,6 +1050,30 @@ #if PIN_EXISTS(TEMP_1_MISO) REPORT_NAME_DIGITAL(__LINE__, TEMP_1_MISO_PIN) #endif +#if PIN_EXISTS(TEMP_2_CS) + REPORT_NAME_DIGITAL(__LINE__, TEMP_2_CS_PIN) +#endif +#if PIN_EXISTS(TEMP_2_SCK) + REPORT_NAME_DIGITAL(__LINE__, TEMP_2_SCK_PIN) +#endif +#if PIN_EXISTS(TEMP_2_MOSI) + REPORT_NAME_DIGITAL(__LINE__, TEMP_2_MOSI_PIN) +#endif +#if PIN_EXISTS(TEMP_2_MISO) + REPORT_NAME_DIGITAL(__LINE__, TEMP_2_MISO_PIN) +#endif +#if PIN_EXISTS(TEMP_3_CS) + REPORT_NAME_DIGITAL(__LINE__, TEMP_3_CS_PIN) +#endif +#if PIN_EXISTS(TEMP_3_SCK) + REPORT_NAME_DIGITAL(__LINE__, TEMP_3_SCK_PIN) +#endif +#if PIN_EXISTS(TEMP_3_MOSI) + REPORT_NAME_DIGITAL(__LINE__, TEMP_3_MOSI_PIN) +#endif +#if PIN_EXISTS(TEMP_3_MISO) + REPORT_NAME_DIGITAL(__LINE__, TEMP_3_MISO_PIN) +#endif // // MOSFETs (RAMPS) @@ -1199,6 +1235,12 @@ #if PIN_EXISTS(SERVO3) REPORT_NAME_DIGITAL(__LINE__, SERVO3_PIN) #endif +#if PIN_EXISTS(SERVO4) + REPORT_NAME_DIGITAL(__LINE__, SERVO4_PIN) +#endif +#if PIN_EXISTS(SERVO5) + REPORT_NAME_DIGITAL(__LINE__, SERVO5_PIN) +#endif #if PIN_EXISTS(SHIFT_CLK) REPORT_NAME_DIGITAL(__LINE__, SHIFT_CLK_PIN) From c44b9c1c2812d3d0269440c6934ec4fd895de9eb Mon Sep 17 00:00:00 2001 From: narno2202 <130909513+narno2202@users.noreply.github.com> Date: Sun, 19 Oct 2025 00:20:26 +0200 Subject: [PATCH 03/16] =?UTF-8?q?=F0=9F=90=9B=20Fix=20PLR=20with=20FT=5FMO?= =?UTF-8?q?TION=20(#28116)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #28102 --- Marlin/src/module/ft_motion.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Marlin/src/module/ft_motion.cpp b/Marlin/src/module/ft_motion.cpp index d3ecd76630..5b2db32626 100644 --- a/Marlin/src/module/ft_motion.cpp +++ b/Marlin/src/module/ft_motion.cpp @@ -31,6 +31,10 @@ #include "stepper.h" // Access stepper block queue function and abort status. #include "endstops.h" +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../feature/powerloss.h" +#endif + FTMotion ftMotion; //----------------------------------------------------------------- @@ -170,6 +174,12 @@ void FTMotion::loop() { continue; } loadBlockData(stepper.current_block); + + #if ENABLED(POWER_LOSS_RECOVERY) + recovery.info.sdpos = stepper.current_block->sdpos; + recovery.info.current_position = stepper.current_block->start_position; + #endif + blockProcRdy = true; // Some kinematics track axis motion in HX, HY, HZ From fb95e6665239c4a3298a96e427cde77993979903 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 18 Oct 2025 17:51:04 -0500 Subject: [PATCH 04/16] =?UTF-8?q?=F0=9F=93=9D=20(s)=20for=20FTM=5FMAX=5FSM?= =?UTF-8?q?OOTHING=5FTIME?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 2da759ab3c..043e486d5d 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1183,7 +1183,7 @@ //#define FTM_SMOOTHING // Smoothing can reduce artifacts and make steppers quieter // on sharp corners, but too much will round corners. #if ENABLED(FTM_SMOOTHING) - #define FTM_MAX_SMOOTHING_TIME 0.10f // Maximum smoothing time (seconds), higher consumes more RAM. + #define FTM_MAX_SMOOTHING_TIME 0.10f // (s) Maximum smoothing time. Higher values consume more RAM. // Increase smoothing time to reduce jerky motion, ghosting and noises. #define FTM_SMOOTHING_TIME_X 0.00f // (s) Smoothing time for X axis. Zero means disabled. #define FTM_SMOOTHING_TIME_Y 0.00f // (s) Smoothing time for Y axis From 9f0fa5a0402ccff3e0318071a8fdba857c752e88 Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun, 19 Oct 2025 12:18:02 +1300 Subject: [PATCH 05/16] =?UTF-8?q?=E2=9C=A8=20M265=20I2C=5FSCANNER=20(#2811?= =?UTF-8?q?7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 5 ++ Marlin/src/gcode/feature/i2c/M265.cpp | 69 +++++++++++++++++++++++++++ Marlin/src/gcode/gcode.cpp | 4 ++ Marlin/src/gcode/gcode.h | 5 ++ Marlin/src/inc/Conditionals-5-post.h | 2 +- buildroot/tests/DUE | 2 +- ini/features.ini | 3 +- 7 files changed, 87 insertions(+), 3 deletions(-) create mode 100644 Marlin/src/gcode/feature/i2c/M265.cpp diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 043e486d5d..122a7a458d 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -4718,6 +4718,11 @@ // //#define PINS_DEBUGGING +// +// M265 - I2C Scanner +// +//#define I2C_SCANNER + // Enable Tests that will run at startup and produce a report //#define MARLIN_TEST_BUILD diff --git a/Marlin/src/gcode/feature/i2c/M265.cpp b/Marlin/src/gcode/feature/i2c/M265.cpp new file mode 100644 index 0000000000..193ca1c7bd --- /dev/null +++ b/Marlin/src/gcode/feature/i2c/M265.cpp @@ -0,0 +1,69 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2025 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfig.h" + +#if ENABLED(I2C_SCANNER) + +#include "../../../libs/hex_print.h" +#include "../../gcode.h" +#include // Include Wire library for I2C communication + +/** + * M265: I2C Scanner - Scan for I2C devices on DOGLCD I2C pins + * + * Usage: M265 + * + * Scans I2C addresses 0x08 to 0x77 and reports any responding devices. + */ +void GcodeSuite::M265() { + Wire.begin(); + int device_count = 0; + + SERIAL_ECHOLNPGM("Scanning I2C (0x08-0x77)..."); + for (uint8_t address = 0x08; address <= 0x77; address++) { + Wire.beginTransmission(address); + const uint8_t error = Wire.endTransmission(); + + if (error == 0) { + // Device found + device_count++; + SERIAL_ECHOLNPGM("I2C device found at address 0x", hex_byte(address)); + } + else if (error == 4) + SERIAL_ECHOLNPGM("Unknown error at address 0x", hex_byte(address)); + + safe_delay(5); // Small delay between scans + } + + SERIAL_ECHOPGM("I2C scan complete. "); + if (device_count == 0) + SERIAL_ECHOLNPGM("No I2C devices found"); + else { + SERIAL_ECHOLN("Found ", device_count, " device"); + if (device_count > 1) SERIAL_CHAR('s'); + SERIAL_EOL(); + } + +} + +#endif // I2C_SCANNER diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 9088407f81..d4f74336de 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -826,6 +826,10 @@ void GcodeSuite::process_parsed_command(bool no_ok/*=false*/) { case 261: M261(); break; // M261: Request data from an i2c slave #endif + #if ENABLED(I2C_SCANNER) + case 265: M265(); break; // M265: I2C Scanner + #endif + #if ENABLED(PREVENT_COLD_EXTRUSION) case 302: M302(); break; // M302: Allow cold extrudes (set the minimum extrude temperature) #endif diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 319262c31e..87d626effc 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -211,6 +211,7 @@ * M256 - Set LCD brightness: 'M256 B' (0-255). (Requires an LCD with brightness control) * M260 - i2c Send Data (Requires EXPERIMENTAL_I2CBUS) * M261 - i2c Request Data (Requires EXPERIMENTAL_I2CBUS) + * M265 - i2c Scanner - Scan for I2C devices. (Requires I2C_SCANNER) * M280 - Set servo position absolute: 'M280 P S'. (Requires servos) * M281 - Set servo min|max position: 'M281 P L U'. (Requires EDITABLE_SERVO_ANGLES) * M282 - Detach servo: 'M282 P'. (Requires SERVO_DETACH_GCODE) @@ -965,6 +966,10 @@ private: static void M261(); #endif + #if ENABLED(I2C_SCANNER) + static void M265(); + #endif + #if HAS_SERVOS static void M280(); #if ENABLED(EDITABLE_SERVO_ANGLES) diff --git a/Marlin/src/inc/Conditionals-5-post.h b/Marlin/src/inc/Conditionals-5-post.h index e0c38ad7b6..3d248f7b29 100644 --- a/Marlin/src/inc/Conditionals-5-post.h +++ b/Marlin/src/inc/Conditionals-5-post.h @@ -3651,7 +3651,7 @@ #endif // Flag whether hex_print.cpp is needed -#if ANY(AUTO_BED_LEVELING_UBL, M100_FREE_MEMORY_WATCHER, DEBUG_GCODE_PARSER, TMC_DEBUG, MARLIN_DEV_MODE, DEBUG_CARDREADER, M20_TIMESTAMP_SUPPORT, HAS_STM32_UID) +#if ANY(AUTO_BED_LEVELING_UBL, M100_FREE_MEMORY_WATCHER, DEBUG_GCODE_PARSER, TMC_DEBUG, MARLIN_DEV_MODE, DEBUG_CARDREADER, M20_TIMESTAMP_SUPPORT, HAS_STM32_UID, I2C_SCANNER) #define NEED_HEX_PRINT 1 #endif diff --git a/buildroot/tests/DUE b/buildroot/tests/DUE index 33f6bd511a..448da6f9d4 100755 --- a/buildroot/tests/DUE +++ b/buildroot/tests/DUE @@ -39,7 +39,7 @@ exec_test $1 $2 "RAMPS4DUE_EFB with ABL (Bilinear), ExtUI, S-Curve, many options restore_configs opt_set MOTHERBOARD BOARD_RADDS Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z3_DRIVER_TYPE A4988 \ X_MAX_PIN -1 Y_MAX_PIN -1 -opt_enable ENDSTOPPULLUPS BLTOUCH AUTO_BED_LEVELING_BILINEAR \ +opt_enable ENDSTOPPULLUPS BLTOUCH AUTO_BED_LEVELING_BILINEAR I2C_SCANNER \ Z_STEPPER_AUTO_ALIGN Z_STEPPER_ALIGN_STEPPER_XY Z_SAFE_HOMING exec_test $1 $2 "RADDS with ABL (Bilinear), Triple Z Axis, Z_STEPPER_AUTO_ALIGN, E_DUAL_STEPPER_DRIVERS" "$3" diff --git a/ini/features.ini b/ini/features.ini index 960116e53b..3799c2864c 100644 --- a/ini/features.ini +++ b/ini/features.ini @@ -268,7 +268,8 @@ HAS_FILAMENT_SENSOR = build_src_filter=+ HAS_CUTTER = build_src_filter=+ + HAS_DRIVER_SAFE_POWER_PROTECT = build_src_filter=+ -EXPERIMENTAL_I2CBUS = build_src_filter=+ + +EXPERIMENTAL_I2CBUS = build_src_filter=+ + +I2C_SCANNER = build_src_filter=+ G26_MESH_VALIDATION = build_src_filter=+ ASSISTED_TRAMMING = build_src_filter=+ + HAS_MESH = build_src_filter=+ From fde861ab8cc7c51f5f9c3e3bb703fdb4c05f8ea6 Mon Sep 17 00:00:00 2001 From: vicitacal <35782762+vicitacal@users.noreply.github.com> Date: Sun, 19 Oct 2025 02:20:23 +0300 Subject: [PATCH 06/16] =?UTF-8?q?=F0=9F=9A=B8=20Fix=20MKS=20UI=20Decrease?= =?UTF-8?q?=20Feed=20Rate=20(#28109)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/extui/mks_ui/draw_change_speed.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/lcd/extui/mks_ui/draw_change_speed.cpp b/Marlin/src/lcd/extui/mks_ui/draw_change_speed.cpp index da0ce3c811..556c855b25 100644 --- a/Marlin/src/lcd/extui/mks_ui/draw_change_speed.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_change_speed.cpp @@ -62,7 +62,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { break; case ID_C_DEC: if (!editingFlowrate) - feedrate_percentage = _MAX(MIN_EXT_SPEED_PERCENT, feedrate_percentage + uiCfg.stepPrintSpeed); + feedrate_percentage = _MAX(MIN_EXT_SPEED_PERCENT, feedrate_percentage - uiCfg.stepPrintSpeed); else { const int16_t new_flow = _MAX(MIN_EXT_SPEED_PERCENT, planner.flow_percentage[0] - uiCfg.stepPrintSpeed); planner.set_flow(0, new_flow); From 9012b9a9933026ee96bcf14f1286c02ce0451c5d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 18 Oct 2025 18:29:39 -0500 Subject: [PATCH 07/16] =?UTF-8?q?=F0=9F=94=A8=20Rename=20to=20change=20cas?= =?UTF-8?q?e=20(1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../boards/{marlin_stm32F072.json => marlin__STM32F072.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename buildroot/share/PlatformIO/boards/{marlin_stm32F072.json => marlin__STM32F072.json} (100%) diff --git a/buildroot/share/PlatformIO/boards/marlin_stm32F072.json b/buildroot/share/PlatformIO/boards/marlin__STM32F072.json similarity index 100% rename from buildroot/share/PlatformIO/boards/marlin_stm32F072.json rename to buildroot/share/PlatformIO/boards/marlin__STM32F072.json From f2b2389b8f7b74015197a9ffd3c176d097b28082 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 18 Oct 2025 18:29:55 -0500 Subject: [PATCH 08/16] =?UTF-8?q?=F0=9F=94=A8=20Rename=20to=20change=20cas?= =?UTF-8?q?e=20(2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../boards/{marlin__STM32F072.json => marlin_STM32F072.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename buildroot/share/PlatformIO/boards/{marlin__STM32F072.json => marlin_STM32F072.json} (100%) diff --git a/buildroot/share/PlatformIO/boards/marlin__STM32F072.json b/buildroot/share/PlatformIO/boards/marlin_STM32F072.json similarity index 100% rename from buildroot/share/PlatformIO/boards/marlin__STM32F072.json rename to buildroot/share/PlatformIO/boards/marlin_STM32F072.json From 7e6e25929b58ed0e737fff3b2efc3c992ed03a6f Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Sun, 19 Oct 2025 00:34:38 +0000 Subject: [PATCH 09/16] [cron] Bump distribution date (2025-10-19) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index be1a003a37..87d1def5b0 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2025-10-18" +//#define STRING_DISTRIBUTION_DATE "2025-10-19" /** * The protocol for communication to the host. Protocol indicates communication diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index f4cc9b0d9a..9021441f79 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 "2025-10-18" + #define STRING_DISTRIBUTION_DATE "2025-10-19" #endif /** From a3929b435b6533179162d68558aee4e622993ce9 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 19 Oct 2025 19:01:04 -0500 Subject: [PATCH 10/16] =?UTF-8?q?=E2=9C=85=20Moved=20BIQU/BX=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildroot/tests/BTT_SKR_SE_BX | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildroot/tests/BTT_SKR_SE_BX b/buildroot/tests/BTT_SKR_SE_BX index 8ba87da069..dd8e30d434 100755 --- a/buildroot/tests/BTT_SKR_SE_BX +++ b/buildroot/tests/BTT_SKR_SE_BX @@ -9,5 +9,5 @@ set -e # # Build with the default configurations # -use_example_configs BIQU/BX -exec_test $1 $2 "BIQU/BX" "$3" +use_example_configs BIQU/BX/base +exec_test $1 $2 "BIQU/BX/base" "$3" From 1a5550f6430599df55bdac4350be9a2cdec83607 Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Mon, 20 Oct 2025 00:33:32 +0000 Subject: [PATCH 11/16] [cron] Bump distribution date (2025-10-20) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index 87d1def5b0..cc989daf7a 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2025-10-19" +//#define STRING_DISTRIBUTION_DATE "2025-10-20" /** * The protocol for communication to the host. Protocol indicates communication diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 9021441f79..b891b0bf08 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 "2025-10-19" + #define STRING_DISTRIBUTION_DATE "2025-10-20" #endif /** From 37b5b49cce6287da82deb2cb288057de92d0f984 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 20 Oct 2025 02:25:57 -0500 Subject: [PATCH 12/16] =?UTF-8?q?=F0=9F=93=9D=20Remove=20old=20reference?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration_adv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 122a7a458d..f1feb94688 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1212,7 +1212,7 @@ #define FTM_BATCH_SIZE 100 // Custom Batch size for trajectory generation needed by Ulendo FBS #endif - #define FTM_FS 1000 // (Hz) Frequency for trajectory generation. (Reciprocal of FTM_TS) + #define FTM_FS 1000 // (Hz) Frequency for trajectory generation #if DISABLED(COREXY) #define FTM_STEPPER_FS 20000 // (Hz) Frequency for stepper I/O update From 0279f9cf09a6caa8b7a1213bef4bf92682523734 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 20 Oct 2025 11:50:00 -0500 Subject: [PATCH 13/16] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Use?= =?UTF-8?q?=20Marlin=20maths=20macros?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/AVR/fastio.cpp | 4 ++-- Marlin/src/HAL/SAMD21/eeprom/eeprom_flash.cpp | 2 +- Marlin/src/feature/spindle_laser.h | 4 ++-- Marlin/src/lcd/e3v2/common/dwin_api.cpp | 2 +- Marlin/src/lcd/e3v2/creality/dwin.cpp | 2 +- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 4 ++-- Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp | 8 ++++---- Marlin/src/lcd/e3v2/proui/dwin.cpp | 4 ++-- Marlin/src/lcd/e3v2/proui/menus.cpp | 2 +- Marlin/src/lcd/e3v2/proui/meshviewer.cpp | 2 +- Marlin/src/module/ft_motion.cpp | 14 +++++++------- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Marlin/src/HAL/AVR/fastio.cpp b/Marlin/src/HAL/AVR/fastio.cpp index 7d46afadcb..98fd636ebf 100644 --- a/Marlin/src/HAL/AVR/fastio.cpp +++ b/Marlin/src/HAL/AVR/fastio.cpp @@ -254,7 +254,7 @@ uint16_t set_pwm_frequency_hz(const float hz, const float dca, const float dcb, else { prescaler = 1; SET_CS(5, PRESCALER_1); } count /= float(prescaler); - const float pwm_top = round(count); // Get the rounded count + const float pwm_top = roundf(count); // Get the rounded count ICR5 = (uint16_t)pwm_top - 1; // Subtract 1 for TOP OCR5A = pwm_top * ABS(dca); // Update and scale DCs @@ -280,7 +280,7 @@ uint16_t set_pwm_frequency_hz(const float hz, const float dca, const float dcb, SET_CS(5, PRESCALER_64); // 16MHz / 64 = 250kHz OCR5A = OCR5B = OCR5C = 0; } - return round(count); + return roundf(count); } #endif diff --git a/Marlin/src/HAL/SAMD21/eeprom/eeprom_flash.cpp b/Marlin/src/HAL/SAMD21/eeprom/eeprom_flash.cpp index 1c190495de..0b5323cda4 100644 --- a/Marlin/src/HAL/SAMD21/eeprom/eeprom_flash.cpp +++ b/Marlin/src/HAL/SAMD21/eeprom/eeprom_flash.cpp @@ -83,7 +83,7 @@ bool PersistentStore::access_start() { NVMCTRL->CTRLA.reg = NVMCTRL_CTRLA_CMDEX_KEY | NVMCTRL_CTRLA_CMD_PBC; while (NVMCTRL->INTFLAG.bit.READY == 0) { } - PAGE_SIZE = pow(2,3 + NVMCTRL->PARAM.bit.PSZ); + PAGE_SIZE = POW(2, 3 + NVMCTRL->PARAM.bit.PSZ); ROW_SIZE= PAGE_SIZE * 4; /*NVMCTRL->SEECFG.reg = NVMCTRL_SEECFG_WMODE_BUFFERED; // Buffered mode and segment reallocation active if (NVMCTRL->SEESTAT.bit.RLOCK) diff --git a/Marlin/src/feature/spindle_laser.h b/Marlin/src/feature/spindle_laser.h index 8702bd289a..8305c1fec4 100644 --- a/Marlin/src/feature/spindle_laser.h +++ b/Marlin/src/feature/spindle_laser.h @@ -60,7 +60,7 @@ public: // Convert configured power range to a percentage static constexpr cutter_cpower_t power_floor = TERN(CUTTER_POWER_RELATIVE, SPEED_POWER_MIN, 0); static constexpr uint8_t cpwr_to_pct(const cutter_cpower_t cpwr) { - return cpwr ? round(100.0f * (cpwr - power_floor) / (SPEED_POWER_MAX - power_floor)) : 0; + return cpwr ? LROUND(100.0f * (cpwr - power_floor) / (SPEED_POWER_MAX - power_floor)) : 0; } // Convert config defines from RPM to %, angle or PWM when in Spindle mode @@ -164,7 +164,7 @@ public: */ static cutter_power_t power_to_range(const cutter_power_t pwr, const uint8_t pwrUnit=_CUTTER_POWER(CUTTER_POWER_UNIT)) { static constexpr float - min_pct = TERN(CUTTER_POWER_RELATIVE, 0, TERN(SPINDLE_FEATURE, round(100.0f * (SPEED_POWER_MIN) / (SPEED_POWER_MAX)), SPEED_POWER_MIN)), + min_pct = TERN(CUTTER_POWER_RELATIVE, 0, TERN(SPINDLE_FEATURE, roundf(100.0f * (SPEED_POWER_MIN) / (SPEED_POWER_MAX)), SPEED_POWER_MIN)), max_pct = TERN(SPINDLE_FEATURE, 100, SPEED_POWER_MAX); if (pwr <= 0) return 0; cutter_power_t upwr; diff --git a/Marlin/src/lcd/e3v2/common/dwin_api.cpp b/Marlin/src/lcd/e3v2/common/dwin_api.cpp index 132e8bbb76..619b9283a0 100644 --- a/Marlin/src/lcd/e3v2/common/dwin_api.cpp +++ b/Marlin/src/lcd/e3v2/common/dwin_api.cpp @@ -408,7 +408,7 @@ void dwinDrawFloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t // value: positive unscaled float value void dwinDrawFloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { - const int32_t val = round(value * POW(10, fNum)); + const int32_t val = LROUND(value * POW(10, fNum)); dwinDrawFloatValue(bShow, zeroFill, zeroMode, size, color, bColor, iNum, fNum, x, y, val); } diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 30a179fb9c..bb2c72b572 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -96,7 +96,7 @@ // Minimum unit (0.1) : multiple (10) #define UNITFDIGITS 1 -#define MINUNITMULT pow(10, UNITFDIGITS) +#define MINUNITMULT POW(10, UNITFDIGITS) #define DWIN_VAR_UPDATE_INTERVAL 1024 #define DWIN_SCROLL_UPDATE_INTERVAL SEC_TO_MS(2) diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index 4fbefa3c8b..180d9fa9ca 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -378,8 +378,8 @@ private: dwinDrawRectangle(1, // RGB565 colors: http://www.barth-dev.de/online/rgb565-color-picker/ isnan(bedlevel.z_values[x][y]) ? COLOR_GREY : ( // gray if undefined (bedlevel.z_values[x][y] < 0 ? - (uint16_t)round(0x1F * -bedlevel.z_values[x][y] / (!viewer_asymmetric_range ? rmax : v_min)) << 11 : // red if mesh point value is negative - (uint16_t)round(0x3F * bedlevel.z_values[x][y] / (!viewer_asymmetric_range ? rmax : v_max)) << 5) | // green if mesh point value is positive + (uint16_t)LROUND(0x1F * -bedlevel.z_values[x][y] / (!viewer_asymmetric_range ? rmax : v_min)) << 11 : // red if mesh point value is negative + (uint16_t)LROUND(0x3F * bedlevel.z_values[x][y] / (!viewer_asymmetric_range ? rmax : v_max)) << 5) | // green if mesh point value is positive _MIN(0x1F, (((uint8_t)abs(bedlevel.z_values[x][y]) / 10) * 4))), // + blue stepping for every mm start_x_px, start_y_px, end_x_px, end_y_px ); diff --git a/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp b/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp index b85caaf6cc..7c6ee0491a 100644 --- a/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp +++ b/Marlin/src/lcd/e3v2/proui/bedlevel_tools.cpp @@ -226,10 +226,10 @@ bool BedLevelTools::meshValidate() { const auto start_y_px = padding_y_top + ((GRID_MAX_POINTS_Y) - y - 1) * cell_height_px; const auto end_y_px = start_y_px + cell_height_px - 1 - gridline_width; const float z = bedlevel.z_values[x][y]; - const uint16_t color = isnan(z) ? COLOR_GREY : ( // Gray if undefined - (z < 0 ? uint16_t(round(0x1F * -z / rmax)) << 11 // Red for negative mesh point - : uint16_t(round(0x3F * z / rmax)) << 5) // Green for positive mesh point - | _MIN(0x1F, (uint8_t(abs(z) * 0.4))) // + Blue stepping for every mm + const uint16_t color = isnan(z) ? COLOR_GREY : ( // Gray if undefined + (z < 0 ? uint16_t(LROUND(0x1F * -z / rmax)) << 11 // Red for negative mesh point + : uint16_t(LROUND(0x3F * z / rmax)) << 5) // Green for positive mesh point + | _MIN(0x1F, (uint8_t(abs(z) * 0.4))) // + Blue stepping for every mm ); dwinDrawRectangle(1, color, start_x_px, start_y_px, end_x_px, end_y_px); diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 4ae26a3c77..8d7b678d43 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -2169,13 +2169,13 @@ void autoHome() { queue.inject_P(G28_STR); } void applyZOffset() { TERN_(EEPROM_SETTINGS, settings.save()); } void liveZOffset() { #if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) - const float step_zoffset = round((menuData.value / 100.0f) * planner.settings.axis_steps_per_mm[Z_AXIS]) - babystep.accum; + const float step_zoffset = roundf((menuData.value / 100.0f) * planner.settings.axis_steps_per_mm[Z_AXIS]) - babystep.accum; if (BABYSTEP_ALLOWED()) babystep.add_steps(Z_AXIS, step_zoffset); #endif } void setZOffset() { #if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) - babystep.accum = round(planner.settings.axis_steps_per_mm[Z_AXIS] * BABY_Z_VAR); + babystep.accum = LROUND(planner.settings.axis_steps_per_mm[Z_AXIS] * BABY_Z_VAR); #endif setPFloatOnClick(PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX, 2, applyZOffset, liveZOffset); } diff --git a/Marlin/src/lcd/e3v2/proui/menus.cpp b/Marlin/src/lcd/e3v2/proui/menus.cpp index 0451944645..a3d159ff8a 100644 --- a/Marlin/src/lcd/e3v2/proui/menus.cpp +++ b/Marlin/src/lcd/e3v2/proui/menus.cpp @@ -213,7 +213,7 @@ void setValueOnClick(uint8_t process, const int32_t lo, const int32_t hi, const // liveUpdate: live update function when the encoder changes // apply: update function when the encoder is pressed void setValueOnClick(uint8_t process, const float lo, const float hi, uint8_t dp, const float val, void (*apply)()/*=nullptr*/, void (*liveUpdate)()/*=nullptr*/) { - const int32_t value = round(val * POW(10, dp)); + const int32_t value = LROUND(val * POW(10, dp)); setOnClick(process, lo * POW(10, dp), hi * POW(10, dp), dp, value, apply, liveUpdate); DrawItemEdit(true); } diff --git a/Marlin/src/lcd/e3v2/proui/meshviewer.cpp b/Marlin/src/lcd/e3v2/proui/meshviewer.cpp index e167af5665..54904ad8b9 100644 --- a/Marlin/src/lcd/e3v2/proui/meshviewer.cpp +++ b/Marlin/src/lcd/e3v2/proui/meshviewer.cpp @@ -75,7 +75,7 @@ void MeshViewer::drawMeshGrid(const uint8_t csizex, const uint8_t csizey) { void MeshViewer::drawMeshPoint(const uint8_t x, const uint8_t y, const float z) { const uint8_t fs = DWINUI::fontWidth(meshfont); - const int16_t v = isnan(z) ? 0 : round(z * 100); + const int16_t v = isnan(z) ? int16_t(0) : int16_t(LROUND(z * 100)); NOLESS(max, z); NOMORE(min, z); const uint16_t color = DWINUI::rainbowInt(v, zmin, zmax); diff --git a/Marlin/src/module/ft_motion.cpp b/Marlin/src/module/ft_motion.cpp index 5b2db32626..a72fe13fd6 100644 --- a/Marlin/src/module/ft_motion.cpp +++ b/Marlin/src/module/ft_motion.cpp @@ -302,7 +302,7 @@ void FTMotion::loop() { case ftMotionShaper_2HEI: { max_i = 3U; const float vtolx2 = sq(vtol); - const float X = pow(vtolx2 * (sqrt(1.0f - vtolx2) + 1.0f), 1.0f / 3.0f); + const float X = POW(vtolx2 * (sqrt(1.0f - vtolx2) + 1.0f), 1.0f / 3.0f); Ai[0] = (3.0f * sq(X) + 2.0f * X + 3.0f * vtolx2) / (16.0f * X); Ai[1] = (0.5f - Ai[0]) * K; Ai[2] = Ai[1] * K; @@ -348,28 +348,28 @@ void FTMotion::loop() { const float df = sqrt ( 1.f - sq(zeta) ); switch (shaper) { case ftMotionShaper_ZV: - Ni[1] = round((0.5f / f / df) * (FTM_FS)); + Ni[1] = LROUND((0.5f / f / df) * (FTM_FS)); break; case ftMotionShaper_ZVD: case ftMotionShaper_EI: - Ni[1] = round((0.5f / f / df) * (FTM_FS)); + Ni[1] = LROUND((0.5f / f / df) * (FTM_FS)); Ni[2] = Ni[1] + Ni[1]; break; case ftMotionShaper_ZVDD: case ftMotionShaper_2HEI: - Ni[1] = round((0.5f / f / df) * (FTM_FS)); + Ni[1] = LROUND((0.5f / f / df) * (FTM_FS)); Ni[2] = Ni[1] + Ni[1]; Ni[3] = Ni[2] + Ni[1]; break; case ftMotionShaper_ZVDDD: case ftMotionShaper_3HEI: - Ni[1] = round((0.5f / f / df) * (FTM_FS)); + Ni[1] = LROUND((0.5f / f / df) * (FTM_FS)); Ni[2] = Ni[1] + Ni[1]; Ni[3] = Ni[2] + Ni[1]; Ni[4] = Ni[3] + Ni[1]; break; case ftMotionShaper_MZV: - Ni[1] = round((0.375f / f / df) * (FTM_FS)); + Ni[1] = LROUND((0.375f / f / df) * (FTM_FS)); Ni[2] = Ni[1] + Ni[1]; break; case ftMotionShaper_NONE: @@ -383,7 +383,7 @@ void FTMotion::loop() { float centroid = 0.0f; for (uint8_t i = 1; i <= max_i; ++i) centroid -= Ai[i] * Ni[i]; - Ni[0] = round(centroid); + Ni[0] = LROUND(centroid); // The resulting echo index can be negative, this is ok because it will be offset // by the max delay of all axes before it is used. From cfac54924091da65deb93e6010c0064dbfd939bd Mon Sep 17 00:00:00 2001 From: narno2202 <130909513+narno2202@users.noreply.github.com> Date: Mon, 20 Oct 2025 19:54:13 +0200 Subject: [PATCH 14/16] =?UTF-8?q?=F0=9F=9A=B8=20Fix=20MKS=20H43=20float=20?= =?UTF-8?q?display=20(#28121)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/extui/dgus/DGUSScreenHandlerBase.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/extui/dgus/DGUSScreenHandlerBase.h b/Marlin/src/lcd/extui/dgus/DGUSScreenHandlerBase.h index ceaeb7cd7f..017b38430d 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSScreenHandlerBase.h +++ b/Marlin/src/lcd/extui/dgus/DGUSScreenHandlerBase.h @@ -199,7 +199,7 @@ public: if (var.memadr) { float f = *(float *)var.memadr; f *= cpow(10, decimals); - dgus.writeVariable(var.VP, (long)f); + dgus.writeVariable(var.VP, LROUND(f)); } } @@ -212,7 +212,7 @@ public: float f = *(float *)var.memadr; DEBUG_ECHOLNPGM(" >> ", p_float_t(f, 6)); f *= cpow(10, decimals); - dgus.writeVariable(var.VP, (int16_t)f); + dgus.writeVariable(var.VP, (int16_t)LROUND(f)); } } From 8acd39c4941e48bc07b0d6c3cd887692b68b795f Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 20 Oct 2025 18:13:08 -0500 Subject: [PATCH 15/16] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Prefer=20multiply=20?= =?UTF-8?q?over=20divide?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/GD32_MFL/temp_soc.h | 2 +- Marlin/src/HAL/TEENSY40_41/HAL.cpp | 2 +- Marlin/src/feature/bedlevel/bdl/bdl.cpp | 2 +- Marlin/src/feature/dac/stepper_dac.cpp | 2 +- Marlin/src/feature/filwidth.h | 2 +- Marlin/src/feature/probe_temp_comp.cpp | 2 +- Marlin/src/gcode/calibrate/G33.cpp | 8 ++-- Marlin/src/lcd/e3v2/creality/dwin.cpp | 2 +- Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 6 +-- Marlin/src/lcd/e3v2/proui/dwin.cpp | 2 +- .../src/lcd/extui/dgus/DGUSScreenHandler.cpp | 2 +- .../lcd/extui/dgus/mks/DGUSScreenHandler.cpp | 2 +- .../lcd/extui/dgus_reloaded/DGUSTxHandler.cpp | 2 +- Marlin/src/lcd/extui/ui_api.cpp | 2 +- Marlin/src/lcd/sovol_rts/sovol_rts.cpp | 44 +++++++++---------- Marlin/src/libs/numtostr.cpp | 2 +- Marlin/src/module/planner.cpp | 2 +- Marlin/src/module/temperature.cpp | 6 +-- 18 files changed, 46 insertions(+), 46 deletions(-) diff --git a/Marlin/src/HAL/GD32_MFL/temp_soc.h b/Marlin/src/HAL/GD32_MFL/temp_soc.h index 5f1be64e43..bd78fba5b9 100644 --- a/Marlin/src/HAL/GD32_MFL/temp_soc.h +++ b/Marlin/src/HAL/GD32_MFL/temp_soc.h @@ -26,4 +26,4 @@ #define TS_TYPICAL_SLOPE 4.5 // TODO: Implement voltage scaling (calibrated Vrefint) and ADC resolution scaling (when applicable) -#define TEMP_SOC_SENSOR(RAW) ((TS_TYPICAL_V - (RAW) / float(OVERSAMPLENR) / float(HAL_ADC_RANGE) * (float(ADC_VREF_MV) / 1000.0f)) / ((TS_TYPICAL_SLOPE) / 1000.0f) + TS_TYPICAL_TEMP) +#define TEMP_SOC_SENSOR(RAW) ((TS_TYPICAL_V - (RAW) / float(OVERSAMPLENR) / float(HAL_ADC_RANGE) * (float(ADC_VREF_MV) * 0.001f)) / ((TS_TYPICAL_SLOPE) * 0.001f) + TS_TYPICAL_TEMP) diff --git a/Marlin/src/HAL/TEENSY40_41/HAL.cpp b/Marlin/src/HAL/TEENSY40_41/HAL.cpp index 1f27a283f7..3a1f06095b 100644 --- a/Marlin/src/HAL/TEENSY40_41/HAL.cpp +++ b/Marlin/src/HAL/TEENSY40_41/HAL.cpp @@ -98,7 +98,7 @@ void MarlinHAL::clear_reset_source() { #define WDT_TIMEOUT TERN(WATCHDOG_DURATION_8S, 8, 4) // 4 or 8 second timeout - constexpr uint8_t timeoutval = (WDT_TIMEOUT - 0.5f) / 0.5f; + constexpr uint8_t timeoutval = (WDT_TIMEOUT - 0.5f) * 2.0f; void MarlinHAL::watchdog_init() { CCM_CCGR3 |= CCM_CCGR3_WDOG1(3); // enable WDOG1 clocks diff --git a/Marlin/src/feature/bedlevel/bdl/bdl.cpp b/Marlin/src/feature/bedlevel/bdl/bdl.cpp index 7e9d583cc1..ea4bcc0607 100644 --- a/Marlin/src/feature/bedlevel/bdl/bdl.cpp +++ b/Marlin/src/feature/bedlevel/bdl/bdl.cpp @@ -101,7 +101,7 @@ bool BDS_Leveling::check(const uint16_t data, const bool raw_data/*=false*/, con } float BDS_Leveling::interpret(const uint16_t data) { - return (data & 0x3FF) / 100.0f; + return (data & 0x3FF) * 0.01f; } float BDS_Leveling::read() { diff --git a/Marlin/src/feature/dac/stepper_dac.cpp b/Marlin/src/feature/dac/stepper_dac.cpp index f5664bc598..cd73eb17e2 100644 --- a/Marlin/src/feature/dac/stepper_dac.cpp +++ b/Marlin/src/feature/dac/stepper_dac.cpp @@ -68,7 +68,7 @@ void StepperDAC::set_current_value(const uint8_t channel, uint16_t val) { } void StepperDAC::set_current_percent(const uint8_t channel, float val) { - set_current_value(channel, _MIN(val, 100.0f) * (DAC_STEPPER_MAX) / 100.0f); + set_current_value(channel, _MIN(val, 100.0f) * (DAC_STEPPER_MAX) * 0.01f); } static float dac_perc(int8_t n) { return mcp4728.getDrvPct(dac_order[n]); } diff --git a/Marlin/src/feature/filwidth.h b/Marlin/src/feature/filwidth.h index d9e2a00025..a16240936a 100644 --- a/Marlin/src/feature/filwidth.h +++ b/Marlin/src/feature/filwidth.h @@ -67,7 +67,7 @@ public: } // Convert raw measurement to mm - static float raw_to_mm(const uint16_t v) { return v * (float(ADC_VREF_MV) / 1000.0f) * RECIPROCAL(float(MAX_RAW_THERMISTOR_VALUE)); } + static float raw_to_mm(const uint16_t v) { return v * (float(ADC_VREF_MV) * 0.001f) * RECIPROCAL(float(MAX_RAW_THERMISTOR_VALUE)); } static float raw_to_mm() { return raw_to_mm(raw); } // A scaled reading is ready diff --git a/Marlin/src/feature/probe_temp_comp.cpp b/Marlin/src/feature/probe_temp_comp.cpp index 413beda161..7dfa28f4b9 100644 --- a/Marlin/src/feature/probe_temp_comp.cpp +++ b/Marlin/src/feature/probe_temp_comp.cpp @@ -212,7 +212,7 @@ void ProbeTempComp::compensate_measurement(const TempSensorID tsi, const celsius } // convert offset to mm and apply it - meas_z -= offset / 1000.0f; + meas_z -= offset * 0.001f; } bool ProbeTempComp::linear_regression(const TempSensorID tsi, float &k, float &d) { diff --git a/Marlin/src/gcode/calibrate/G33.cpp b/Marlin/src/gcode/calibrate/G33.cpp index 11c3cdca78..1eabb30ffa 100644 --- a/Marlin/src/gcode/calibrate/G33.cpp +++ b/Marlin/src/gcode/calibrate/G33.cpp @@ -154,7 +154,7 @@ static float std_dev_points(float z_pt[NPP + 1], const bool _0p_cal, const bool S2 += sq(z_pt[rad]); N++; } - return LROUND(SQRT(S2 / N) * 1000.0f) / 1000.0f + 0.00001f; + return LROUND(SQRT(S2 / N) * 1000.0f) * 0.001f + 0.00001f; } } return 0.00001f; @@ -315,7 +315,7 @@ static void calc_kinematics_diff_probe_points(float z_pt[NPP + 1], const float d static float auto_tune_h(const float dcr) { const float r_quot = dcr / delta_radius; - return RECIPROCAL(r_quot / (2.0f / 3.0f)); // (2/3)/CR + return RECIPROCAL(r_quot * (3.0f / 2.0f)); // (2/3)/CR } static float auto_tune_r(const float dcr) { @@ -490,7 +490,7 @@ void GcodeSuite::G33() { float z_at_pt[NPP + 1] = { 0.0f }; - test_precision = zero_std_dev_old != 999.0f ? (zero_std_dev + zero_std_dev_old) / 2.0f : zero_std_dev; + test_precision = zero_std_dev_old != 999.0f ? (zero_std_dev + zero_std_dev_old) * 0.5f : zero_std_dev; iterations++; // Probe the points @@ -527,7 +527,7 @@ void GcodeSuite::G33() { * - Definition of the matrix scaling parameters * - Matrices for 4 and 7 point calibration */ - #define ZP(N,I) ((N) * z_at_pt[I] / 4.0f) // 4.0 = divider to normalize to integers + #define ZP(N,I) ((N) * z_at_pt[I] * 0.25f) // 4.0 = divider to normalize to integers #define Z12(I) ZP(12, I) #define Z4(I) ZP(4, I) #define Z2(I) ZP(2, I) diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index bb2c72b572..06e3321288 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -1388,7 +1388,7 @@ void hmiMoveDone(const AxisEnum axis) { LIMIT(hmiValues.offset_value, _OFFSET_ZMIN * 100, _OFFSET_ZMAX * 100); last_zoffset = dwin_zoffset; - dwin_zoffset = hmiValues.offset_value / 100.0f; + dwin_zoffset = hmiValues.offset_value * 0.01f; #if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) if (BABYSTEP_ALLOWED()) babystep.add_mm(Z_AXIS, dwin_zoffset - last_zoffset); #endif diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index 180d9fa9ca..2870524dea 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -1523,7 +1523,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra if (use_probe) { #if HAS_BED_PROBE gcode.process_subcommands_now( - TS(F("G0F4000\nG0Z10\nG0X"), p_float_t((X_MAX_POS) / 2.0f - probe.offset.x, 3), 'Y', p_float_t((Y_MAX_POS) / 2.0f - probe.offset.y, 3)) + TS(F("G0F4000\nG0Z10\nG0X"), p_float_t((X_MAX_POS) * 0.5f - probe.offset.x, 3), 'Y', p_float_t((Y_MAX_POS) * 0.5f - probe.offset.y, 3)) ); planner.synchronize(); popupHandler(Popup_ManualProbing); @@ -5112,7 +5112,7 @@ void JyersDWIN::loadSettings(const char * const buff) { memcpy(&eeprom_settings, buff, _MIN(sizeof(eeprom_settings), eeprom_data_size)); TERN_(AUTO_BED_LEVELING_UBL, mesh_conf.tilt_grid = eeprom_settings.tilt_grid_size + 1); if (eeprom_settings.corner_pos == 0) eeprom_settings.corner_pos = 325; - corner_pos = eeprom_settings.corner_pos / 10.0f; + corner_pos = eeprom_settings.corner_pos * 0.1f; redrawScreen(); #if ENABLED(POWER_LOSS_RECOVERY) static bool init = true; @@ -5139,7 +5139,7 @@ void JyersDWIN::resetSettings() { eeprom_settings.coordinates_text = 0; eeprom_settings.coordinates_split_line = 0; TERN_(AUTO_BED_LEVELING_UBL, mesh_conf.tilt_grid = eeprom_settings.tilt_grid_size + 1); - corner_pos = eeprom_settings.corner_pos / 10.0f; + corner_pos = eeprom_settings.corner_pos * 0.1f; TERN_(SOUND_MENU_ITEM, ui.sound_on = ENABLED(SOUND_ON_DEFAULT)); redrawScreen(); } diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index 8d7b678d43..d6718305c2 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -2169,7 +2169,7 @@ void autoHome() { queue.inject_P(G28_STR); } void applyZOffset() { TERN_(EEPROM_SETTINGS, settings.save()); } void liveZOffset() { #if ANY(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) - const float step_zoffset = roundf((menuData.value / 100.0f) * planner.settings.axis_steps_per_mm[Z_AXIS]) - babystep.accum; + const float step_zoffset = roundf((menuData.value * 0.01f) * planner.settings.axis_steps_per_mm[Z_AXIS]) - babystep.accum; if (BABYSTEP_ALLOWED()) babystep.add_steps(Z_AXIS, step_zoffset); #endif } diff --git a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp index 79353a4e23..84b27eec51 100644 --- a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp @@ -542,7 +542,7 @@ void DGUSScreenHandler::handleSettings(DGUS_VP_Variable &var, void *val_ptr) { #if HAS_BED_PROBE void DGUSScreenHandler::handleProbeOffsetZChanged(DGUS_VP_Variable &var, void *val_ptr) { - const float offset = float(int16_t(BE16_P(val_ptr))) / 100.0f; + const float offset = float(int16_t(BE16_P(val_ptr))) * 0.01f; ExtUI::setZOffset_mm(offset); skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel return; diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index 2a9ba87d68..010e1be381 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -382,7 +382,7 @@ void DGUSScreenHandlerMKS::zOffsetSelect(DGUS_VP_Variable &var, void *val_ptr) { void DGUSScreenHandlerMKS::getOffsetValue(DGUS_VP_Variable &var, void *val_ptr) { #if HAS_BED_PROBE - const float offset = BE32_P(val_ptr) / 100.0f; + const float offset = BE32_P(val_ptr) * 0.01f; switch (var.VP) { default: break; case VP_OFFSET_X: probe.offset.x = offset; break; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp index 1212f715c0..a2327d025f 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp @@ -183,7 +183,7 @@ void DGUSTxHandler::zPosition(DGUS_VP &vp) { const float position = ExtUI::isAxisPositionKnown(ExtUI::Z) ? planner.get_axis_position_mm(Z_AXIS) : 0; - const int32_t data = dgus.toFixedPoint(int32_t(position * 50.0f) / 50.0f); // Round to 0.02 + const int32_t data = dgus.toFixedPoint(int32_t(position * 50.0f) * 0.02f); // Round to 0.02 dgus.write((uint16_t)vp.addr, dgus.swapBytes(data)); } diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index 5f69d4424a..75caf8a85c 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -850,7 +850,7 @@ namespace ExtUI { { backlash.set_distance_mm((AxisEnum)axis, constrain(value,0,5)); } float getBacklashCorrection_percent() { return backlash.get_correction() * 100.0f; } - void setBacklashCorrection_percent(const float value) { backlash.set_correction(constrain(value, 0, 100) / 100.0f); } + void setBacklashCorrection_percent(const float value) { backlash.set_correction(constrain(value, 0, 100) * 0.01f); } #ifdef BACKLASH_SMOOTHING_MM float getBacklashSmoothing_mm() { return backlash.get_smoothing_mm(); } diff --git a/Marlin/src/lcd/sovol_rts/sovol_rts.cpp b/Marlin/src/lcd/sovol_rts/sovol_rts.cpp index 3c09838684..c982a2cc32 100644 --- a/Marlin/src/lcd/sovol_rts/sovol_rts.cpp +++ b/Marlin/src/lcd/sovol_rts/sovol_rts.cpp @@ -838,7 +838,7 @@ void RTS::handleData() { #endif case Heater0LoadEnterKey: - filament_load_0 = float(recdat.data[0]) / 10.0f; + filament_load_0 = float(recdat.data[0]) * 0.1f; break; case AxisPageSelectKey: // Mobile shaft interface @@ -948,7 +948,7 @@ void RTS::handleData() { #if HAS_X_AXIS case XaxismoveKey: { waitway = 4; - current_position.x = float(recdat.data[0] >= 32768 ? recdat.data[0] - 65536 : recdat.data[0]) / 10.0f; + current_position.x = float(recdat.data[0] >= 32768 ? recdat.data[0] - 65536 : recdat.data[0]) * 0.1f; LIMIT(current_position.x, X_MIN_POS, X_MAX_POS); RTS_line_to_current(X_AXIS); sendData(current_position.x * 10.0f, AXIS_X_COORD_VP); @@ -960,7 +960,7 @@ void RTS::handleData() { #if HAS_Y_AXIS case YaxismoveKey: { waitway = 4; - current_position.y = float(recdat.data[0]) / 10.0f; + current_position.y = float(recdat.data[0]) * 0.1f; LIMIT(current_position.y, Y_MIN_POS, Y_MAX_POS); RTS_line_to_current(Y_AXIS); sendData(current_position.y * 10.0f, AXIS_Y_COORD_VP); @@ -972,7 +972,7 @@ void RTS::handleData() { #if HAS_Z_AXIS case ZaxismoveKey: { waitway = 4; - current_position.z = float(recdat.data[0]) / 10.0f; + current_position.z = float(recdat.data[0]) * 0.1f; LIMIT(current_position.z, Z_MIN_POS, Z_MAX_POS); RTS_line_to_current(Z_AXIS); sendData(current_position.z * 10.0f, AXIS_Z_COORD_VP); @@ -1229,7 +1229,7 @@ void RTS::handleData() { case 1: { // PID #if ENABLED(PIDTEMP) const float hot_p = thermalManager.temp_hotend[0].pid.p() * 100.0f, - hot_i = (thermalManager.temp_hotend[0].pid.i() / 8.0f * 10000.0f) + 0.00001f, + hot_i = (thermalManager.temp_hotend[0].pid.i() * 0.125f * 10000.0f) + 0.00001f, hot_d = thermalManager.temp_hotend[0].pid.d() * 8.0f; sendData(hot_p, Nozzle_P_VP); sendData(hot_i, Nozzle_I_VP); @@ -1238,7 +1238,7 @@ void RTS::handleData() { #if ENABLED(PIDTEMPBED) const float bed_p = thermalManager.temp_bed.pid.p() * 100.0f, - bed_i = (thermalManager.temp_bed.pid.i() / 8.0f * 10000.0f) + 0.0001f, + bed_i = (thermalManager.temp_bed.pid.i() * 0.125f * 10000.0f) + 0.0001f, bed_d = thermalManager.temp_bed.pid.d() * 0.8f; sendData(bed_p, Hot_Bed_P_VP); @@ -1306,51 +1306,51 @@ void RTS::handleData() { break; #if ENABLED(PIDTEMP) - case Nozzle_P: SET_HOTEND_PID(Kp, 0, float(recdat.data[0]) / 100.0f); thermalManager.updatePID(); break; - case Nozzle_I: SET_HOTEND_PID(Ki, 0, float(recdat.data[0]) * 8.0f / 10000.0f); thermalManager.updatePID(); break; - case Nozzle_D: SET_HOTEND_PID(Kd, 0, float(recdat.data[0]) / 8.0f); thermalManager.updatePID(); break; + case Nozzle_P: SET_HOTEND_PID(Kp, 0, float(recdat.data[0]) * 0.01f); thermalManager.updatePID(); break; + case Nozzle_I: SET_HOTEND_PID(Ki, 0, float(recdat.data[0]) * 8.0f * 0.0001f); thermalManager.updatePID(); break; + case Nozzle_D: SET_HOTEND_PID(Kd, 0, float(recdat.data[0]) * 0.125f); thermalManager.updatePID(); break; #endif #if ENABLED(PIDTEMPBED) - case Hot_Bed_P: thermalManager.temp_bed.pid.set_Kp(float(recdat.data[0]) / 100.0f); break; - case Hot_Bed_I: thermalManager.temp_bed.pid.set_Ki(float(recdat.data[0]) * 8.0f / 10000.0f); break; - case Hot_Bed_D: thermalManager.temp_bed.pid.set_Kd(float(recdat.data[0]) / 0.8f); break; + case Hot_Bed_P: thermalManager.temp_bed.pid.set_Kp(float(recdat.data[0]) * 0.01f); break; + case Hot_Bed_I: thermalManager.temp_bed.pid.set_Ki(float(recdat.data[0]) * 8.0f * 0.0001f); break; + case Hot_Bed_D: thermalManager.temp_bed.pid.set_Kd(float(recdat.data[0]) * 1.25); break; #endif #if HAS_X_AXIS case Vmax_X: planner.settings.max_feedrate_mm_s[X_AXIS] = recdat.data[0]; break; case Amax_X: planner.settings.max_acceleration_mm_per_s2[X_AXIS] = recdat.data[0]; break; - case Steps_X: planner.settings.axis_steps_per_mm[X_AXIS] = float(recdat.data[0]) / 10.0f; break; + case Steps_X: planner.settings.axis_steps_per_mm[X_AXIS] = float(recdat.data[0]) * 0.1f; break; #if ENABLED(CLASSIC_JERK) - case Jerk_X: planner.max_jerk.x = float(recdat.data[0]) / 10.0f; break; + case Jerk_X: planner.max_jerk.x = float(recdat.data[0]) * 0.1f; break; #endif #endif #if HAS_Y_AXIS case Vmax_Y: planner.settings.max_feedrate_mm_s[Y_AXIS] = recdat.data[0]; break; case Amax_Y: planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = recdat.data[0]; break; - case Steps_Y: planner.settings.axis_steps_per_mm[Y_AXIS] = float(recdat.data[0]) / 10.0f; break; + case Steps_Y: planner.settings.axis_steps_per_mm[Y_AXIS] = float(recdat.data[0]) * 0.1f; break; #if ENABLED(CLASSIC_JERK) - case Jerk_Y: planner.max_jerk.y = float(recdat.data[0]) / 10.0f; break; + case Jerk_Y: planner.max_jerk.y = float(recdat.data[0]) * 0.1f; break; #endif #endif #if HAS_Z_AXIS case Vmax_Z: planner.settings.max_feedrate_mm_s[Z_AXIS] = recdat.data[0]; break; case Amax_Z: planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = recdat.data[0]; break; - case Steps_Z: planner.settings.axis_steps_per_mm[Z_AXIS] = float(recdat.data[0]) / 10.0f; break; + case Steps_Z: planner.settings.axis_steps_per_mm[Z_AXIS] = float(recdat.data[0]) * 0.1f; break; #if ENABLED(CLASSIC_JERK) - case Jerk_Z: planner.max_jerk.z = float(recdat.data[0]) / 10.0f; break; + case Jerk_Z: planner.max_jerk.z = float(recdat.data[0]) * 0.1f; break; #endif #endif #if HAS_HOTEND case Vmax_E: planner.settings.max_feedrate_mm_s[E_AXIS] = recdat.data[0]; break; case Amax_E: planner.settings.max_acceleration_mm_per_s2[E_AXIS] = recdat.data[0]; break; - case Steps_E: planner.settings.axis_steps_per_mm[E_AXIS] = float(recdat.data[0]) / 10.0f; break; + case Steps_E: planner.settings.axis_steps_per_mm[E_AXIS] = float(recdat.data[0]) * 0.1f; break; #if ENABLED(CLASSIC_JERK) - case Jerk_E: planner.max_jerk.e = float(recdat.data[0]) / 10.0f; break; + case Jerk_E: planner.max_jerk.e = float(recdat.data[0]) * 0.1f; break; #endif case A_Retract: planner.settings.retract_acceleration = recdat.data[0]; break; #if ENABLED(LIN_ADVANCE) - case Advance_K: planner.set_advance_k(float(recdat.data[0]) / 100.0f); break; + case Advance_K: planner.set_advance_k(float(recdat.data[0]) * 0.01f); break; #endif #endif case Accel: planner.settings.acceleration = recdat.data[0]; break; @@ -1384,7 +1384,7 @@ void RTS::handleData() { case ZOffsetKey: last_zoffset = zprobe_zoffset; - zprobe_zoffset = float(recdat.data[0] >= 32767 ? recdat.data[0] - 65537 : recdat.data[0]) / 100.0f + 0.0001f; + zprobe_zoffset = float(recdat.data[0] >= 32767 ? recdat.data[0] - 65537 : recdat.data[0]) * 0.01f + 0.0001f; if (WITHIN(zprobe_zoffset, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX)) babystep.add_mm(Z_AXIS, zprobe_zoffset - last_zoffset); probe.offset.z = zprobe_zoffset; diff --git a/Marlin/src/libs/numtostr.cpp b/Marlin/src/libs/numtostr.cpp index ec097f203f..43ecf018d7 100644 --- a/Marlin/src/libs/numtostr.cpp +++ b/Marlin/src/libs/numtostr.cpp @@ -41,7 +41,7 @@ template constexpr char MINUSOR(T &n, const char alt) { return (n >= 0) ? alt : (n = -n) ? '-' : '-'; } constexpr long INTFLOAT(const float V, const int N) { - return long((V * 10.0f * pow(10.0f, N) + (V < 0.0f ? -5.0f : 5.0f)) / 10.0f); + return long((V * 10.0f * pow(10.0f, N) + (V < 0.0f ? -5.0f : 5.0f)) * 0.1f); } constexpr long UINTFLOAT(const float V, const int N) { return INTFLOAT(V < 0.0f ? -V : V, N); diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index e48a55ae48..b088c0b392 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -3069,7 +3069,7 @@ bool Planner::buffer_line(const xyze_pos_t &cart, const feedRate_t fr_mm_s calculated_feedrate = settings.max_feedrate_mm_s[Y_AXIS]; else { // Normalized vector of movement - const float diffBLength = ABS((2.0f * M_PI * diff.a) * (diff.b / 360.0f)), + const float diffBLength = ABS((2.0f * M_PI * diff.a) * (diff.b * 0.002777777778)), // ÷ 360 diffTheta = DEGREES(ATAN2(diff.a, diffBLength)), normalizedTheta = 1.0f - (ABS(diffTheta > 90.0f ? 180.0f - diffTheta : diffTheta) / 90.0f); diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index a3f625c0eb..fa84cec25d 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -1122,7 +1122,7 @@ void Temperature::factory_reset() { if (ELAPSED(curr_time_ms, next_test_ms)) { if (current_temp >= ambient_temp) { - ambient_temp = (ambient_temp + current_temp) / 2.0f; + ambient_temp = (ambient_temp + current_temp) * 0.5f; break; } ambient_temp = current_temp; @@ -1884,7 +1884,7 @@ void Temperature::mintemp_error(const heater_id_t heater_id OPTARG(ERR_INCLUDE_T float power = 0.0; if (hotend.target != 0 && !is_idling) { // Plan power level to get to target temperature in 2 seconds - power = (hotend.target - hotend.modeled_block_temp) * mpc.block_heat_capacity / 2.0f; + power = (hotend.target - hotend.modeled_block_temp) * mpc.block_heat_capacity * 0.5f; power -= (hotend.modeled_ambient_temp - hotend.modeled_block_temp) * ambient_xfer_coeff; } @@ -2602,7 +2602,7 @@ void Temperature::task() { #if ANY_THERMISTOR_IS(-1) // For a 5V input the AD595 returns a value scaled with 10mV per °C. (Minimum input voltage is 5V.) static constexpr celsius_float_t temp_ad595(const raw_adc_t raw) { - return raw * (float(ADC_VREF_MV) / 10.0f) / float(HAL_ADC_RANGE) / (OVERSAMPLENR) + return raw * (float(ADC_VREF_MV) * 0.1f) / float(HAL_ADC_RANGE) / (OVERSAMPLENR) * (TEMP_SENSOR_AD595_GAIN) + (TEMP_SENSOR_AD595_OFFSET); } #endif From 7aaaaec355bdf9aff92a4d45d16dcc9f9217f7ba Mon Sep 17 00:00:00 2001 From: thinkyhead Date: Tue, 21 Oct 2025 00:32:13 +0000 Subject: [PATCH 16/16] [cron] Bump distribution date (2025-10-21) --- Marlin/Version.h | 2 +- Marlin/src/inc/Version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Version.h b/Marlin/Version.h index cc989daf7a..0b2327bf76 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2025-10-20" +//#define STRING_DISTRIBUTION_DATE "2025-10-21" /** * The protocol for communication to the host. Protocol indicates communication diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index b891b0bf08..ec39ffec56 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 "2025-10-20" + #define STRING_DISTRIBUTION_DATE "2025-10-21" #endif /**