- improved logging
git-svn-id: http://moon:8086/svn/projects/HendiControl@117 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
@@ -19,23 +19,23 @@ class Stirrer(AStirrer):
|
||||
|
||||
if self.cycleCounter <= (self.cycleTime * self.dutyCycle):
|
||||
if not self.isOn:
|
||||
print ("Stirrer: On")
|
||||
self.log ("Stirrer: On")
|
||||
self.isOn = 1
|
||||
else:
|
||||
if self.isOn:
|
||||
print ("Stirrer: Off")
|
||||
self.log ("Stirrer: Off")
|
||||
self.isOn = 0
|
||||
|
||||
def setRpm(self, rpm):
|
||||
print ("Stirrer: Set RPM to {} rpm".format(rpm))
|
||||
self.log ("Stirrer: Set RPM to {} rpm".format(rpm))
|
||||
self.rpm = rpm
|
||||
|
||||
def setCycleTime(self, time):
|
||||
print ("Stirrer: Set cycle time to {} s".format(time))
|
||||
self.log ("Stirrer: Set cycle time to {} s".format(time))
|
||||
self.cycleTime = time
|
||||
|
||||
def setDutyCycle(self, dutyCycle):
|
||||
print ("Stirrer: Set duty cycle to {} %".format(100*dutyCycle))
|
||||
self.log ("Stirrer: Set duty cycle to {} %".format(100*dutyCycle))
|
||||
self.dutyCycle = dutyCycle
|
||||
|
||||
def getRpm(self):
|
||||
@@ -45,8 +45,8 @@ class Stirrer(AStirrer):
|
||||
|
||||
def start(self):
|
||||
self.isMasterOn = 1
|
||||
print("Stirrer: switched On")
|
||||
self.log("Stirrer: switched On")
|
||||
|
||||
def stop(self):
|
||||
self.isMasterOn = 0
|
||||
print("Stirrer: switched Off")
|
||||
self.log("Stirrer: switched Off")
|
||||
|
||||
Reference in New Issue
Block a user