Exemplo n.º 1
0
 def findOrAddSensor(self, clist):
     foundSensor = False
     for key, c1 in clist.items():
         if c1.sensor.getID() == "mashScale":
             foundSensor = True
             self.sensor = c1.sensor
             # print "Found mashScale sensor on", key
     if not foundSensor:
         self.sensor = sensors.dymoScaleSensor()
Exemplo n.º 2
0
 def __init__(self):
     self.errorState = False  # If an error has occured
     self.actual = 0.000
     self.target = 0
     self.startVol = 0.000
     self.active = False
     self.totalVol = 0
     self.powerOn = False
     self.absSec = time.time()
     self.SEC_PER_QUART = 3.0
     self.unit = 'Qt'
     self.pumpMotor = None
     self.sensor = sensors.dymoScaleSensor()
     # print "==========",self.sensor.getID()
     self.oldTime = datetime.datetime.now()
     self.actual = 0
     self.lastActual = 0
     self.lastCheck = datetime.datetime.now()
     self.oldSensor = 0
     self.speedcount = 0
     self.slowLimit = 0.8