コード例 #1
0
ファイル: debug_tests.py プロジェクト: Xe/code
def do_pneumatics_relay_new():
    import outputs as out
    
    print 'creating relay object new version'
    relay1 = None
    try:
        relay1 = out.relay(1)
        print "Relay created without error"
    except:
        print "Relay creation failed"
    
    print "attempting to extend the relay"
    try:
        relay1.forward()
        print "it worked"
    except:
        print "it appears to have failed"
    
    print "attempting to retract the relay"
    try:
        relay1.off()
        print "it worked"
    except:
        print "it's stuck out"
    
    print "pass"
コード例 #2
0
ファイル: debug_tests.py プロジェクト: Xe/code
def do_pneumatics_relay_new():
    import outputs as out

    print 'creating relay object new version'
    relay1 = None
    try:
        relay1 = out.relay(1)
        print "Relay created without error"
    except:
        print "Relay creation failed"

    print "attempting to extend the relay"
    try:
        relay1.forward()
        print "it worked"
    except:
        print "it appears to have failed"

    print "attempting to retract the relay"
    try:
        relay1.off()
        print "it worked"
    except:
        print "it's stuck out"

    print "pass"
コード例 #3
0
ファイル: robot.py プロジェクト: Xe/code
except ImportError:
    import testing as wpi

#shiny = vision.PCVideoServer()

import outputs as outs
import inputs  as ins
import util
import arm
#import comm_to_base as base
util.sep()

stick1 = ins.Xbox(1)
util.sep()

gun = outs.relay(2)
outs.initComp()
util.sep()

drive = outs.Driver(1,2,3,4)
#drive = outs.Driver(1,2)
lsg = ins.line_sensor_group(6,7,8)
util.sep()

#def readForDog():
#    return util.readFileandSplit("config.ini", 0, "True")

#doggy = readForDog()
doggy = True
util.sep()