refactor(host): remove FT601 references from radar_dashboard, smoke_test, and docs
Replace FT601Connection with FT2232HConnection in radar_dashboard.py and smoke_test.py. Both files had broken imports after FT601Connection was removed from radar_protocol.py. Also update requirements_dashboard.txt (ftd3xx -> pyftdi) and GUI_versions.txt descriptions.
This commit is contained in:
@@ -8,6 +8,6 @@ GUI_V5 ==> Added Mercury Color
|
||||
|
||||
GUI_V6 ==> Added USB3 FT601 support
|
||||
|
||||
radar_dashboard ==> Board bring-up dashboard (FT601 reader, real-time R-D heatmap, CFAR overlay, waterfall, host commands, HDF5 recording)
|
||||
radar_protocol ==> Protocol layer (packet parsing, command building, FT601 connection, data recorder, acquisition thread)
|
||||
radar_dashboard ==> Board bring-up dashboard (FT2232H reader, real-time R-D heatmap, CFAR overlay, waterfall, host commands, HDF5 recording)
|
||||
radar_protocol ==> Protocol layer (packet parsing, command building, FT2232H connection, data recorder, acquisition thread)
|
||||
smoke_test ==> Board bring-up smoke test host script (triggers FPGA self-test via opcode 0x30)
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
AERIS-10 Radar Dashboard — Board Bring-Up Edition
|
||||
===================================================
|
||||
Real-time visualization and control for the AERIS-10 phased-array radar
|
||||
via FT601 USB 3.0 interface.
|
||||
via FT2232H USB 2.0 interface.
|
||||
|
||||
Features:
|
||||
- FT601 USB reader with packet parsing (matches usb_data_interface.v)
|
||||
- FT2232H USB reader with packet parsing (matches usb_data_interface_ft2232h.v)
|
||||
- Real-time range-Doppler magnitude heatmap (64x32)
|
||||
- CFAR detection overlay (flagged cells highlighted)
|
||||
- Range profile waterfall plot (range vs. time)
|
||||
@@ -17,7 +17,7 @@ Features:
|
||||
|
||||
Usage:
|
||||
python radar_dashboard.py # Launch with mock data
|
||||
python radar_dashboard.py --live # Launch with FT601 hardware
|
||||
python radar_dashboard.py --live # Launch with FT2232H hardware
|
||||
python radar_dashboard.py --record # Launch with HDF5 recording
|
||||
"""
|
||||
|
||||
@@ -43,7 +43,7 @@ from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
|
||||
|
||||
# Import protocol layer (no GUI deps)
|
||||
from radar_protocol import (
|
||||
RadarProtocol, FT601Connection, ReplayConnection,
|
||||
RadarProtocol, FT2232HConnection, ReplayConnection,
|
||||
DataRecorder, RadarAcquisition,
|
||||
RadarFrame, StatusResponse, Opcode,
|
||||
NUM_RANGE_BINS, NUM_DOPPLER_BINS, WATERFALL_DEPTH,
|
||||
@@ -82,7 +82,7 @@ class RadarDashboard:
|
||||
BANDWIDTH = 500e6 # Hz — chirp bandwidth
|
||||
C = 3e8 # m/s — speed of light
|
||||
|
||||
def __init__(self, root: tk.Tk, connection: FT601Connection,
|
||||
def __init__(self, root: tk.Tk, connection: FT2232HConnection,
|
||||
recorder: DataRecorder):
|
||||
self.root = root
|
||||
self.conn = connection
|
||||
@@ -552,7 +552,7 @@ class _TextHandler(logging.Handler):
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="AERIS-10 Radar Dashboard")
|
||||
parser.add_argument("--live", action="store_true",
|
||||
help="Use real FT601 hardware (default: mock mode)")
|
||||
help="Use real FT2232H hardware (default: mock mode)")
|
||||
parser.add_argument("--replay", type=str, metavar="NPY_DIR",
|
||||
help="Replay real data from .npy directory "
|
||||
"(e.g. tb/cosim/real_data/hex/)")
|
||||
@@ -561,7 +561,7 @@ def main():
|
||||
parser.add_argument("--record", action="store_true",
|
||||
help="Start HDF5 recording immediately")
|
||||
parser.add_argument("--device", type=int, default=0,
|
||||
help="FT601 device index (default: 0)")
|
||||
help="FT2232H device index (default: 0)")
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.replay:
|
||||
@@ -569,10 +569,10 @@ def main():
|
||||
conn = ReplayConnection(npy_dir, use_mti=not args.no_mti)
|
||||
mode_str = f"REPLAY ({npy_dir}, MTI={'OFF' if args.no_mti else 'ON'})"
|
||||
elif args.live:
|
||||
conn = FT601Connection(mock=False)
|
||||
conn = FT2232HConnection(mock=False)
|
||||
mode_str = "LIVE"
|
||||
else:
|
||||
conn = FT601Connection(mock=True)
|
||||
conn = FT2232HConnection(mock=True)
|
||||
mode_str = "MOCK"
|
||||
|
||||
recorder = DataRecorder()
|
||||
|
||||
@@ -5,5 +5,5 @@ numpy>=1.24
|
||||
matplotlib>=3.7
|
||||
h5py>=3.8
|
||||
|
||||
# FT601 USB 3.0 driver (install from FTDI website if not on PyPI)
|
||||
# ftd3xx # Optional: only needed for --live mode with real hardware
|
||||
# FT2232H USB 2.0 driver (pyftdi — pure Python, pip-installable)
|
||||
# pyftdi>=0.54 # Optional: only needed for --live mode with real hardware
|
||||
|
||||
@@ -8,7 +8,7 @@ optionally captures raw ADC samples for offline analysis.
|
||||
|
||||
Usage:
|
||||
python smoke_test.py # Mock mode (no hardware)
|
||||
python smoke_test.py --live # Real FT601 hardware
|
||||
python smoke_test.py --live # Real FT2232H hardware
|
||||
python smoke_test.py --live --adc-dump adc_raw.npy # Capture ADC data
|
||||
|
||||
Self-Test Subsystems:
|
||||
@@ -35,7 +35,7 @@ import numpy as np
|
||||
|
||||
# Add parent directory for radar_protocol import
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
from radar_protocol import RadarProtocol, FT601Connection
|
||||
from radar_protocol import RadarProtocol, FT2232HConnection
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
@@ -67,7 +67,7 @@ TEST_NAMES = {
|
||||
class SmokeTest:
|
||||
"""Host-side smoke test controller."""
|
||||
|
||||
def __init__(self, connection: FT601Connection, adc_dump_path: str = None):
|
||||
def __init__(self, connection: FT2232HConnection, adc_dump_path: str = None):
|
||||
self.conn = connection
|
||||
self.adc_dump_path = adc_dump_path
|
||||
self._adc_samples = []
|
||||
@@ -85,7 +85,7 @@ class SmokeTest:
|
||||
# Step 1: Connect
|
||||
if not self.conn.is_open:
|
||||
if not self.conn.open():
|
||||
log.error("Failed to open FT601 connection")
|
||||
log.error("Failed to open FT2232H connection")
|
||||
return False
|
||||
|
||||
# Step 2: Send self-test trigger (opcode 0x30)
|
||||
@@ -205,15 +205,15 @@ class SmokeTest:
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="AERIS-10 Board Smoke Test")
|
||||
parser.add_argument("--live", action="store_true",
|
||||
help="Use real FT601 hardware (default: mock)")
|
||||
help="Use real FT2232H hardware (default: mock)")
|
||||
parser.add_argument("--device", type=int, default=0,
|
||||
help="FT601 device index")
|
||||
help="FT2232H device index")
|
||||
parser.add_argument("--adc-dump", type=str, default=None,
|
||||
help="Save raw ADC samples to .npy file")
|
||||
args = parser.parse_args()
|
||||
|
||||
mock_mode = not args.live
|
||||
conn = FT601Connection(mock=mock_mode)
|
||||
conn = FT2232HConnection(mock=mock_mode)
|
||||
|
||||
tester = SmokeTest(conn, adc_dump_path=args.adc_dump)
|
||||
success = tester.run()
|
||||
|
||||
Reference in New Issue
Block a user