Browse Source

Hardware to upper

mruz 1 month ago
parent
commit
ee1ce0f5c6
2 changed files with 3 additions and 4 deletions
  1. 2
    2
      adafruit_platformdetect/chip.py
  2. 1
    2
      adafruit_platformdetect/constants/chips.py

+ 2
- 2
adafruit_platformdetect/chip.py View File

@@ -122,10 +122,10 @@ class Chip:
122 122
                 linux_id = chips.A64
123 123
             else:
124 124
                 if isinstance(hardware, str):
125
-                    if hardware in chips.BCM_RANGE:
125
+                    if hardware.upper() in chips.BCM_RANGE:
126 126
                         linux_id = chips.BCM2XXX
127 127
                 elif isinstance(hardware, list):
128
-                    if set(hardware) & chips.BCM_RANGE:
128
+                    if set([model.upper() for model in hardware]) & chips.BCM_RANGE:
129 129
                         linux_id = chips.BCM2XXX
130 130
 
131 131
         return linux_id

+ 1
- 2
adafruit_platformdetect/constants/chips.py View File

@@ -23,5 +23,4 @@ MIPS24KC = "MIPS24KC"
23 23
 MIPS24KEC = "MIPS24KEC"
24 24
 A64 = "A64"
25 25
 
26
-BCM_RANGE = {'BCM2708', 'BCM2709', 'BCM2711', 'BCM2835', 'BCM2837',
27
-             'bcm2708', 'bcm2709', 'bcm2711', 'bcm2835', 'bcm2837'}
26
+BCM_RANGE = {'BCM2708', 'BCM2709', 'BCM2711', 'BCM2835', 'BCM2837'}

Loading…
Cancel
Save