1005e50be0
Move scheme and PID training runtime behavior into the pure track_core layer and expose render sinks for injected strip application. Add ESP compatibility adapters, Python bindings/test scaffolding, and in-memory render support so app_track_bt can consume core render and runtime logic without duplicating it. Cover circular/linear rendering boundaries, all scheme runtime types, scheme render_to parity, PID sample de-duplication, speed suppression, and live tuning in track-core tests.
41 lines
966 B
C++
41 lines
966 B
C++
#ifndef D2AF35D4_5EEF_406F_A3F6_F7E6F2AA24C4
|
|
#define D2AF35D4_5EEF_406F_A3F6_F7E6F2AA24C4
|
|
#include "app_strip_if.hpp"
|
|
#include "app_track_model.hpp"
|
|
#include "track_core/render.hpp"
|
|
#include <array>
|
|
#include <cstdint>
|
|
|
|
namespace app::track {
|
|
|
|
struct TrackRenderSpan {
|
|
uint16_t start_led{};
|
|
uint16_t led_count{};
|
|
Color color;
|
|
};
|
|
|
|
struct TrackRenderPlan {
|
|
static constexpr size_t MAX_SPANS = 4;
|
|
|
|
void add_fill(uint16_t start_led, uint16_t led_count, Color color);
|
|
|
|
[[nodiscard]]
|
|
bool empty() const {
|
|
return span_count == 0;
|
|
}
|
|
|
|
std::array<TrackRenderSpan, MAX_SPANS> spans{};
|
|
size_t span_count{};
|
|
};
|
|
|
|
[[nodiscard]]
|
|
TrackRenderPlan make_track_render_plan(const TrackConfig &config, const TrackInfo &info, const report &rep);
|
|
|
|
void apply_render_plan(app::strip::StripView strip, const TrackRenderPlan &plan);
|
|
|
|
[[nodiscard]]
|
|
track_core::TrackRenderSink make_track_render_sink(app::strip::StripView &strip);
|
|
}
|
|
|
|
#endif /* D2AF35D4_5EEF_406F_A3F6_F7E6F2AA24C4 */
|