mirror of
https://github.com/apirrone/Open_Duck_Mini_Runtime.git
synced 2025-09-03 11:43:58 +00:00
trying to fix antennas twitching
This commit is contained in:
parent
d6b6a54a98
commit
3858e1c5a2
1 changed files with 3 additions and 1 deletions
|
@ -39,12 +39,14 @@ class Antennas:
|
|||
:param servo: 1 for the first servo, 2 for the second servo
|
||||
:param value: A float between -1 and 1
|
||||
"""
|
||||
print(f"servo {servo} : {value}")
|
||||
# print(f"servo {servo} : {value}")
|
||||
if value < 0.1:
|
||||
if servo == 1 and not self.pwm1_set:
|
||||
print("set")
|
||||
self.pwm1.ChangeDutyCycle(7)
|
||||
self.pwm1_set = True
|
||||
elif servo == 2 and not self.pwm2_set:
|
||||
print("set")
|
||||
self.pwm2.ChangeDutyCycle(7)
|
||||
self.pwm2_set = True
|
||||
|
||||
|
|
Loading…
Reference in a new issue