From 1204d6bb2ccd61f03decd0b489b04f537db2e901 Mon Sep 17 00:00:00 2001 From: Marcus Date: Thu, 28 Dec 2023 19:55:44 +0100 Subject: [PATCH] add options for grbl and for prepending dwell time --- laser/laser.inx | 2 ++ laser/laser.py | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/laser/laser.inx b/laser/laser.inx index ba91e63..cc6bf3b 100644 --- a/laser/laser.inx +++ b/laser/laser.inx @@ -22,6 +22,8 @@ M3 S255; M5; 0 + true + true true 0.5 diff --git a/laser/laser.py b/laser/laser.py index 0d5ac94..6cfcef2 100644 --- a/laser/laser.py +++ b/laser/laser.py @@ -110,9 +110,12 @@ def effect(self): footer.append(interface_instance.linear_move(x=0, y=0)) # Generate gcode + corrected_dwell_time = self.options.dwell_time + if self.options.dwell_time_for_grbl: + corrected_dwell_time = self.options.dwell_time/1000 gcode_compiler = Compiler(custom_interface, self.options.travel_speed, self.options.cutting_speed, - self.options.pass_depth, dwell_time=self.options.dwell_time, custom_header=header, - custom_footer=footer, unit=self.options.unit) + self.options.pass_depth, dwell_time=corrected_dwell_time, custom_header=header, + custom_footer=footer, unit=self.options.unit, dwell_before_cut=self.options.dwell_before_cut) transformation = Transformation()