This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import traceback
|
||||
from ch.psi.pshell.serial import TcpDevice
|
||||
from ch.psi.pshell.modbus import ModbusTCP
|
||||
import ch.psi.mxsc.Controller as Controller
|
||||
|
||||
|
||||
run("setup/Layout")
|
||||
@@ -60,6 +61,16 @@ def system_check(robot_move=True):
|
||||
if not guiding_tool_park().read():
|
||||
raise Exception("Guiding tool not parked")
|
||||
|
||||
def get_puck_elect_detection(segment, puck):
|
||||
return str(Controller.getInstance().getPuck(str(segment).upper() + str(puck)).detection)
|
||||
|
||||
def get_puck_img_detection(segment, puck):
|
||||
return str(Controller.getInstance().getPuck(str(segment).upper() + str(puck)).imageDetection)
|
||||
|
||||
def assert_puck_detected(segment, puck):
|
||||
if get_puck_detection(segment, puck) != "Present":
|
||||
raise Exception ("Puck " + str(segment).upper() + str(puck) + " not present")
|
||||
|
||||
|
||||
def start_puck_detection():
|
||||
run("tools/RestartPuckDetection")
|
||||
|
||||
Reference in New Issue
Block a user