Skip to content

Commit c02cb9f

Browse files
committed
USE_FREEZE_PIN => NO_FREEZE_PIN
1 parent 95ff8a0 commit c02cb9f

File tree

9 files changed

+26
-31
lines changed

9 files changed

+26
-31
lines changed

Marlin/Configuration_adv.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2801,8 +2801,8 @@
28012801
*
28022802
* Adds support for commands:
28032803
* S000 : Report State and Position while moving.
2804-
* P000 : Instant Pause / Hold while moving.
2805-
* R000 : Resume from Pause / Hold.
2804+
* P000 : Instant Pause / Hold while moving. Requires FREEZE_FEATURE for soft deceleration.
2805+
* R000 : Resume from Pause / Hold. Requires FREEZE_FEATURE for soft acceleration.
28062806
*
28072807
* - During Hold all Emergency Parser commands are available, as usual.
28082808
* - Enable NANODLP_Z_SYNC and NANODLP_ALL_AXIS for move command end-state reports.
@@ -4433,13 +4433,15 @@
44334433

44344434
/**
44354435
* Freeze / unfreeze functionality
4436-
* Potentially useful for rapid stop that allows being resumed.
4437-
* Rapidly decelerates and halts movement at FREEZE_JERK.
4436+
* Soft feed hold that keeps power available and does not stop the spindle can be initiated with command P000 (requires REALTIME_REPORTING_COMMANDS and EMERGENCY_PARSER) or by using a FREEZE_PIN.
4437+
* Decelerates and halts movement at FREEZE_JERK.
4438+
* Motion can be resumed with command R000 (requires REALTIME_REPORTING_COMMANDS and EMERGENCY_PARSER) or by using the FREEZE_PIN
44384439
* NOTE: Controls Laser PWM but does NOT pause Spindle, Fans, Heaters or other devices.
44394440
* @section freeze
44404441
*/
44414442
//#define FREEZE_FEATURE
44424443
#if ENABLED(FREEZE_FEATURE)
4444+
//NO_FREEZE_PIN // Don't use FREEZE_PIN, only commands P000 and R000
44434445
//#define FREEZE_PIN -1 // Override the default (KILL) pin here
44444446
#define FREEZE_JERK 2 // (mm/s) Completely halt when motion has decelerated below this value
44454447
#define FREEZE_STATE LOW // State of pin indicating freeze

Marlin/src/MarlinCore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ void setup() {
12291229
#endif
12301230
#endif
12311231

1232-
#if ENABLED(USE_FREEZE_PIN)
1232+
#if ENABLED(FREEZE_FEATURE) && DISABLED(NO_FREEZE_PIN)
12331233
SETUP_LOG("FREEZE_PIN");
12341234
#if FREEZE_STATE
12351235
SET_INPUT_PULLDOWN(FREEZE_PIN);

Marlin/src/feature/e_parser.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
/**
2-
* Marlin2ForPipetBot [https://github.com/DerAndere1/Marlin]
3-
* Copyright 2019 - 2026 DerAndere and other Marlin2ForPipetBot authors [https://github.com/DerAndere1/Marlin]
4-
*
5-
* Based on:
62
* Marlin 3D Printer Firmware
7-
* Copyright (c) 2020 - 2025 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3+
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
84
*
95
* Based on Sprinter and grbl.
106
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm

Marlin/src/feature/e_parser.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
/**
2-
* Marlin2ForPipetBot [https://github.com/DerAndere1/Marlin]
3-
* Copyright 2019 - 2026 DerAndere and other Marlin2ForPipetBot authors [https://github.com/DerAndere1/Marlin]
4-
*
5-
* Based on:
62
* Marlin 3D Printer Firmware
7-
* Copyright (c) 2020 - 2025 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
3+
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
84
*
95
* Based on Sprinter and grbl.
106
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm

Marlin/src/inc/Conditionals-5-post.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3049,7 +3049,7 @@
30493049
#endif
30503050

30513051
// User Interface
3052-
#if ENABLED(USE_FREEZE_PIN) && !PIN_EXISTS(FREEZE) && PIN_EXISTS(KILL)
3052+
#if ENABLED(FREEZE_FEATURE) && DISABLED(NO_FREEZE_PIN) && !PIN_EXISTS(FREEZE) && PIN_EXISTS(KILL)
30533053
#define FREEZE_PIN KILL_PIN
30543054
#define FREEZE_STOLE_KILL_PIN_WARNING 1
30553055
#elif PIN_EXISTS(KILL) && TERN1(HAS_FREEZE_PIN, KILL_PIN != FREEZE_PIN)

Marlin/src/inc/SanityCheck.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -581,10 +581,10 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
581581
*/
582582
#if ENABLED(FREEZE_FEATURE) && !defined(FREEZE_JERK)
583583
#error "FREEZE_FEATURE requires FREEZE_JERK."
584-
#elif ENABLED(USE_FREEZE_PIN) && !(defined(FREEZE_PIN)&& defined(FREEZE_STATE))
585-
#error "USE_FREEZE_PIN requires FREEZE_PIN and FREEZE_STATE."
586-
#elif ENABLED(FREEZE_FEATURE) && !(defined(REALTIME_REPORTING_COMMANDS))
587-
#error "FREEZE_FEATURE requires REALTIME_REPORTING_COMMANDS or USE_FREEZE_PIN"
584+
#elif ENABLED(FREEZE_FEATURE) && DISABLED(NO_FREEZE_PIN) && !(defined(FREEZE_PIN) && defined(FREEZE_STATE))
585+
#error "FREEZE_FEATURE requires FREEZE_PIN and FREEZE_STATE."
586+
#elif ENABLED(NO_FREEZE_PIN) && !(defined(REALTIME_REPORTING_COMMANDS))
587+
#error "NO_FREEZE_PIN requires REALTIME_REPORTING_COMMANDS"
588588
#endif
589589

590590
/**

Marlin/src/module/planner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2436,7 +2436,7 @@ bool Planner::_populate_block(
24362436
#if HAS_STANDARD_MOTION
24372437
block->acceleration_steps_per_s2 = accel;
24382438
#if DISABLED(S_CURVE_ACCELERATION)
2439-
block->acceleration_rate = (uint32_t)(accel * (float(_BV32(24)) / (STEPPER_TIMER_RATE)));
2439+
block->acceleration_rate = uint32_t(accel * (float(_BV32(24)) / (STEPPER_TIMER_RATE)));
24402440
#elif ENABLED(FREEZE_FEATURE)
24412441
// No need to waste time calculating the linear acceleration rate until the freeze_pin is triggered, leave this 0
24422442
block->acceleration_rate = 0;

Marlin/src/module/planner.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,12 @@ typedef struct PlannerBlock {
249249
#if ANY(S_CURVE_ACCELERATION, SMOOTH_LIN_ADVANCE)
250250
uint32_t cruise_rate, // The actual cruise rate to use, between end of the acceleration phase and start of deceleration phase
251251
acceleration_time, // Acceleration time and deceleration time in STEP timer counts
252-
deceleration_time,
253-
acceleration_time_inverse, // Inverse of acceleration and deceleration periods, expressed as integer. Scale depends on CPU being used
254-
deceleration_time_inverse;
252+
deceleration_time;
255253
#endif
256-
257-
#if DISABLED(S_CURVE_ACCELERATION) || ENABLED(FREEZE_FEATURE)
254+
#if ENABLED(S_CURVE_ACCELERATION)
255+
uint32_t acceleration_time_inverse, // Inverse of acceleration and deceleration periods, expressed as integer. Scale depends on CPU being used
256+
deceleration_time_inverse;
257+
#elif ENABLED(HAS_STANDARD_MOTION)
258258
uint32_t acceleration_rate; // Acceleration rate in (2^24 steps)/timer_ticks*s
259259
#endif
260260

buildroot/tests/DUE

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ set -e
88

99
restore_configs
1010
opt_set MOTHERBOARD BOARD_RAMPS4DUE_EFB \
11-
TEMP_SENSOR_0 -2 TEMP_SENSOR_BED 2 TEMP_SENSOR_CHAMBER 3 \
12-
TEMP_CHAMBER_PIN 6 HEATER_CHAMBER_PIN 45 \
13-
E0_AUTO_FAN_PIN 8 FANMUX0_PIN 53 FREEZE_PIN 17 \
14-
EXTRUDER_AUTO_FAN_SPEED 100 \
15-
GRID_MAX_POINTS_X 16 BACKLASH_MEASUREMENT_FEEDRATE 600 \
11+
LCD_LANGUAGE bg \
12+
TEMP_SENSOR_0 -2 TEMP_SENSOR_BED 2 \
13+
GRID_MAX_POINTS_X 16 \
14+
E0_AUTO_FAN_PIN 8 FANMUX0_PIN 53 EXTRUDER_AUTO_FAN_SPEED 100 \
15+
TEMP_SENSOR_CHAMBER 3 TEMP_CHAMBER_PIN 6 HEATER_CHAMBER_PIN 45 \
16+
BACKLASH_MEASUREMENT_FEEDRATE 600 \
1617
TRAMMING_POINT_XY '{{20,20},{20,20},{20,20},{20,20},{20,20}}' TRAMMING_POINT_NAME_5 '"Point 5"'
1718
opt_enable S_CURVE_ACCELERATION FREEZE_FEATURE EEPROM_SETTINGS GCODE_MACROS GCODE_MACROS_IN_EEPROM \
1819
FIX_MOUNTED_PROBE Z_SAFE_HOMING CODEPENDENT_XY_HOMING \

0 commit comments

Comments
 (0)