Helper to verify header bytes use maximum gain (31) for all channels Brightness parameter is ignored - gain is always max for maximum precision
| 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 |
| 56 | static 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 |
| 72 | static void verifyLEDData(const fl::vector<u8>& data, size_t offset, u8 r8, u8 g8, u8 b8) { |