Skip to content

Commit 7fcb8e1

Browse files
committed
feat(wokwi-ili9341): add completion message and stop execution in test
1 parent f6ab884 commit 7fcb8e1

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

wokwi-ili9341/lcd-uno/ili9341.test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ steps:
1313
- take-screenshot:
1414
part-id: 'lcd1'
1515
compare-with: 'screenshots/count-1.png'
16+
- wait-serial: 'Test completed'

wokwi-ili9341/lcd-uno/src/main.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,16 @@ void loop() {
4848
Serial.println(counter);
4949

5050
counter++;
51+
52+
// Stop after counter reaches 2 (test only needs 0 and 1)
53+
// After printing Counter: 1, counter becomes 2, so stop when counter > 1
54+
if (counter > 1) {
55+
Serial.println("Test completed");
56+
while (1) {
57+
// Stop execution
58+
delay(1000);
59+
}
60+
}
61+
5162
delay(1000);
5263
}

0 commit comments

Comments
 (0)