Add DAB ANTCAP calibration and fix BT1035 boot banner timing
Extend the FM-only ANTCAP antenna-varactor override to DAB, mirroring the existing mechanism end to end (driver, tuner, service, EEPROM storage, HTTP API). Live sweep on real hardware found no ANTCAP value beating auto-tune on the ensembles tested, so DAB stays on auto-tune by default. Also fix BT1035 boot: the module's real boot banner doesn't appear until ~18-24s after RESET# releases, not the 3.5s previously waited; add a 2-attempt retry and a baud-rate probe fallback for diagnostics. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -288,13 +288,18 @@ public:
|
||||
*
|
||||
* @dname tuneDab
|
||||
* @param freqIndex Ensemble index 0–37.
|
||||
* @param antCap ANTCAP[7:0] override (0-128, AN649 Command 0xB0
|
||||
* ARG4). 0 = automatic front-end tuning; other
|
||||
* values force a specific varactor setting, for
|
||||
* antenna calibration sweeps (mirrors tuneFm).
|
||||
* @return Ok on success, or Si4684Error.
|
||||
* @pubstate sends DAB_TUNE_FREQ and waits for STC.
|
||||
*
|
||||
* @author Michele Bigi
|
||||
* @date 2026-07-06
|
||||
*/
|
||||
[[nodiscard]] std::expected<void, Si4684Error> tuneDab(std::uint8_t freqIndex);
|
||||
[[nodiscard]] std::expected<void, Si4684Error> tuneDab(
|
||||
std::uint8_t freqIndex, std::uint8_t antCap = 0U);
|
||||
|
||||
/**
|
||||
* @brief readDabDigRadStatus — read ensemble lock metrics.
|
||||
|
||||
@@ -96,6 +96,7 @@ public:
|
||||
*
|
||||
* @dname tuneDab
|
||||
* @param freqIndex Ensemble index 0–37.
|
||||
* @param antCap Forwarded to Si4684Driver::tuneDab (0 = auto).
|
||||
* @return Ok on success, or a mapped TunerError.
|
||||
* @pubstate writes dabIndex_ on success.
|
||||
*
|
||||
@@ -103,13 +104,14 @@ public:
|
||||
* @date 2026-07-06
|
||||
*/
|
||||
[[nodiscard]] std::expected<void, core::TunerError> tuneDab(
|
||||
std::uint8_t freqIndex) override;
|
||||
std::uint8_t freqIndex, std::uint8_t antCap = 0U) override;
|
||||
|
||||
/**
|
||||
* @brief tuneFm — tune to an FM centre frequency in kHz.
|
||||
*
|
||||
* @dname tuneFm
|
||||
* @param frequency Validated FM centre frequency.
|
||||
* @param antCap Forwarded to Si4684Driver::tuneFm (0 = auto).
|
||||
* @return Ok on success, or a mapped TunerError.
|
||||
* @pubstate writes fmFrequency_ on success.
|
||||
*
|
||||
@@ -117,7 +119,7 @@ public:
|
||||
* @date 2026-07-06
|
||||
*/
|
||||
[[nodiscard]] std::expected<void, core::TunerError> tuneFm(
|
||||
core::FrequencyKHz frequency) override;
|
||||
core::FrequencyKHz frequency, std::uint8_t antCap = 0U) override;
|
||||
|
||||
/**
|
||||
* @brief seekFm — seek FM with band wrap.
|
||||
|
||||
Reference in New Issue
Block a user