запущен тест между есп с перемычкой

This commit is contained in:
2026-08-07 16:04:30 +03:00
parent 4b88ac6a42
commit a8099bf2b8
14 changed files with 449 additions and 121 deletions

View File

@@ -54,9 +54,12 @@ bool PulseReceiver::start(uint32_t expectedHz) {
receiveChunkSymbols_ = static_cast<uint16_t>(symbols);
if (rmt_enable(channel_) != ESP_OK) return false;
rmt_receive_config_t cfg = {};
cfg.signal_range_min_ns = 20;
cfg.signal_range_min_ns = 1000000000UL / CAPTURE_RESOLUTION_HZ;
const uint64_t maxNs = 4000000000ULL / (expectedHz ? expectedHz : 1);
cfg.signal_range_max_ns = maxNs > 100000000ULL ? 100000000UL : static_cast<uint32_t>(maxNs);
// A duration field is 15 bits. Keep the driver's end-of-signal threshold
// strictly below that hardware limit (IDF rejects larger values).
const uint64_t hardwareMaxNs = 32766ULL * 1000000000ULL / CAPTURE_RESOLUTION_HZ;
cfg.signal_range_max_ns = static_cast<uint32_t>(maxNs > hardwareMaxNs ? hardwareMaxNs : maxNs);
cfg.flags.en_partial_rx = true;
if (rmt_receive(channel_, receiveBuffer_,
receiveChunkSymbols_ * sizeof(receiveBuffer_[0]), &cfg) != ESP_OK) {