MCPcopy Create free account
hub / github.com/FastLED/FastLED / verifyLEDFrame

Function verifyLEDFrame

tests/fl/chipsets/encoders/lpd6803.hpp:49–59  ·  view source on GitHub ↗

Helper: Verify 16-bit LED frame at specific offset

Source from the content-addressed store, hash-verified

47
48// Helper: Verify 16-bit LED frame at specific offset
49static void verifyLEDFrame(const vector<u8>& data, size_t offset, u8 r, u8 g, u8 b) {
50 FL_REQUIRE(data.size() >= offset + 2);
51
52 u16 actual = (static_cast<u16>(data[offset]) << 8) | data[offset + 1];
53 u16 expected = lpd6803EncodeRGB(r, g, b);
54
55 FL_CHECK(actual == expected);
56
57 // Verify marker bit is set
58 FL_CHECK((actual & 0x8000) == 0x8000);
59}
60
61} // namespace test_lpd6803
62

Callers 1

lpd6803.hppFile · 0.70

Calls 2

lpd6803EncodeRGBFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected