Skip to content

Commit

Permalink
fix docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
ykyohei committed Jul 30, 2024
1 parent a487b26 commit c5b0851
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions socs/agents/hwp_pid/drivers/pid_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def send_message(self, msg):
msg (str): Command to send to the controller.
Returns:
str: Respnose from the controller.
str: Response from the controller.
"""
for attempt in range(2):
Expand All @@ -414,7 +414,7 @@ def return_messages(self, msg):
msg (list): List of messages to decode.
Returns:
list: Decoded responses.
list: DecodedResponse
"""
return self._decode_array(msg)
Expand Down Expand Up @@ -442,15 +442,15 @@ def _decode_array(input_array):
- W02: write setpoint for pid 2 (rotation direction setpoint)
- W0C: write action type for pid 1 (how to interpret sign of (setpoint-value))
- X01: read value for pid 1 (current rotation frequency)
"?" chadacter indicates the error messages.
"?" character indicates the error messages.
The helper function goes through the raw response strings and replaces them
with their decoded values.
Args:
input_array (list): List of str messages to decode
Returns:
list: Decoded responses
list: DecodedResponse
"""
output_array = list(input_array)
Expand Down Expand Up @@ -491,7 +491,7 @@ def _decode_error(string):
string (str): Error message type string to decode
Returns:
Decoded value
DecodedResponse
"""
if '?+9999.' in string:
Expand Down Expand Up @@ -528,7 +528,7 @@ def _decode_read(string):
string (str): Read (hex) type string to decode
Returns:
Decoded value
DecodedResponse
"""
end_string = string.split('\r')[-1]
Expand All @@ -554,7 +554,7 @@ def _decode_write(string):
string (str): Write (hex) type string to decode
Returns:
str: Decoded string
DecodedResponse
"""
write_type = string[1:]
Expand Down Expand Up @@ -584,7 +584,7 @@ def _decode_measure(string):
string (str): Read (decimal) type string to decode
Return:
float: Decoded value
DecodedReponse
"""
end_string = string.split('\r')[-1]
measure_type = end_string[1:3]
Expand Down

0 comments on commit c5b0851

Please sign in to comment.