Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
danmacnish committed Nov 28, 2016
1 parent 1e9299b commit 831480c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plantClass.py
Expand Up @@ -25,7 +25,7 @@ def __calcPumpDuration(self, traffic):
self.__error = moistureSP - self.__soil.getMoisture()
# turn error into pump duration
self.__pumpDuration = self.__pumpBaseDuration - self.__error * self.__K2
self.__pumpDuration = self.__clamp(self.__pumpDuration, 1, 15000) #limit pump duration between 0 and 6 seconds
self.__pumpDuration = self.__clamp(self.__pumpDuration, 1, 13000) #limit pump duration between 0 and 6 seconds
self.__pump.setDuration(self.__pumpDuration)

def __trafficToMoistureSP(self, traffic):
Expand Down Expand Up @@ -82,7 +82,7 @@ def getData(queue ,internet, pollPeriod):
#traffic.update returns the average delay in minutes for the area. 0 = normal free flowing traffic, -ve is faster than usual, +ve is slower traffic
t = trfc.update(internet)
# print average delay
print('average traffic delay in carlton is ' + str(t) + ' minutes')
print('average traffic delay in Fitzroy is ' + str(t) + ' minutes')
#push new delay to queue
queue.put(t)
# log average delay to file
Expand Down

0 comments on commit 831480c

Please sign in to comment.