コード例 #1
0
def main_selection():
    curIdx = get_current_idx()
    if curIdx < 0:
        curIdx = 0

    nextFeeder = get_next_feeder_from(curIdx)

    if nextFeeder is None:
        set_current_idx(0)
        return False

    sel = psypnp.getOption(
        "Check Feeder Height", "Check feeder for \n%s \n%s " %
        (nextFeeder.getName(), str(nextFeeder.getPart().getId())),
        ['Do it', 'Skip it', 'Find Feed', 'Find Part', 'Reset Count', 'Close'])

    if sel is None:
        # hard abort
        return False

    if sel == 0 and psypnp.should_proceed_with_motion():
        # do it
        return check_feeder_heights()
    if sel == 1:  # skip it
        increment_idx_counter(curIdx)
        return True
    if sel == 2:  # by name
        return set_idx_by_feedname()
    if sel == 3:  # by part
        return set_idx_by_part()
    if sel == 4:  # reset count
        reset_idx_counter()
        return True

    return False
コード例 #2
0
ファイル: z_absolute.py プロジェクト: psychogenic/psypnp
def main():
    if psypnp.should_proceed_with_motion():
        submitUiMachineTask(go_z)
コード例 #3
0
def main():
    if should_proceed_with_motion():
        submitUiMachineTask(go_cam)