-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathservo.py
47 lines (33 loc) · 891 Bytes
/
servo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import threading
def initialise():
pass
def servo_libre():
pass
class Servo():
def __init__(self):
# En fait, chaque servo sera mis dasn un bras
self._flag = True
self.lock = threading.Lock()
@property
def read_flag(self):
with self.lock:
return self._flag
@property.setter
def define_flag(self, etat : bool):
with self.lock:
self._flag = etat
@staticmethod
def capturer_dechet():
pass
@staticmethod
def soulever_dechet():
pass
@staticmethod
def relacher_dechet():
pass
@staticmethod
def join():
initialise() # Remet les servos dans l'état qu'il faut
servo_libre() # libère les servos
######## fin du thread de chaque servo_moteur
pass