Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

Commit cf3195c

Browse files
authored
Merge pull request #95 from sourcebots/arduino-updates
Update pin mode enum values
2 parents 7bc6a71 + f5cc74d commit cf3195c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

robot/servo.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
class PinMode(Enum):
88
"""A pin-mode for a pin on the servo board."""
99

10-
INPUT = 'hi-z'
11-
INPUT_PULLUP = 'pullup'
12-
OUTPUT_HIGH = 'high'
13-
OUTPUT_LOW = 'low'
10+
INPUT = 'Z'
11+
INPUT_PULLUP = 'P'
12+
OUTPUT_HIGH = 'H'
13+
OUTPUT_LOW = 'L'
1414

1515

1616
class PinValue(Enum):
1717
"""A value state for a pin on the servo board."""
1818

19-
HIGH = 'high'
20-
LOW = 'low'
19+
HIGH = 'H'
20+
LOW = 'L'
2121

2222

2323
class Servo:
@@ -112,7 +112,7 @@ def __init__(self, socket_path):
112112
super().__init__(socket_path)
113113

114114
servo_ids = range(0, 16) # servos with a port 0-15
115-
gpio_pins = range(2, 13) # gpio pins 2-12
115+
gpio_pins = range(2, 14) # gpio pins 2-13
116116

117117
self._servos = {} # type: Dict[int, Servo]
118118
for x in servo_ids:

0 commit comments

Comments
 (0)