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

Function verifyHeaderBytes

tests/fl/chipsets/encoders/hd108.hpp:56–69  ·  view source on GitHub ↗

Helper to verify header bytes use maximum gain (31) for all channels Brightness parameter is ignored - gain is always max for maximum precision

Source from the content-addressed store, hash-verified

54/// Helper to verify header bytes use maximum gain (31) for all channels
55/// Brightness parameter is ignored - gain is always max for maximum precision
56static void verifyHeaderBytes(const fl::vector<u8>& data, size_t offset, u8 expected_bri5) {
57 (void)expected_bri5; // Unused - all gains are max (31) regardless of brightness input
58
59 u8 f0 = data[offset];
60 u8 f1 = data[offset + 1];
61
62 // Per-channel encoding: f0=[1][RRRRR][GG], f1=[GGG][BBBBB]
63 // All channels use maximum gain: R=G=B=31
64 u8 expected_f0 = 0xFF; // [1][11111][11]
65 u8 expected_f1 = 0xFF; // [111][11111]
66
67 FL_CHECK_EQ(f0, expected_f0);
68 FL_CHECK_EQ(f1, expected_f1);
69}
70
71/// Helper to verify LED RGB16 values with gamma correction
72static void verifyLEDData(const fl::vector<u8>& data, size_t offset, u8 r8, u8 g8, u8 b8) {

Callers 1

hd108.hppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected