Skip to content

Commit 0eb6058

Browse files
authored
Merge pull request #58 from mruz/master
Add openSUSE support
2 parents 6e6d6f6 + ee1ce0f commit 0eb6058

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

adafruit_platformdetect/board.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def _pi_id(self):
9595
re_model = re.search(r'(RASPBERRY_PI_CM)(\d)',
9696
pi_model)
9797
else: # untested for non-plus models
98-
re_model = re.search(r'(RASPBERRY_PI_\d).*([AB]_*)',
98+
re_model = re.search(r'(RASPBERRY_PI_\d).*([AB])',
9999
pi_model)
100100

101101
if re_model:

adafruit_platformdetect/chip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ def _linux_id(self): # pylint: disable=too-many-branches,too-many-statements
122122
linux_id = chips.A64
123123
else:
124124
if isinstance(hardware, str):
125-
if hardware in chips.BCM_RANGE:
125+
if hardware.upper() in chips.BCM_RANGE:
126126
linux_id = chips.BCM2XXX
127127
elif isinstance(hardware, list):
128-
if set(hardware) & chips.BCM_RANGE:
128+
if set([model.upper() for model in hardware]) & chips.BCM_RANGE:
129129
linux_id = chips.BCM2XXX
130130

131131
return linux_id

adafruit_platformdetect/constants/chips.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@
2323
MIPS24KEC = "MIPS24KEC"
2424
A64 = "A64"
2525

26-
BCM_RANGE = {'BCM2708', 'BCM2709', 'BCM2835', 'BCM2837', 'bcm2708', 'bcm2709',
27-
'bcm2835', 'bcm2837'}
26+
BCM_RANGE = {'BCM2708', 'BCM2709', 'BCM2711', 'BCM2835', 'BCM2837'}

0 commit comments

Comments
 (0)