Beispiel #1
0
 def __init__(self, input, min=-1.0, max=1.0, scaling=1.0, offset=0.0):
     SensorInterface.__init__(self)
     self.input = input
     self.min = min
     self.max = max
     self.scaling = scaling
     self.offset = offset
Beispiel #2
0
	def __init__(self, button, threshold = 0.5, hysteresis = 0.0, rising=True, triggeredValue = 1.0, untriggeredValue = 0.0):
		SensorInterface.__init__(self)
		self.button = button
		self.threshold = threshold
		self.hysteresis = hysteresis
		self.rising = rising
		self.triggeredValue = triggeredValue
		self.untriggeredValue = untriggeredValue
		self.lastButtonValue = 0.0
Beispiel #3
0
	def __init__(self, currentHeading, pid, targetHeading, min = -1.0, max = 1.0, scaling = 1.0, integrate = False):
		SensorInterface.__init__(self)
		self.currentHeading = currentHeading
		self.pid = pid
		self.targetHeading = targetHeading
		self.min = min
		self.max = max
		self.scaling = scaling
		self.integrate = integrate
		self.integratedValue = 0.0
Beispiel #4
0
 def __init__(self, button, threshold, hysteresis, rising, triggeredValue,
              untriggeredValue):
     SensorInterface.__init__(self)
     self.button = button
     self.threshold = threshold
     self.hysteresis = hysteresis
     self.rising = rising
     self.triggeredValue = triggeredValue
     self.untriggeredValue = untriggeredValue
     self.lastButtonValue = 0.0
     self.currentValue = untriggeredValue
 def __init__(self,
              buttonUp,
              buttonDown,
              min=-1.0,
              max=1.0,
              scaling=1.0,
              offset=0.0):
     SensorInterface.__init__(self)
     self.buttonUp = buttonUp
     self.buttonDown = buttonDown
     self.min = min
     self.max = max
     self.scaling = scaling
     self.offset = offset
     self.currentValue = 0.0
 def __init__(self,
              forwardTorque,
              steerTorque,
              min=-1.0,
              max=1.0,
              scaling=1.0,
              offset=0.0):
     SensorInterface.__init__(self)
     self.forwardTorque = forwardTorque
     self.steerTorque = steerTorque
     self.min = min
     self.max = max
     self.scaling = scaling
     self.offset = offset
     # Get config
     config = Config()
     self.speedSlow = config.get("speedsteer.slow", 0.1)
     self.speedSlowComp = config.get("speedsteer.slow.compensation", 2.0)
     self.speedMed = config.get("speedsteer.med", 0.8)
     self.speedMedComp = config.get("speedsteer.med.compensation", 1.0)
     self.speedHighComp = config.get("speedsteer.high.compensation", 2.0)
     self.speedHighThresh = config.get("speedsteer.high.decelthresh", 0.05)
     self.speedHighDecel = config.get("speedsteer.high.decel", 0.6)
     config.save()
Beispiel #7
0
 def __init__(self, visionIPC):
     SensorInterface.__init__(self)
     self.visionIPC = visionIPC
Beispiel #8
0
 def __init__(self, mpu):
     SensorInterface.__init__(self)
     self.mpu = mpu
 def __init__(self, value):
     SensorInterface.__init__(self)
     self.value = value
Beispiel #10
0
 def __init__(self, sensorIPC, button):
     SensorInterface.__init__(self)
     self.sensorIPC = sensorIPC
     self.button = button
	def __init__(self, sensorIPC, sensor):
		SensorInterface.__init__(self)
		self.sensorIPC = sensorIPC
		self.sensor = sensor
 def __init__(self, sensorIPC, buttonUp, buttonDown):
     SensorInterface.__init__(self)
     self.sensorIPC = sensorIPC
     self.buttonUp = buttonUp
     self.buttonDown = buttonDown
 def __init__(self, sensorIPC, axis):
     SensorInterface.__init__(self)
     self.sensorIPC = sensorIPC
     self.axis = axis