mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-19 02:51:38 +02:00
* try to avoid exceptions, added yield
* try to fix DNS problems
This commit is contained in:
parent
7b0eeb2d4e
commit
169bf8c7c8
3 changed files with 7 additions and 4 deletions
|
@ -43,8 +43,6 @@ void Main::setup(const char *ssid, const char *pwd, uint32_t timeout) {
|
|||
mWeb->onNotFound (std::bind(&Main::showNotFound, this));
|
||||
|
||||
startAp = getConfig();
|
||||
if(String(mDeviceName) != "")
|
||||
WiFi.hostname(mDeviceName);
|
||||
|
||||
if(false == startAp)
|
||||
startAp = setupStation(timeout);
|
||||
|
@ -126,6 +124,8 @@ bool Main::setupStation(uint32_t timeout) {
|
|||
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.begin(mStationSsid, mStationPwd);
|
||||
if(String(mDeviceName) != "")
|
||||
WiFi.hostname(mDeviceName);
|
||||
|
||||
delay(5000);
|
||||
Serial.println("wait for network");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue