Skip to content

Commit 1948c8d

Browse files
committed
fixed GI test
1 parent 61651c1 commit 1948c8d

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/PPUC.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -684,15 +684,16 @@ void PPUC::LampTest() {
684684
printf("\nGI Test\n");
685685
printf("=========\n");
686686

687-
for (const auto& lamp : GetLamps()) {
688-
if (lamp.type == LED_TYPE_GI) {
689-
printf("\nBoard: %d\nPort: %d\nNumber: %d\nDescription: %s\n", lamp.board,
690-
lamp.port, lamp.number, lamp.description.c_str());
691-
SetLampState(lamp.number, 1);
692-
std::this_thread::sleep_for(std::chrono::milliseconds(2000));
693-
SetLampState(lamp.number, 0);
694-
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
687+
for (uint8_t i = 1; i <= 8; i++) {
688+
if (PLATFORM_WPC != m_platform && i > 1) {
689+
break;
695690
}
691+
printf("Setting GI String %d to brightness to %d\n", i, 8);
692+
m_pRS485Comm->QueueEvent(new Event(EVENT_SOURCE_GI, /* string */ i,
693+
/* full brightness */ 8));
694+
std::this_thread::sleep_for(std::chrono::milliseconds(5000));
695+
m_pRS485Comm->QueueEvent(new Event(EVENT_SOURCE_GI, /* string */ i, 0));
696+
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
696697
}
697698
}
698699

0 commit comments

Comments
 (0)