Skip to content
Snippets Groups Projects
Commit a81c1519 authored by Samuel Tardieu's avatar Samuel Tardieu
Browse files

Better phrasing and typing for controller module

parent 5ccb7a62
No related branches found
No related tags found
1 merge request!11Better phrasing and typing for controller module
Pipeline #98545 passed
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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment