Skip to content

Commit

Permalink
Merge pull request #16 from andremalenfant/custom-tap-version
Browse files Browse the repository at this point in the history
Added custom settings
  • Loading branch information
Anonoei committed Jan 27, 2024
2 parents 88b056a + 8d47f04 commit 62b3c55
Showing 1 changed file with 20 additions and 1 deletion.
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

0 comments on commit 62b3c55

Please sign in to comment.