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

Added custom settings #16

Merged
merged 1 commit into from
Jan 27, 2024
Merged
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
21 changes: 20 additions & 1 deletion auto_tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ class tap_VITALII_CNC(TapVersion):
Multiple = 21.5
Adder = 0

class tap_CUSTOM(TapVersion):
Name = "CUSTOM"
Min = 0.7
Max = 2.0
Multiple = 10
Adder = 1

class AutoTAP:
def __init__(self, config):
self.z_endstop = None
Expand All @@ -63,7 +70,8 @@ def __init__(self, config):
"CL_CNC": tap_CL_CNC,
"R8": tap_R8,
"R6": tap_R6,
"VITALII_CNC": tap_VITALII_CNC
"VITALII_CNC": tap_VITALII_CNC,
"CUSTOM": tap_CUSTOM
}

self.tap_version = config.getchoice( 'tap_version', choices=self.tap_choices)
Expand All @@ -86,6 +94,17 @@ def __init__(self, config):
self.lift_speed = config.getfloat( 'lift_speed', default=None, above=0.0)
self.travel_speed = config.getfloat( 'travel_speed', default=1000.0, above=0.0)

self.custom_min = config.getfloat( 'custom_min', default=0.7, minval=0.0)
self.custom_max = config.getfloat( 'custom_max', default=2.0, minval=0.0)
self.custom_multiple = config.getfloat( 'custom_multiple', default=10.0, minval=0.0)
self.custom_adder = config.getfloat( 'custom_adder', default=1.0, minval=0.0)

if self.tap_version.Name == 'CUSTOM':
self.tap_version.Min = self.custom_min
self.tap_version.Max = self.custom_max
self.tap_version.Multiple = self.custom_multiple
self.tap_version.Adder = self.custom_adder

self.offset = None

self.gcode_move = self.printer.load_object(config, 'gcode_move')
Expand Down