Add preset polish and broadcast metadata (fw 0.8.0).

Ship station reorder, DAB playing ids in presets, RDS PS/RT and DAB DLS in tuner status, Si4684 data-service read, host tests, and UI now-playing lines.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-07 00:01:49 +02:00
co-authored by Cursor
parent 9f76ab9e74
commit 0fc714e431
34 changed files with 1379 additions and 65 deletions
@@ -21,6 +21,7 @@
#include <cstdint>
#include <expected>
#include <optional>
#include <span>
#include <vector>
@@ -236,6 +237,21 @@ public:
*/
[[nodiscard]] std::expected<Si4684FmRdsStatus, Si4684Error> readFmRds();
/**
* @brief readDabServiceData — read one queued DAB data-service block.
*
* @dname readDabServiceData
* @param statusOnly Poll queue depth without consuming payload.
* @param ack Acknowledge DSRVINT when reading payload.
* @return Data block on success, nullopt when queue empty, or Si4684Error.
* @pubstate reads GET_DIGITAL_SERVICE_DATA response bytes.
*
* @author Michele Bigi
* @date 2026-07-06
*/
[[nodiscard]] std::expected<std::optional<Si4684DabServiceData>, Si4684Error>
readDabServiceData(bool statusOnly, bool ack);
/**
* @brief installDefaultDabFrequencyPlan — load Band III frequency list.
*
@@ -12,10 +12,14 @@
*/
#pragma once
#include "core/DabDynamicLabelAccumulator.hpp"
#include "core/FrequencyKHz.hpp"
#include "core/ITuner.hpp"
#include "core/RdsMetadataAccumulator.hpp"
#include "si4684/Si4684Driver.hpp"
#include <optional>
namespace si4684 {
/**
@@ -190,6 +194,10 @@ private:
std::uint8_t dabIndex_;
core::FrequencyKHz fmFrequency_;
std::uint8_t volume_;
core::RdsMetadataAccumulator rdsMetadata_;
core::DabDynamicLabelAccumulator dabDynamicLabel_;
std::optional<std::uint32_t> lastDabServiceId_;
std::optional<std::uint32_t> lastDabComponentId_;
};
} // namespace si4684
@@ -18,6 +18,7 @@
#include <array>
#include <cstddef>
#include <cstdint>
#include <vector>
namespace si4684 {
@@ -113,6 +114,27 @@ struct Si4684FmRdsStatus {
std::uint16_t blockC; ///< RDS block C.
std::uint16_t blockD; ///< RDS block D.
bool received; ///< Group received flag.
std::uint8_t fifoUsed; ///< Remaining groups in the RDS FIFO.
};
/**
* @brief Si4684DabServiceData — one GET_DIGITAL_SERVICE_DATA block.
*
* @dname Si4684DabServiceData
* @return n/a (type)
* @pubstate Plain DTO from GET_DIGITAL_SERVICE_DATA response bytes.
*
* @author Michele Bigi
* @date 2026-07-06
*/
struct Si4684DabServiceData {
std::uint32_t serviceId; ///< Associated DAB service identifier.
std::uint32_t componentId; ///< Associated component identifier.
std::uint8_t dataSrc; ///< Payload source (2 = DLS PAD).
std::uint16_t byteCount; ///< Payload byte count.
std::uint16_t segmentIndex; ///< Zero-based segment index.
std::uint16_t segmentCount; ///< Total segments for this label object.
std::vector<std::uint8_t> payload; ///< Raw payload bytes.
};
/**