1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 04:34:43 +04:00

github: support bound and symlinked devices (#4163)

* Fix unaccessible flipper for binded access points

workaround to work with symlinked devices

* Fix return None if Flipper not started

* exception handling

* decreased timeouts

* Check environment variables for flipper path
This commit is contained in:
Evgeny E
2025-03-31 14:20:25 +01:00
committed by GitHub
parent 79bb24406e
commit bcbf78a45d
5 changed files with 45 additions and 16 deletions

View File

@@ -1,3 +1,4 @@
import os
import serial.tools.list_ports as list_ports
@@ -15,3 +16,8 @@ def resolve_port(logger, portname: str = "auto"):
logger.error("Failed to find connected Flipper")
elif len(flippers) > 1:
logger.error("More than one Flipper is attached")
env_path = os.environ.get("FLIPPER_PATH")
if env_path:
if os.path.exists(env_path):
logger.info(f"Using FLIPPER_PATH from environment: {env_path}")
return env_path