Skip to content

Commit

Permalink
start modules
Browse files Browse the repository at this point in the history
  • Loading branch information
ArendJan committed Nov 14, 2023
1 parent 2698edb commit 91096f3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions mirte_telemetrix/config/mirte_master_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ device:
max_frequency: 50
module:
motorservocontroller:
device: mirte
type: PCA9685
id: 0x40
# frequency: 1600
Expand Down
12 changes: 12 additions & 0 deletions mirte_telemetrix/scripts/ROS_telemetrix_aio_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,8 @@ def actuators(loop, board, device):
servo = Servo(board, servos[servo])
servers.append(loop.create_task(servo.start()))

if rospy.has_param("/mirte/modules"):
servers += add_modules(rospy.get_param("/mirte/modules"))
# Set a raw pin value
server = rospy.Service("/mirte/set_pin_value", SetPinValue, handle_set_pin_value)

Expand Down Expand Up @@ -1036,6 +1038,16 @@ def sensors(loop, board, device):

return tasks

def add_modules(modules, device) -> []:
# pca9685 module:
modules = {k: v for k, v in modules.items() if v["device"] == device}
for module in modules:
print(module)

return []




# Shutdown procedure
closing = False
Expand Down

0 comments on commit 91096f3

Please sign in to comment.