Skip to content

Commit 5dae14c

Browse files
authored
Add port name constants for stacked brickpi3s (#562)
1 parent 04f705f commit 5dae14c

2 files changed

Lines changed: 35 additions & 3 deletions

File tree

debian/changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
python-ev3dev2 (2.0.0~beta3) stable; urgency=medium
22

33
[Daniel Walton]
4+
* Add port name constants for stacked brickpi3s
45
* Moved MoveTank.off() to MotorSet
56
* cache attributes that never change
67
* Display: correct xy variable names passed to Display.rectangle()

ev3dev2/_platform/brickpi3.py

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,46 @@
11
from collections import OrderedDict
22

3+
# Up to four brickpi3s can be stacked
34
OUTPUT_A = 'spi0.1:MA'
45
OUTPUT_B = 'spi0.1:MB'
56
OUTPUT_C = 'spi0.1:MC'
67
OUTPUT_D = 'spi0.1:MD'
78

8-
INPUT_1 = 'spi0.1:S1'
9-
INPUT_2 = 'spi0.1:S2'
10-
INPUT_3 = 'spi0.1:S3'
9+
OUTPUT_E = 'spi0.1:ME'
10+
OUTPUT_F = 'spi0.1:MF'
11+
OUTPUT_G = 'spi0.1:MG'
12+
OUTPUT_H = 'spi0.1:MH'
13+
14+
OUTPUT_I = 'spi0.1:MI'
15+
OUTPUT_J = 'spi0.1:MJ'
16+
OUTPUT_K = 'spi0.1:MK'
17+
OUTPUT_L = 'spi0.1:ML'
18+
19+
OUTPUT_M = 'spi0.1:MM'
20+
OUTPUT_N = 'spi0.1:MN'
21+
OUTPUT_O = 'spi0.1:MO'
22+
OUTPUT_P = 'spi0.1:MP'
23+
24+
INPUT_1 = 'spi0.1:S1'
25+
INPUT_2 = 'spi0.1:S2'
26+
INPUT_3 = 'spi0.1:S3'
1127
INPUT_4 = 'spi0.1:S4'
1228

29+
INPUT_5 = 'spi0.1:S5'
30+
INPUT_6 = 'spi0.1:S6'
31+
INPUT_7 = 'spi0.1:S7'
32+
INPUT_8 = 'spi0.1:S8'
33+
34+
INPUT_9 = 'spi0.1:S9'
35+
INPUT_10 = 'spi0.1:S10'
36+
INPUT_11 = 'spi0.1:S11'
37+
INPUT_12 = 'spi0.1:S12'
38+
39+
INPUT_13 = 'spi0.1:S13'
40+
INPUT_14 = 'spi0.1:S14'
41+
INPUT_15 = 'spi0.1:S15'
42+
INPUT_16 = 'spi0.1:S16'
43+
1344
BUTTONS_FILENAME = None
1445
EVDEV_DEVICE_NAME = None
1546

0 commit comments

Comments
 (0)