Skip to content

Commit

Permalink
fix: operating system values are hex strings
Browse files Browse the repository at this point in the history
  • Loading branch information
GetPsyched committed Jan 17, 2024
1 parent 6bc2b26 commit 6909dbb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion charachorder/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ def _maybe_commit(self, success, commit: bool) -> bool:
def get_parameter(self, code: int) -> int:
return int(self.execute("VAR", "B1", hex(code))[0])

def set_parameter(self, code: int, value: int, *, commit: bool = False) -> bool:
def set_parameter(
self, code: int, value: int | str, *, commit: bool = False
) -> bool:
return self._maybe_commit(
self.execute("VAR", "B2", hex(code), value)[0] == "0", commit
)
Expand Down

0 comments on commit 6909dbb

Please sign in to comment.