Compare commits
3 Commits
52802ae6c5
...
1c52859fb4
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c52859fb4 | |||
| f9f50d7167 | |||
| e21a61232d |
@@ -19,6 +19,8 @@ log = getLogger(__name__)
|
|||||||
|
|
||||||
ConfigVariable = namedtuple("ConfigVariable", ["name", "value", "line_index"])
|
ConfigVariable = namedtuple("ConfigVariable", ["name", "value", "line_index"])
|
||||||
|
|
||||||
|
CONFIG_TXT_LOCATIONS = ("/boot/firmware/config.txt", "/boot/config.txt")
|
||||||
|
|
||||||
|
|
||||||
class ComputeModuleTypes(IntEnum):
|
class ComputeModuleTypes(IntEnum):
|
||||||
UNKNOWN = 0
|
UNKNOWN = 0
|
||||||
@@ -76,7 +78,7 @@ class RevPiConfig:
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Detect WiFi
|
# Detect WiFi on CM module
|
||||||
could_have_wifi = self._cm_type in (ComputeModuleTypes.CM4, ComputeModuleTypes.CM5)
|
could_have_wifi = self._cm_type in (ComputeModuleTypes.CM4, ComputeModuleTypes.CM5)
|
||||||
if could_have_wifi:
|
if could_have_wifi:
|
||||||
lst_grep = grep("DRIVER=brcmfmac", "/sys/class/ieee80211/phy0/device/uevent")
|
lst_grep = grep("DRIVER=brcmfmac", "/sys/class/ieee80211/phy0/device/uevent")
|
||||||
@@ -106,7 +108,7 @@ class ConfigTxt:
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._config_txt_path = ""
|
self._config_txt_path = ""
|
||||||
for path in ("/boot/firmware/config.txt", "/boot/config.txt"):
|
for path in CONFIG_TXT_LOCATIONS:
|
||||||
if exists(path):
|
if exists(path):
|
||||||
self._config_txt_path = path
|
self._config_txt_path = path
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user