Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options for grbl and for prepending dwell time #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions laser/laser.inx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<param name="tool_power_command" type="string" gui-text="Tool Power Command">M3 S255;</param>
<param name="tool_off_command" type="string" gui-text="Tool Off Command">M5;</param>
<param name="dwell_time" type="float" gui-text="Dwell Time Before Moving (ms)">0</param>
<param name="dwell_time_for_grbl" gui-text="Adjust Dwell Time for grbl (s vs ms)" type="bool">true</param>
<param name="dwell_before_cut" gui-text="Apply Dwell Time before cut (not after)" type="bool">true</param>
<spacer/>
<param name="draw_debug" type="bool" gui-text="Draw Debug">true</param>
<param name="debug_line_width" type="float" gui-text="Debug Line Width (px)">0.5</param>
Expand Down
7 changes: 5 additions & 2 deletions laser/laser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down