Skip to content

Commit

Permalink
shutter: better handling of updated status
Browse files Browse the repository at this point in the history
  • Loading branch information
willoma committed Jul 7, 2023
1 parent b0f7f38 commit 3e39d26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pycalaos/item/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,19 @@ def toggle(self):

def impulse_up(self, duration):
self._send(f"impulse up {duration}")
self._update_state()

def impulse_down(self, duration):
self._send(f"impulse down {duration}")
self._update_state()

def set(self, value):
if value < 1:
value = 1
elif value > 100:
value = 100
self._send(f"set {value}")
self._state = value
self._update_state()

def up(self, value=0):
if value == 0:
Expand Down Expand Up @@ -282,6 +284,7 @@ def down(self, value=0):

def calibrate(self):
self._send(f"calibrate")
self._update_state()


class Scenario(Item):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pycalaos"
version = "0.0.24"
version = "0.0.25"
authors = [
{ name = "Willow Maccagnoni", email = "willow.maccagnoni@gmail.com" },
]
Expand Down

0 comments on commit 3e39d26

Please sign in to comment.