Skip to content

Commit

Permalink
fix: board macro ifelse
Browse files Browse the repository at this point in the history
  • Loading branch information
Bissas committed Nov 24, 2024
1 parent 7998adb commit 7b12a15
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/handler/deploii_handler_WiFi_HTTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,27 @@ void DeploiiHandlerWiFiHTTP::connect(
const char* url,
bool ssl) {
connectWiFi(ssid, pwd);
#if defined(ESP32)
if (ssl)
_http.begin(host, port, url, buypass_cert);
else
_http.begin(host, port, url);

_http.addHeader("Authorization", boardID, false, false);
#elif defined(ARDUINO)
#else
#endif
}

void DeploiiHandlerWiFiHTTP::loop() {
}

void DeploiiHandlerWiFiHTTP::send(const uint8_t* data, size_t size) {
#if defined(ESP32)
_http.POST((uint8_t*)data, size);
#elif defined(ARDUINO)
#else
#endif
}

#if defined(ESP32)
Expand Down Expand Up @@ -67,4 +75,4 @@ void DeploiiHandlerWiFiHTTP::connectWiFi(char* ssid, const char* pwd) {
}
#else
void DeploiiHandlerWiFiHTTP::connectWiFi(char* ssid, const char* pwd) {}
#endif
#endif

0 comments on commit 7b12a15

Please sign in to comment.