Skip to content

Commit

Permalink
Fixing docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
hatomist committed Oct 20, 2024
1 parent 9c505a5 commit fb9cacc
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 14 deletions.
2 changes: 1 addition & 1 deletion openlch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "0.5.1"
__version__ = "0.5.2"

from .hal import HAL
41 changes: 28 additions & 13 deletions openlch/hal.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,22 @@ def get_servo_info(self, servo_id: int) -> Dict[str, Union[int, float]]:
Returns:
Dict[str, Union[int, float]]: A dictionary containing servo information:
- id: The ID of the servo
- temperature: Current temperature of the servo (in degrees Celsius)
- current: Current draw of the servo (in amperes)
- voltage: Voltage supplied to the servo (in volts)
- speed: Current speed of the servo (in radians per second)
- current_position: Current position of the servo (in radians)
- min_position: Minimum allowed position of the servo (in radians)
- max_position: Maximum allowed position of the servo (in radians)
id: The ID of the servo
temperature: Current temperature of the servo (in degrees Celsius)
current: Current draw of the servo (in mAmps)
voltage: Voltage supplied to the servo (in volts)
speed: Current speed of the servo (in degrees per second)
current_position: Current position of the servo (in degrees)
min_position: Minimum allowed position of the servo (in degrees)
max_position: Maximum allowed position of the servo (in degrees)
Raises:
Exception: If there's an error retrieving the servo information.
Expand Down Expand Up @@ -214,11 +222,18 @@ def get_video_stream_urls(self) -> Dict[str, List[str]]:
Returns:
Dict[str, List[str]]: A dictionary containing lists of URLs for different stream formats:
- webrtc: List of WebRTC stream URLs
- hls: List of HTTP Live Streaming (HLS) URLs
- hls_ll: List of Low-Latency HLS URLs
- mse: List of Media Source Extension (MSE) URLs
- rtsp: List of Real-Time Streaming Protocol (RTSP) URLs
webrtc: List of WebRTC stream URLs
hls: List of HTTP Live Streaming (HLS) URLs
hls_ll: List of Low-Latency HLS URLs
mse: List of Media Source Extension (MSE) URLs
rtsp: List of Real-Time Streaming Protocol (RTSP) URLs
Each list may contain one or more URLs depending on the available streams.
"""
response = self.__stub.GetVideoStreamUrls(hal_pb_pb2.Empty())
return {
Expand Down

0 comments on commit fb9cacc

Please sign in to comment.