Exemplo n.º 1
0
 def __init__(self):
     AbstractSensor.__init__(self)
     self.id = 'UnknownVirtualCamera'
     self.type = 'Image'
     self.units = 'Image'  # Non-Comissioned Photo Units
     self._image_file = ''
     self._image = None
Exemplo n.º 2
0
 def __init__(self):
     AbstractSensor.__init__(self)
     import picamera
     self.type = 'Photo'
     self.units = 'jpeg'
     self._camera = picamera.PiCamera()
     # warm up the camera
     self._camera.start_preview()
Exemplo n.º 3
0
 def __init__(self):
     AbstractSensor.__init__(self)
     import picamera
     self.type = 'Photo'
     self.units = 'jpeg'
     self._camera = picamera.PiCamera()
     # warm up the camera
     self._camera.start_preview()
Exemplo n.º 4
0
 def __init__(self):
     AbstractSensor.__init__(self)
     self.range_min = 0
     self.range_max = 10
     self.current = -1
     self.count_dir = None
     self.float = False
     self.float_percision = 2
Exemplo n.º 5
0
 def __init__(self):
     AbstractSensor.__init__(self)
     # Can be analogue or digital
     self.port_type = None
     self.port_num = None
     self.current_data = None
     self.id = None
     self.data_formula = None
     self._model = None
Exemplo n.º 6
0
 def __init__(self):
     AbstractSensor.__init__(self)
     # Can be analogue or digital
     self.port_type = None
     self.port_num = None
     self.current_data = None
     self.id = None
     self.data_formula = None
     self._model = None
Exemplo n.º 7
0
 def __init__(self, ow_sensor):
     AbstractSensor.__init__(self)
     try:
         import ow
     except ImportError:
         logging.error('1-Wire Python Module not found. Did you install python-ow?')
         sys.exit(8)
     self.ow_sensor = ow_sensor
     self.id = ow_sensor.id
Exemplo n.º 8
0
 def __init__(self, ow_sensor):
     AbstractSensor.__init__(self)
     try:
         import ow
     except ImportError:
         logging.error(
             '1-Wire Python Module not found. Did you install python-ow?')
         sys.exit(8)
     self.ow_sensor = ow_sensor
     self.id = ow_sensor.id
Exemplo n.º 9
0
 def __init__(self):
     AbstractSensor.__init__(self)
     from cv2 import cv
     self.type = 'Photo'
     self.units = 'jpeg'
     # TODO configurable camera port
     self._camera = cv.CaptureFromCAM(0)
     # Ramp up images
     logging.debug('Ramping up Camera')
     # TODO configure ramp up
     for i in xrange(30):
         cv.QueryFrame(self._camera)
Exemplo n.º 10
0
 def __init__(self):
     AbstractSensor.__init__(self)
     from cv2 import cv
     self.type = 'Photo'
     self.units = 'jpeg'
     # TODO configurable camera port
     self._camera = cv.CaptureFromCAM(0)
     # Ramp up images
     logging.debug('Ramping up Camera')
     # TODO configure ramp up
     for i in xrange(30):
         cv.QueryFrame(self._camera)
Exemplo n.º 11
0
 def __init__(self):
     AbstractSensor.__init__(self)
     self.range_min = 0
     self.range_max = 10
Exemplo n.º 12
0
 def __init__(self):
     AbstractSensor.__init__(self)
     self.id = "Unimplemented"
     self.type = "Unimplemented"
     self.data = "Unimplemented"
     self.units = "Unimplemented"
Exemplo n.º 13
0
 def __init__(self, ow_sensor):
     AbstractSensor.__init__(self)
     import ow
     self.ow_sensor = ow_sensor
     self.id = ow_sensor.id