Skip to content

Commit

Permalink
Update WiFiAPMode (#183)
Browse files Browse the repository at this point in the history
* Modify code allows DUT start softAP when manually keying channel
* Modify code to auto update the user input channel number

Co-authored-by: Zhu Qi <[email protected]>
  • Loading branch information
S10143806H and Zhu Qi authored Jul 3, 2023
1 parent 380a92a commit ccdf823
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ void setup() {
Serial.println("Enter your channel number");
while (Serial.available() == 0) {}
str_channel = Serial.readString();
str_channel.trim();
int checker = str_channel.toInt();
while(str_channel != (String(checker))){
Serial.println("channel should be a number!");
while (Serial.available() == 0) {}
str_channel = Serial.readString();
checker = str_channel.toInt();
}
str_channel.trim();
Serial.print("channel entered: ");
Serial.println(str_channel);
#endif
Expand All @@ -81,7 +81,7 @@ void setup() {
strcpy(pass_cust, str_pass.c_str());
strcpy(channel_cust, str_channel.c_str());
Serial.println(str_ssid.c_str());
status = WiFi.apbegin(ssid_cust, pass_cust, channel, ssid_status);
status = WiFi.apbegin(ssid_cust, pass_cust, channel_cust, ssid_status);
str_ssid = str_pass = str_channel = "";
#endif
delay(10000);
Expand Down

0 comments on commit ccdf823

Please sign in to comment.