예제 #1
0
파일: virtual.py 프로젝트: BigSense/LtSense
 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
파일: virtual.py 프로젝트: BigSense/LtSense
 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
파일: phidget.py 프로젝트: rettigaj/LtSense
 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
파일: phidget.py 프로젝트: BigSense/LtSense
 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
파일: camera.py 프로젝트: BigSense/LtSense
 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
파일: virtual.py 프로젝트: BigSense/LtSense
 def __init__(self):
     AbstractSensor.__init__(self)
     self.range_min = 0
     self.range_max = 10
예제 #12
0
파일: virtual.py 프로젝트: BigSense/LtSense
 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