- made on-methods private
- added AStirrer::_on_process() for monitoring
This commit is contained in:
@@ -26,16 +26,17 @@ class AStirrer(AttributeChange):
|
||||
|
||||
if self.isOn != isOn:
|
||||
if isOn:
|
||||
self.on_set_speed(self.speed)
|
||||
self._on_set_speed(self.speed)
|
||||
else:
|
||||
self.on_set_speed(0)
|
||||
self._on_set_speed(0)
|
||||
|
||||
self.isOn = isOn
|
||||
self._on_process()
|
||||
|
||||
def set_speed(self, speed):
|
||||
self.speed = speed
|
||||
if self.isOn or self.dutyCycle == 1:
|
||||
self.on_set_speed(speed)
|
||||
self._on_set_speed(speed)
|
||||
|
||||
def set_cycle_time(self, time):
|
||||
self.cycleTime = time
|
||||
@@ -48,7 +49,11 @@ class AStirrer(AttributeChange):
|
||||
return None
|
||||
|
||||
@abc.abstractmethod
|
||||
def on_set_speed(self, speed):
|
||||
def _on_set_speed(self, speed):
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def _on_process(self):
|
||||
pass
|
||||
|
||||
@contextmanager
|
||||
|
||||
Reference in New Issue
Block a user