From a81c151941340e62839841a84a717af6fb5c0c9a Mon Sep 17 00:00:00 2001 From: Samuel Tardieu <sam@rfc1149.net> Date: Fri, 6 Sep 2024 10:28:02 +0200 Subject: [PATCH] Better phrasing and typing for controller module --- controller/python/controller.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controller/python/controller.py b/controller/python/controller.py index abd68bf..27a4bd9 100644 --- a/controller/python/controller.py +++ b/controller/python/controller.py @@ -1,6 +1,6 @@ import struct from numbers import Real -from typing import Any, Optional +from typing import Optional # Major and minor version of required firmware _REQUIRED_FIRMWARE_VERSION = (0, 4) @@ -144,8 +144,8 @@ class Controller: sense. Return a pair with left and right data.""" return self._read(self.ENCODER_TICKS, 4, "hh") - def get_status(self) -> dict[str, Any]: - """Return a dict with various status fields: + def get_status(self) -> dict[str, bool]: + """Return a dict with status fields: - "moving": True if at least one motor is moving, False otherwise - "automatic": True if the motors are in automatic mode, False otherwise""" (status,) = self._read(self.STATUS, 1, "B") -- GitLab