Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 6b5e04c

Browse files

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/Async_AdvancedWebServer_Country/Async_AdvancedWebServer_Country.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ char pass[] = "12345678"; // your network password (use for WPA, or use
6262

6363
int status = WL_IDLE_STATUS;
6464

65+
char countryCode[3] = { 0, 0, 0 };
66+
6567
AsyncWebServer server(80);
6668

6769
int reqCount = 0; // number of requests received
@@ -91,12 +93,12 @@ body { background-color: #cccccc; font-family: Arial, Helvetica, Sans-Serif; Col
9193
</style>\
9294
</head>\
9395
<body>\
94-
<h2>AsyncWebServer_RP2040W!</h2>\
96+
<h2>AsyncWebServer_RP2040W for %s!</h2>\
9597
<h3>running WiFi on %s</h3>\
9698
<p>Uptime: %d d %02d:%02d:%02d</p>\
9799
<img src=\"/test.svg\" />\
98100
</body>\
99-
</html>", BOARD_NAME, BOARD_NAME, day, hr % 24, min % 60, sec % 60);
101+
</html>", BOARD_NAME, countryCode, BOARD_NAME, day, hr % 24, min % 60, sec % 60);
100102

101103
request->send(200, "text/html", temp);
102104

@@ -167,7 +169,6 @@ void printWifiStatus()
167169
// print your board's country code
168170
// #define CYW43_COUNTRY(A, B, REV) ((unsigned char)(A) | ((unsigned char)(B) << 8) | ((REV) << 16))
169171
uint32_t myCountryCode = cyw43_arch_get_country_code();
170-
char countryCode[3] = { 0, 0, 0 };
171172

172173
countryCode[0] = myCountryCode & 0xFF;
173174
countryCode[1] = (myCountryCode >> 8) & 0xFF;

0 commit comments

Comments
 (0)