Merge commit 'aa375bcff05744d5d2ab3fd352777abdfb59d35b' into release

This commit is contained in:
2025-02-14 15:29:11 +08:00
6 changed files with 13 additions and 4 deletions

View File

@@ -419,6 +419,7 @@ gcode:
[gcode_macro PROBE_SERVO_CLOSE]
gcode:
SET_SERVO SERVO=probe_servo angle=130
G4 P2000
[gcode_macro _START_PRINT_BASE]
description: Call when starting to print

View File

@@ -355,6 +355,7 @@ gcode:
[gcode_macro PROBE_SERVO_CLOSE]
gcode:
SET_SERVO SERVO=probe_servo angle=130
G4 P2000
[gcode_macro _START_PRINT_BASE]
description: Call when starting to print

View File

@@ -419,6 +419,7 @@ gcode:
[gcode_macro PROBE_SERVO_CLOSE]
gcode:
SET_SERVO SERVO=probe_servo angle=130
G4 P2000
[gcode_macro _START_PRINT_BASE]
description: Call when starting to print

View File

@@ -356,6 +356,7 @@ gcode:
[gcode_macro PROBE_SERVO_CLOSE]
gcode:
SET_SERVO SERVO=probe_servo angle=130
G4 P2000
[gcode_macro _START_PRINT_BASE]
description: Call when starting to print

View File

@@ -570,8 +570,8 @@ gcode:
[gcode_macro PROBE_SERVO_CLOSE]
gcode:
G4 P500
SET_SERVO SERVO=probe_servo angle=165
G4 P2000
[gcode_macro _START_PRINT_BASE]
description: Call when starting to print
@@ -625,6 +625,8 @@ gcode:
[gcode_macro END_PRINT]
gcode:
{% set svv = printer.save_variables.variables %}
{% set y_offset = svv.nozzle_y_offset_val|default(0)|float %}
M400
G92 E0
G1 E-10.0 F3600
@@ -633,6 +635,7 @@ gcode:
{% set dual_mode = printer['gcode_macro _SET_DUAL_MODE'].dual_mode|default("primary") %}
{% if dual_mode == "copy" or dual_mode == "mirror" %}
G0 Z1.00 F6000
_ACTIVATE_PRIMARY_MODE
G90
_PARK_extruder
_PARK_extruder1
@@ -645,7 +648,7 @@ gcode:
M107
G1 Z2 F3000
G90
G0 Y300 F3600
G0 Y{300-(y_offset if printer.toolhead.extruder == 'extruder1' else 0)} F3600
# BED_MESH_CLEAR
[gcode_macro PRINT_END]

View File

@@ -74,11 +74,12 @@ class PrinterServo:
if self.signal_duration:
if abs(self.signal_duration / 0.02 - round(self.signal_duration / 0.02)) < 1e-9:
self.signal_duration -= 0.001
print_time = max(print_time, print_time + self.signal_duration)
print_time = max(print_time + SERVO_SIGNAL_PERIOD, print_time + self.signal_duration)
self.mcu_servo.set_pwm(print_time, 0)
self.last_value_time = print_time
def _handle_ready(self):
print_time = self.printer.lookup_object('toolhead').get_last_move_time()
self._handle_signal_duration(print_time)
self._set_pwm(print_time, self.initial_pwm)
def _get_pwm_from_angle(self, angle):
angle = max(0., min(self.max_angle, angle))
width = self.min_width + angle * self.angle_to_width
@@ -90,6 +91,7 @@ class PrinterServo:
cmd_SET_SERVO_help = "Set servo angle"
def cmd_SET_SERVO(self, gcmd):
print_time = self.printer.lookup_object('toolhead').get_last_move_time()
print_time = max(print_time, self.last_value_time)
width = gcmd.get_float('WIDTH', None)
if width is not None:
if self.steps_decomposed: