Skip to content

Commit

Permalink
Added docs for servo info/video streams
Browse files Browse the repository at this point in the history
  • Loading branch information
hatomist committed Oct 20, 2024
1 parent 55ac54d commit 9c505a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 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.0"
__version__ = "0.5.1"

from .hal import HAL
17 changes: 15 additions & 2 deletions openlch/hal.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,15 @@ def get_servo_info(self, servo_id: int) -> Dict[str, Union[int, float]]:
servo_id (int): The ID of the servo to query.
Returns:
Dict[str, Union[int, float]]: A dictionary containing servo information.
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)
Raises:
Exception: If there's an error retrieving the servo information.
Expand Down Expand Up @@ -205,7 +213,12 @@ def get_video_stream_urls(self) -> Dict[str, List[str]]:
Get the URLs for various video stream formats.
Returns:
Dict[str, List[str]]: A dictionary containing lists of URLs for different stream formats.
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
"""
response = self.__stub.GetVideoStreamUrls(hal_pb_pb2.Empty())
return {
Expand Down

0 comments on commit 9c505a5

Please sign in to comment.