добавлена бета проверка драйверов

This commit is contained in:
2026-08-14 12:01:07 +03:00
parent a17e8962b4
commit 037bb37e62
20 changed files with 1796 additions and 156 deletions

View File

@@ -3,13 +3,14 @@
#include <string.h>
bool Measurement::start(float hz, float duty, float tolerance, uint32_t timeMs,
uint16_t averagingPeriods, uint8_t settleCycles) {
uint16_t averagingPeriods, uint8_t settleCycles,
bool activeRxLightOn) {
if (!task_ && xTaskCreate(taskEntry, "optical-rx", 4096, this, 4, &task_) != pdPASS) return false;
expectedHz_ = static_cast<uint32_t>(hz + 0.5f);
expectedDutyPct_ = duty;
tolerance = effectiveTolerancePct(tolerance);
if (!expectedHz_ || !timeMs || !averagingPeriods ||
!receiver_.start(expectedHz_, expectedDutyPct_)) return false;
!receiver_.start(expectedHz_, expectedDutyPct_, activeRxLightOn)) return false;
settleCycles_ = settleCycles; settleLeft_ = settleCycles;
tolerancePct_ = tolerance;
stepTimeMs_ = (timeMs + MEASUREMENT_PROGRESS_STEPS - 1U) / MEASUREMENT_PROGRESS_STEPS;