forked from pybricks/pybricks-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontrol.py
More file actions
executable file
·35 lines (25 loc) · 1.21 KB
/
control.py
File metadata and controls
executable file
·35 lines (25 loc) · 1.21 KB
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
"""ABM-decorating pybricks._common.Control."""
from ...._common import Control
from ...util import act_decor, sense_decor
# Control
# -------
for a in (
# docs.pybricks.com/en/latest/pupdevices/motor.html#pybricks.pupdevices.Motor.Motor.control.limits
# 'limits', # *** NOTE: OVERLOADED METHOD ***
# docs.pybricks.com/en/latest/pupdevices/motor.html#pybricks.pupdevices.Motor.Motor.control.pid
# 'pid', # *** NOTE: OVERLOADED METHOD ***
# docs.pybricks.com/en/latest/pupdevices/motor.html#pybricks.pupdevices.Motor.Motor.control.target_tolerances
# 'target_tolerances', # *** NOTE: OVERLOADED METHOD ***
# docs.pybricks.com/en/latest/pupdevices/motor.html#pybricks.pupdevices.Motor.Motor.control.stall_tolerances
# 'stall_tolerances', # *** NOTE: OVERLOADED METHOD ***
):
act_decor(Control, a)
for s in (
# docs.pybricks.com/en/latest/pupdevices/motor.html#pybricks.pupdevices.Motor.Motor.control.stalled
'stalled',
# docs.pybricks.com/en/latest/pupdevices/motor.html#pybricks.pupdevices.Motor.Motor.control.done
'done',
# docs.pybricks.com/en/latest/pupdevices/motor.html#pybricks.pupdevices.Motor.Motor.control.load
'load',
):
sense_decor(Control, s)