Merge pull request #5205 from sliptonic/bug/depthsteps
[PATH] depthparams handles negative steps and finish step correctly. Unit tests
This commit is contained in:
@@ -788,8 +788,6 @@ class depth_params(object):
|
||||
|
||||
def __init__(self, clearance_height, safe_height, start_depth, step_down, z_finish_step, final_depth, user_depths=None, equalstep=False):
|
||||
'''self, clearance_height, safe_height, start_depth, step_down, z_finish_depth, final_depth, [user_depths=None], equalstep=False'''
|
||||
if z_finish_step > step_down:
|
||||
raise ValueError('z_finish_step must be less than step_down')
|
||||
|
||||
self.__clearance_height = clearance_height
|
||||
self.__safe_height = safe_height
|
||||
@@ -801,6 +799,9 @@ class depth_params(object):
|
||||
self.data = self.__get_depths(equalstep=equalstep)
|
||||
self.index = 0
|
||||
|
||||
if self.__z_finish_step > self.__step_down:
|
||||
raise ValueError('z_finish_step must be less than step_down')
|
||||
|
||||
def __iter__(self):
|
||||
self.index = 0
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user