diff --git a/src/scripts/python/util/egalax.py b/src/scripts/python/util/egalax.py index 9a9f31d..1cf43aa 100644 --- a/src/scripts/python/util/egalax.py +++ b/src/scripts/python/util/egalax.py @@ -65,3 +65,16 @@ def get_egalax_edid_path() -> Path: max_path = path # TODO add sanity check (both edid and VENDOR:DEVICE are in that base) return max_path + + +def get_egalax_drm_pure_name() -> str: + """Extract DRM name form edid path + + Returns: + str: pure drm name OR none if device is not found + """ + edid_path = get_egalax_edid_path() + if edid_path: + return str(edid_path.parent.stem) + else: + return None