Example #1
0
 def __init__(self,
              app,
              debug=False,
              name=None,
              channel=0,
              pololu_maestro_hw_name='pololu_maestro'):
     self.channel = channel
     self.pololu_maestro_hw_name = pololu_maestro_hw_name
     if name is not None:
         self.name = name
     HardwareComponent.__init__(self, app, debug=debug, name=name)
Example #2
0
    def __init__(self, app, name=None, debug=False, port='COM6'):
        HardwareComponent.__init__(self, app, debug=debug, name=name)
        self.debug = debug
        S = self.settings
        S.New('port', ro=False, initial=port, dtype=str)

        # Temperature readings
        S.New('T_A', ro=True, initial=0.0, unit='K')
        S.New('T_B', ro=True, initial=0.0, unit='K')

        # Analog out settings
        S.New('analog_out_enable', ro=False, initial=False, dtype=bool)
        S.New('analog_out_channel',
              ro=False,
              initial='B',
              dtype=str,
              choices=['A', 'B'])
        S.New('T_at_10V', ro=False, initial=1000.0, dtype=float, unit='K')
        S.New('T_at_0V', ro=False, initial=0.0, dtype=float, unit='K')

        # T control setpoint settings
        S.New('setpoint_T', ro=False, initial=20.0, dtype=float, unit='K')

        S.New('heater_output', ro=True, dtype=float, unit='%')
        S.New('heater_range',
              ro=False,
              dtype=str,
              initial=HEATER_RANGE_CHOICES[0],
              choices=HEATER_RANGE_CHOICES)
        S.New('control_mode',
              ro=False,
              dtype=str,
              initial=CONTROL_MODES[0],
              choices=CONTROL_MODES)

        S.New('ramp_onoff', ro=False, dtype=bool, initial=False)
        S.New('ramp_rate', ro=False, dtype=float, initial=10.0)
        S.New('is_ramping', ro=True, dtype=bool, initial=False)

        # Sensor settings
        S.New('type_A', ro=False, dtype=str, choices=SENSOR_TYPES)
        S.New('comp_A', ro=False, dtype=bool, initial=False)
        S.New('curve_A', ro=False, dtype=str, choices=SENSOR_CURVES)
        S.New('type_B', ro=False, dtype=str, choices=SENSOR_TYPES)
        S.New('comp_B', ro=False, dtype=bool, initial=False)
        S.New('curve_B', ro=False, dtype=str, choices=SENSOR_CURVES)

        self.add_operation("Reset", self.reset)
Example #3
0
    def __init__(self,
                 app,
                 debug=False,
                 name=None,
                 enable_xy=True,
                 enable_z=True,
                 enable_fw=True,
                 swap_xy=False,
                 invert_x=False,
                 invert_y=False):
        self.enable_xy = enable_xy
        self.enable_z = enable_z
        self.swap_xy = swap_xy
        self.invert_x = invert_x
        self.invert_y = invert_y

        HardwareComponent.__init__(self, app, debug=debug, name=name)
Example #4
0
 def __init__(self, app, debug=False, name=None, line_names="01234567"):
     self.line_names = line_names
     HardwareComponent.__init__(self, app, debug=debug, name=name)
Example #5
0
 def __init__(self, app, debug=False, name=None, servo_names=None):
     self.servo_names = servo_names
     if not self.servo_names:
         self.servo_names = [(i, "ch{}".format(i)) for i in range(6)]
     HardwareComponent.__init__(self, app, debug=debug, name=name)
Example #6
0
    def __init__(self, app, debug=False, name=None, axes=default_axes):

        self.axes = axes

        HardwareComponent.__init__(self, app, debug=debug, name=name)
Example #7
0
 def __init__(self, app, debug=False, name=None, ax_names='xyz'):
     self.ax_names = ax_names
     #self.pro = True
     HardwareComponent.__init__(self, app, debug=debug, name=name)
Example #8
0
 def __init__(self, app, debug=False):
     HardwareComponent.__init__(self, app, debug=debug, name=self.name)
Example #9
0
 def __init__(self, app, name='ni_dac', debug=False):
     self.name = name
     HardwareComponent.__init__(self, app, debug=debug)
Example #10
0
    def __init__(self, app, debug=False, name=None):
        self.xb_dev = XboxControllerDevice()

        HardwareComponent.__init__(self, app, debug=debug, name=name)
Example #11
0
    def __init__(self, app, debug=False, name=None, axes=default_axes):
        # self.pidevice = GCSDevice(CONTROLLERNAME)
        self.axes = axes

        HardwareComponent.__init__(self, app, debug=debug, name=name)