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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user