Skip to content

Commit

Permalink
Merge branch 'main' into fix-oled
Browse files Browse the repository at this point in the history
  • Loading branch information
mklomp authored Oct 27, 2023
2 parents 8ad5340 + 335c426 commit 5edd6ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__pycache__

.vscode/
8 changes: 7 additions & 1 deletion mirte_telemetrix/scripts/ROS_telemetrix_aio_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,18 @@ def __init__(self, board, servo_obj):
self.board = board
self.pins = get_pin_numbers(servo_obj)
self.name = servo_obj["name"]
self.min_pulse = 544
if "min_pulse" in servo_obj:
self.min_pulse = servo_obj["min_pulse"]
self.max_pulse = 2400
if "max_pulse" in servo_obj:
self.max_pulse = servo_obj["max_pulse"]

async def stop(self):
await board.detach_servo(self.pins["pin"])

async def start(self):
await board.set_pin_mode_servo(self.pins["pin"])
await board.set_pin_mode_servo(self.pins["pin"], self.min_pulse, self.max_pulse)
server = rospy.Service(
"/mirte/set_" + self.name + "_servo_angle",
SetServoAngle,
Expand Down

0 comments on commit 5edd6ba

Please sign in to comment.