Test specific WS2812 variants with known datasheet values.
(self)
| 147 | self.fail("\n".join(failures)) |
| 148 | |
| 149 | def test_ws2812_variants(self) -> None: |
| 150 | """Test specific WS2812 variants with known datasheet values.""" |
| 151 | |
| 152 | # WS2812 typical datasheet values (tight timing) |
| 153 | # These should produce the optimized T1=250, T2=625, T3=375 |
| 154 | ws2812_tight = TimingDatasheet( |
| 155 | T0H=250, T0L=1000, T1H=875, T1L=375, name="WS2812_Tight" |
| 156 | ) |
| 157 | |
| 158 | fl = datasheet_to_phase3(ws2812_tight) |
| 159 | self.assertEqual(fl.T1, 250, "WS2812 T1 mismatch") |
| 160 | self.assertEqual(fl.T2, 625, "WS2812 T2 mismatch") |
| 161 | self.assertEqual(fl.T3, 375, "WS2812 T3 mismatch") |
| 162 | |
| 163 | def test_protocol_semantics(self) -> None: |
| 164 | """Verify conversion respects protocol timing semantics.""" |
nothing calls this directly
no test coverage detected