23constexpr size_t kBlobSize = 28;
24using Blob = std::array<uint8_t, kBlobSize>;
33std::optional<AimMap>
deserialize(std::span<const uint8_t> blob);
Maps a target's image position to turret angles (pure C++20, natively tested).
Blob serialize(const AimMap &map)
Packs a map into the 28-byte versioned layout, with the CRC-32 in the last four bytes.
Definition calibration_blob.cpp:32
std::optional< AimMap > deserialize(std::span< const uint8_t > blob)
Parses a blob; empty if the length, magic, version, CRC or float values are invalid.
Definition calibration_blob.cpp:45
Shared CRC-32 for versioned NVS blobs (pure C++20, natively tested).
uint32_t crc32(std::span< const uint8_t > data)
CRC-32 (IEEE 802.3, reflected, init 0xFFFFFFFF, final xor 0xFFFFFFFF).
Definition crc32.cpp:41