Skip to content

Commit

Permalink
chore: changed structure of macro conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
Bissas committed Mar 10, 2024
1 parent 7993fc8 commit 305b9d4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/handler/deploii_handler_WiFi_WS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,21 @@ void DeploiiHandlerWiFiWS::connect(
Helper function definitions
*/

#ifdef ESP32
#if defined(ESP32)

void connectWiFi(char* ssid, const char* pwd) {
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, pwd);
while (WiFi.status() != WL_CONNECTED) delay(Deploii_WIFI_RECONNECT_TIME);
}

#endif

#ifdef ARDUINO
#elif defined(ARDUINO)

void connectWiFi(char* ssid, const char* pwd) {
while (WiFi.begin(SSID, pwd) != WL_CONNECTED) delay(Deploii_WIFI_RECONNECT_TIME);
}

#else
void connectWiFi(const char* ssid, const char* pwd) {}

#endif

0 comments on commit 305b9d4

Please sign in to comment.