Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/servos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ servos:
id: 8
pin: 4
range: [0, 180]
start: 180
start: 100
- name: "hip_r"
id: 9
pin: 5
Expand Down
2 changes: 1 addition & 1 deletion modules/actuators/servo.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, **kwargs):
self.range = kwargs.get('range')
self.power = kwargs.get('power', False)

self.start = kwargs.get('start_pos', 50)
self.start = kwargs.get('start', 50)
self.pos = self.translate(self.start)
self.buffer = kwargs.get('buffer', 0) # PWM amount to specify as acceleration / deceleration buffer
self.delta = kwargs.get('delta', 1.5) # amount of change in acceleration / deceleration (as a multiple)
Expand Down
2 changes: 2 additions & 0 deletions modules/animate.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,5 @@ def animate(self, action):
led.on()
else:
led.off()
elif 'piservo/move' == cmd: # New condition for piservo
self.publish(cmd, angle=args[0])
6 changes: 2 additions & 4 deletions modules/personality.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,8 @@ def random_animation(self):
'head_shake',
'head_left',
'head_right',
'wake',
'look_down',
'look_up',
'celebrate'
# 'look_down',
'look_up'
]
animation = choice(animations)
self.log(f"Random animation triggered: {animation}")
Expand Down