示例#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
示例#2
0
文件: pi.py 项目: rettigaj/LtSense
 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()
示例#3
0
文件: pi.py 项目: BigSense/LtSense
 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()
示例#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
示例#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
示例#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
示例#7
0
文件: owfs.py 项目: BigSense/LtSense
 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
示例#8
0
文件: owfs.py 项目: rettigaj/LtSense
 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
示例#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)
示例#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)
示例#11
0
 def __init__(self):
     AbstractSensor.__init__(self)
     self.range_min = 0
     self.range_max = 10
示例#12
0
 def __init__(self):
     AbstractSensor.__init__(self)
     self.id = "Unimplemented"
     self.type = "Unimplemented"
     self.data = "Unimplemented"
     self.units = "Unimplemented"
示例#13
0
 def __init__(self, ow_sensor):
     AbstractSensor.__init__(self)
     import ow
     self.ow_sensor = ow_sensor
     self.id = ow_sensor.id