fixed Bug with Pipeline
This commit is contained in:
+1
-1
@@ -8,5 +8,5 @@ class FileIO:
|
|||||||
def loadZones(self):
|
def loadZones(self):
|
||||||
zones = []
|
zones = []
|
||||||
for i in range(12):
|
for i in range(12):
|
||||||
zones.append(Zone(number=i+1, name="Zone " + str(i+1), actualHumidity=50, desiredHumidity=30, autoMode=True, state=False, setState=0, endTimeSetState=0, planedDuration=0))
|
zones.append(Zone(number=i+1, name="Zone " + str(i+1), actualHumidity=50, desiredHumidity=70, autoMode=True, state=False, setState=0, endTimeSetState=0, planedDuration=0))
|
||||||
return zones
|
return zones
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ class Zone:
|
|||||||
self.state = True
|
self.state = True
|
||||||
case 3:
|
case 3:
|
||||||
self.state = False
|
self.state = False
|
||||||
|
if (not self.planedDuration > 0):
|
||||||
|
self.setState = 0
|
||||||
|
|
||||||
|
|
||||||
def refreshStateManualmode(self):
|
def refreshStateManualmode(self):
|
||||||
@@ -62,6 +64,8 @@ class Zone:
|
|||||||
self.state = True
|
self.state = True
|
||||||
case 3:
|
case 3:
|
||||||
self.state = False
|
self.state = False
|
||||||
|
if (not self.planedDuration > 0):
|
||||||
|
self.setState = 0
|
||||||
|
|
||||||
|
|
||||||
def refreshState(self):
|
def refreshState(self):
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@ class ZoneManager:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def switchZoneState(self, zone, state, duration, instant=False):
|
def switchZoneState(self, zone, state, duration, instant=False):
|
||||||
if(instant or self.systemSettings.multiZoneIrrigation or state==False or (not self.isAnyZoneBusy())):
|
if(instant or self.systemSettings.multiZoneIrrigation or state==False ): #or (not self.isAnyZoneBusy())
|
||||||
zone.switchState(state=state, duration=duration, instant=True)
|
zone.switchState(state=state, duration=duration, instant=True)
|
||||||
else:
|
else:
|
||||||
self.addIrrigationJob(IrrigationJob(id=self.random.randint(a=100000000, b=999999999), zone=zone, duration=duration))
|
self.addIrrigationJob(IrrigationJob(id=self.random.randint(a=100000000, b=999999999), zone=zone, duration=duration))
|
||||||
|
|||||||
Reference in New Issue
Block a user