Initial standalone track core

This commit is contained in:
2026-05-15 16:02:44 +08:00
commit 84598cad20
15 changed files with 1733 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
#pragma once
#include <cstdint>
#include <span>
#include <variant>
#include <vector>
#include "track_core/model.hpp"
namespace track_core {
struct DecodedScheme {
std::uint8_t id{};
Color color{Color::white()};
SchemeKind kind{SchemeKind::speed_input_time_segmented_mileage_free};
AccelerationProfile acceleration_profile{AccelerationProfile::smooth};
std::variant<
std::vector<SMSegment>,
std::vector<MTSegment>,
std::vector<STSegment>,
std::vector<RepeatedSMSegment>>
segments;
};
[[nodiscard]]
expected<DecodedScheme, TrackError> decode_scheme(
std::uint8_t id,
Color color,
std::span<const std::uint8_t> binary);
} // namespace track_core