How twotoz/triversity works
Triversity is an experimental FPV diversity receiver: three ESP32-C5 units stream raw IQ to a Tang Nano FPGA, which combines before demodulation and produces live colour video and optional HQ DVR recordings. The graph preserves the documented receiver, display, menu, and recording stages, plus the firmware controls and host-side signal models. Several FPGA runtime implementations are absent from the supplied tree, so those subsystems use supported directory paths; their links reflect README descriptions rather than inspected RTL.
Main entry points: receiver.c Receiver control · rf.c RF and PHY · fpga FM demodulation · app.js Flasher interface
Components 26
RF receivers
- Firmware startup
c5/main/main.c - Receiver control
c5/main/receiver.c - RF and PHY
c5/main/rf.c - Calibration
c5/main/calibration.c - Gain control
c5/main/gain.c - IQ transport
c5/main/transport.c
FPGA video
- IQ alignment and fusion
fpga - FM demodulation
fpga - Colour video
fpga - Menu and OSD
fpga
Recording
- Field buffer
fpga - HQ DVR JPEG
fpga
Host models
- IQ fusion models
fpga/model/mrc3_model.py - Receiver evaluation
fpga/model/eval3.py - Colour model
fpga/model/chroma_model.py - Fading study
fpga/sim/fading/fade_study.py
Web flasher
- Flasher interface
web/app.js - ESP flashing
web/esptool.js - FPGA flashing
web/fpga.js
Other components
- FPV transmitter
- Three antennas
- LCD or HDMI
- TF card
- Operator
- C5 boards
- Tang FPGA
Connections 25
- FPV transmitter → Three antennas: transmits to
- Three antennas → RF and PHY: receive signal
- Firmware startup → Receiver control: starts
c5/main/main.c - Firmware startup → RF and PHY: starts radio
c5/main/main.c - Receiver control → RF and PHY: controls
c5/main/receiver.c - Receiver control → Gain control: manages gain
c5/main/receiver.c - Calibration → Receiver control: calibrates
- RF and PHY → IQ transport: streams IQ
- IQ transport → IQ alignment and fusion: sends IQ
- IQ alignment and fusion → FM demodulation: feeds fused IQ
- FM demodulation → Colour video: demodulates video
- Colour video → LCD or HDMI: drives picture
- Menu and OSD → LCD or HDMI: overlays menu
- Operator → Menu and OSD: controls menu
- FM demodulation → Field buffer: buffers fields
- Field buffer → HQ DVR JPEG: provides fields
- HQ DVR JPEG → TF card: writes JPEGs
- IQ fusion models → Receiver evaluation: evaluated by
fpga/model/eval3.py - Receiver evaluation → Colour model: compared with
fpga/model/chroma_model.py - Fading study → IQ fusion models: studies fusion
fpga/sim/fading/fade_study.py - Operator → Flasher interface: selects firmware
web/app.js - Flasher interface → ESP flashing: flashes C5
web/app.js - Flasher interface → FPGA flashing: loads bitstream
web/app.js - ESP flashing → C5 boards: programs
- FPGA flashing → Tang FPGA: programs