Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions config/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,36 @@ unit-test:
command: make test_uart_tx
query: uart_multiple_boards_tx == '1:1'
working_dir: extras/arduino-core-tests

unit-test-wifi-tcp:
- description: Compiling, flashing and monitoring WIFI TCP server unit test.
command: make test_wifi_server
query: wifi_multiple_boards_server_tcp == '1:1'
working_dir: extras/arduino-core-tests

- description: Compiling, flashing and monitoring WIFI TCP client unit test.
command: make test_wifi_client
query: wifi_multiple_boards_client_tcp == '1:1'
working_dir: extras/arduino-core-tests

unit-test-wifi-udp:
- description: Compiling, flashing and monitoring WIFI UDP server unit test.
command: make test_wifi_udp_server
query: wifi_multiple_boards_server_udp == '1:1'
working_dir: extras/arduino-core-tests

- description: Compiling, flashing and monitoring WIFI UDP client unit test.
command: make test_wifi_udp_client
query: wifi_multiple_boards_client_udp == '1:1'
working_dir: extras/arduino-core-tests

unit-test-wifi-sta-ap:
- description: Compiling, flashing and monitoring WIFI Access point unit test.
command: make test_wifi_ap
query: wifi_multiple_boards_ap == '1:1'
working_dir: extras/arduino-core-tests

- description: Compiling, flashing and monitoring WIFI station unit test.
command: make test_wifi_sta
query: wifi_multiple_boards_sta == '1:1'
working_dir: extras/arduino-core-tests
9 changes: 6 additions & 3 deletions config/user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ unit-test:
- unit-test-iic-pingpong
- unit-test-spi-pingpong
- unit-test-digital-io
- unit-test-interrupts
- unit-test-time
- unit-test-random
- unit-test-uart
- unit-test-interrupts
- unit-test-tone
- unit-test-spi-loopback
- unit-test-iic-single-board
- unit-test-wifi-sta-ap
- unit-test-analog-io-adc
- unit-test-random
- unit-test-analog-io-pwm
- unit-test-pulse
- unit-test-uart
- unit-test-wifi-tcp
- unit-test-wifi-udp
2 changes: 1 addition & 1 deletion libraries/WiFi/src/WiFi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ int8_t WiFiClass::scanNetworks() {

constexpr uint16_t timeout = 1000; /* 1000 times by 10 ms delay = 10 seconds */
uint16_t timer = 0;
while (scan_results.status == CY_WCM_SCAN_INCOMPLETE || timer < timeout) {
while (scan_results.status == CY_WCM_SCAN_INCOMPLETE && timer < timeout) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change to avoid the timeout?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here a timeout was added to exit the loop after 10 seconds in case the WCM_SCAN_INCOMPLETE occurs.
In the previous logic there was an issue as the code would get stuck in infinite loop because of OR condition. It should have been AND condition here. So that the while loop breaks when timeout occurs.

delay(10);
timer++;
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/WiFi/src/WiFi.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ typedef enum {
} wl_status_t;

typedef enum {
WIFI_STATUS_UNINITED = 0,
WIFI_STATUS_UNINITED = 255,
WIFI_STATUS_INITED = WL_IDLE_STATUS,
WIFI_STATUS_STA_CONNECTED = WL_CONNECTED,
WIFI_STATUS_AP_CONNECTED = WL_AP_LISTENING,
Expand Down
Loading