Add signal capture and replay feature
Records raw demodulated CC1101 GDO0 output at 100 kHz into a 50 KB bit-packed static buffer (up to 4 seconds). Replay drives GDO0 in direct TX mode at the same sample rate, looping until stopped. - config.h: CAP_SAMPLE_HZ / CAP_DURATION_S / CAP_BUF_BYTES defines - main.cpp: capRecordISR / capReplayISR using hw_timer_t on timer 3 - main.cpp: startCapture / startReplay / stopCapture management functions - main.cpp: capAnalyze() estimates bitrate and duty cycle from transitions - main.cpp: five HTTP endpoints under /api/capture/* - main.cpp: loop() state machine auto-finalises buffer-full capture - kHtml: Capture / Replay card with freq input, radio selector, REC/STOP/REPLAY buttons, progress bar, stats grid, waveform canvas Made-with: Cursor
This commit is contained in:
@@ -84,4 +84,11 @@
|
||||
#define ENC_CLK_PIN 14
|
||||
#define ENC_DT_PIN 21
|
||||
|
||||
// Signal capture / replay
|
||||
// Samples GDO0 (CC1101 demodulated output) at CAP_SAMPLE_HZ during direct RX mode.
|
||||
// Bit-packed into a static buffer. Replay drives GDO0 in direct TX mode at same rate.
|
||||
#define CAP_SAMPLE_HZ 100000 // 100 kHz sample clock
|
||||
#define CAP_DURATION_S 4 // max capture window (seconds)
|
||||
#define CAP_BUF_BYTES ((CAP_SAMPLE_HZ * CAP_DURATION_S) / 8 + 8) // ~50 KB
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user