Skip to content

Commit

Permalink
make sure parameters are integer or list
Browse files Browse the repository at this point in the history
  • Loading branch information
bytosaur committed Mar 6, 2024
1 parent 86c37b5 commit c0d9471
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pycycling/ftms_parsers/control_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def form_ftms_control_command(opcode: FTMSControlPointOpCode, parameter: int = 0
:param parameter: scalar or list of scalar
:return: bytearray
"""
parameter = parameter if isinstance(parameter, list) else (int)(parameter)
if opcode == FTMSControlPointOpCode.REQUEST_CONTROL:
return b"\x00"
elif opcode == FTMSControlPointOpCode.RESET:
Expand Down

0 comments on commit c0d9471

Please sign in to comment.