mirror of
https://github.com/armel/uv-k1-k5v3-firmware-custom.git
synced 2026-10-02 03:15:37 +00:00
Handle serial port conflict (Chirp)
This commit is contained in:
1 parent
38a6662713
commit
2e2e414070
1 file changed
+6
-1
+6
-1
@@ -49,7 +49,12 @@ def send_keepalive(ser: serial.Serial):
|
||||
def read_frame(ser: serial.Serial) -> bytearray:
|
||||
global framebuffer
|
||||
while True:
|
||||
b = ser.read(1)
|
||||
try:
|
||||
b = ser.read(1)
|
||||
except serial.SerialException as e:
|
||||
#print(f"[ERROR] Serial read failed: {e}")
|
||||
print("[!] Your USB serial cable is probably being used by another application such as Chirp.")
|
||||
sys.exit(1)
|
||||
if not b:
|
||||
return None
|
||||
if b == HEADER[0:1]:
|
||||
|
||||
Reference in new issue
Block a user