Add BT1035 pairing and station presets (fw 0.7.0).
Expose discoverable mode and A2DP control over REST, add persisted DAB/FM preset list with web UI, and document gaps in docs/TODO.md. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,5 +3,5 @@ idf_component_register(
|
||||
"main.cpp"
|
||||
"hardware_bootstrap.cpp"
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES core net secure_store adau1701 si4684 tuner audio bt1035
|
||||
REQUIRES core net secure_store adau1701 si4684 tuner audio bt1035 bluetooth station
|
||||
)
|
||||
|
||||
@@ -124,4 +124,9 @@ core::CompanionChipStatus HardwareBootstrap::companionChipStatus() noexcept
|
||||
};
|
||||
}
|
||||
|
||||
bt1035::Bt1035Driver& HardwareBootstrap::bt1035Driver()
|
||||
{
|
||||
return gBt1035;
|
||||
}
|
||||
|
||||
} // namespace hardware
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
#include "core/CompanionChipStatus.hpp"
|
||||
|
||||
#include "bt1035/Bt1035Driver.hpp"
|
||||
|
||||
#include <expected>
|
||||
|
||||
namespace audio {
|
||||
@@ -108,6 +110,20 @@ public:
|
||||
* @date 2026-07-06
|
||||
*/
|
||||
[[nodiscard]] static core::CompanionChipStatus companionChipStatus() noexcept;
|
||||
|
||||
/**
|
||||
* @brief bt1035Driver — borrow the BT1035 driver after boot.
|
||||
*
|
||||
* @dname bt1035Driver
|
||||
* @return Reference to the static Bt1035Driver instance.
|
||||
* @pubstate reads static storage initialised by boot().
|
||||
*
|
||||
* Valid only after a successful boot() call in the same process.
|
||||
*
|
||||
* @author Michele Bigi
|
||||
* @date 2026-07-06
|
||||
*/
|
||||
[[nodiscard]] static bt1035::Bt1035Driver& bt1035Driver();
|
||||
};
|
||||
|
||||
} // namespace hardware
|
||||
|
||||
+12
-1
@@ -12,8 +12,10 @@
|
||||
*/
|
||||
|
||||
#include "hardware_bootstrap.hpp"
|
||||
#include "bluetooth/BluetoothService.hpp"
|
||||
#include "net/NetBootstrap.hpp"
|
||||
#include "secure_store/NvsSecureStore.hpp"
|
||||
#include "station/StationService.hpp"
|
||||
#include "tuner/TunerService.hpp"
|
||||
|
||||
#include "esp_log.h"
|
||||
@@ -47,7 +49,7 @@ void heartbeatTask(void* arg)
|
||||
*/
|
||||
extern "C" void app_main()
|
||||
{
|
||||
ESP_LOGI(kTag, "DigiRadio firmware boot — Slice 6");
|
||||
ESP_LOGI(kTag, "DigiRadio firmware boot — Slice 7");
|
||||
|
||||
auto hwResult = hardware::HardwareBootstrap::boot();
|
||||
if (!hwResult) {
|
||||
@@ -60,8 +62,17 @@ extern "C" void app_main()
|
||||
|
||||
static secure_store::NvsSecureStore store;
|
||||
|
||||
static station::StationService stationService(store, tunerService);
|
||||
if (auto loaded = stationService.loadFromStore(); !loaded) {
|
||||
ESP_LOGW(kTag, "station list load failed");
|
||||
}
|
||||
|
||||
static bluetooth::BluetoothService bluetoothService(
|
||||
hardware::HardwareBootstrap::bt1035Driver());
|
||||
|
||||
auto netResult = net::NetBootstrap::start(
|
||||
store, tunerService, hardware::HardwareBootstrap::audioService(),
|
||||
bluetoothService, stationService,
|
||||
hardware::HardwareBootstrap::companionChipStatus());
|
||||
if (!netResult) {
|
||||
ESP_LOGE(kTag, "network bootstrap failed");
|
||||
|
||||
Reference in New Issue
Block a user