diff --git a/pystages/tic.py b/pystages/tic.py index 4400d35..28ba9e0 100644 --- a/pystages/tic.py +++ b/pystages/tic.py @@ -26,7 +26,7 @@ from .exceptions import ConnectionFailure -class TicVariable(tuple[int, int, bool], Enum): +class TicVariable(Enum): """ Variables which can be read using GET_VARIABLE command. https://www.pololu.com/docs/0J71/7 @@ -220,7 +220,7 @@ def set_target_velocity(self, velocity: int): self.write_32(TicCommand.SET_TARGET_VELOCITY, velocity) def get_variable(self, variable: TicVariable) -> int: - offset, length, signed = variable + offset, length, signed = variable.value return int.from_bytes( self.block_read(TicCommand.GET_VARIABLE, offset, length), "little",