Commit 4c398c9b authored by augustin_s's avatar augustin_s 🐍
Browse files

allow to stop

parent 631c2c96
...@@ -37,6 +37,9 @@ class DummyAdjustable(Adjustable): ...@@ -37,6 +37,9 @@ class DummyAdjustable(Adjustable):
self._running = True self._running = True
for i in range(nsteps): for i in range(nsteps):
if not self._running:
print(repr(self))
return
sleep(delta_time) sleep(delta_time)
self._current_value += delta_value self._current_value += delta_value
...@@ -48,6 +51,10 @@ class DummyAdjustable(Adjustable): ...@@ -48,6 +51,10 @@ class DummyAdjustable(Adjustable):
print(repr(self)) print(repr(self))
def stop(self):
self._running = False
def is_moving(self): def is_moving(self):
return self._running return self._running
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment