This commit is contained in:
@@ -129,6 +129,8 @@ def update_tool(tool=None, x_offset=0.0, y_offset=0.0, z_offset=0.0):
|
||||
|
||||
|
||||
def assert_valid_address(segment, puck, sample):
|
||||
if (segment == AUX_SEGMENT) and (puck == 1):
|
||||
return
|
||||
if is_string(segment):
|
||||
segment = ord(segment.upper()) - ord('A') +1
|
||||
if segment<=0 or segment >6:
|
||||
@@ -137,6 +139,10 @@ def assert_valid_address(segment, puck, sample):
|
||||
raise Exception ("Invalid puck")
|
||||
if sample<=0 or sample >16:
|
||||
raise Exception ("Invalid sample")
|
||||
|
||||
def assert_valid_sample(sample):
|
||||
if sample<=0 or sample >16:
|
||||
raise Exception ("Invalid sample")
|
||||
|
||||
def get_puck_name(segment, puck):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user