fix(board): Farbtemperaturbereiche der Weiss-Varianten korrigieren

Die vier reinen Weiss-Lampen standen flach auf 2500-6500 K, was fuer keine
von ihnen stimmte. Nach Michaels Produktdaten:

- E27 CW/WW, E14 CW/WW, GU10 CW/WW: 2700-6500 K (vorher 2500-5000)
- G95 Vintage:                      2000-5000 K (vorher 2500-5000)

Die drei erstgenannten haben damit oben 1500 K verschenkt, die G95 unten
500 K. Die RGB-Varianten und das EVK standen schon richtig auf 2700-6500.

test_board.c prueft die Bereiche jetzt pro Board statt ueber die Faustregel
"RGB oder nicht" - die G95 ist die Ausnahme, und eine Faustregel, die eine
Ausnahme hat, ist keine. Die beiden Clamp-Tests in test_boot_state.c lesen
die Obergrenze jetzt vom Board, statt die Zahl zu wiederholen: sie pruefen
das Begrenzen, nicht die Konstante.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Michael Sauer
2026-09-13 21:28:33 +02:00
co-authored by Claude Opus 5
parent 00d5a4c532
commit 7a5f26d717
4 changed files with 22 additions and 12 deletions
+7 -2
View File
@@ -29,9 +29,14 @@ static void test_rgb_flags_and_ct_ranges(void)
for (size_t i = 0; i < nl_boards_count; i++) {
const nl_board_t *b = &nl_boards[i];
bool rgb = strstr(b->id, "rgb") != NULL || strcmp(b->id, "evk") == 0;
/* Measured on real bulbs, 2026-09-13: every lamp but the G95 covers 2700..6500 K.
The G95 Vintage is a warm bulb and reaches 2000 K at the bottom but stops at
5000 K - hard-coded per board rather than derived, because "warm variant" is a
property of that one product, not of a class of them. */
bool g95 = strcmp(b->id, "g95_cw") == 0;
TEST_ASSERT_EQUAL_MESSAGE(rgb, b->has_rgb, b->id);
TEST_ASSERT_EQUAL_UINT16(rgb ? 2700 : 2500, b->ct_min);
TEST_ASSERT_EQUAL_UINT16(rgb ? 6500 : 5000, b->ct_max);
TEST_ASSERT_EQUAL_UINT16_MESSAGE(g95 ? 2000 : 2700, b->ct_min, b->id);
TEST_ASSERT_EQUAL_UINT16_MESSAGE(g95 ? 5000 : 6500, b->ct_max, b->id);
}
}