sar3d: GPU port of the notebook with four views
The sar3d processor is rewritten as a checked port of Multi_antenna_3D_clean_v1.ipynb: NVRTC kernels, timing from the trace stamps, notebook parameter names and one cubic SAR_VOXEL_M. It adds front, side, top and 3D views, drops gpr_cpp and the parity tools, and the GUI speed now applies only while the socket speed is ignored.
This commit is contained in:
@@ -4,6 +4,7 @@ Encodes commands to wire bytes, decodes device responses, and manages the
|
||||
serial port connection to the laser control board.
|
||||
"""
|
||||
|
||||
import errno
|
||||
import logging
|
||||
import struct
|
||||
from typing import Optional
|
||||
@@ -204,9 +205,9 @@ class Protocol:
|
||||
exclusive=True,
|
||||
)
|
||||
except serial.SerialException as exc:
|
||||
# pyserial raises SerialException with errno EAGAIN/EWOULDBLOCK (11)
|
||||
# when another process already holds the exclusive flock.
|
||||
if getattr(exc, "errno", None) in (11,) or "exclusively lock" in str(exc).lower():
|
||||
# pyserial raises SerialException with errno EWOULDBLOCK when another
|
||||
# process already holds the exclusive flock.
|
||||
if getattr(exc, "errno", None) == errno.EWOULDBLOCK or "exclusively lock" in str(exc).lower():
|
||||
logger.error("Laser serial port '%s' is busy (held by another program)", port)
|
||||
raise PortBusyError(port) from exc
|
||||
logger.error("Cannot open laser serial port '%s': %s", port, exc)
|
||||
|
||||
Reference in New Issue
Block a user