From 7b12a1528f1fb83acc7f2a36a988fc39dced0573 Mon Sep 17 00:00:00 2001 From: Bissas Date: Sun, 24 Nov 2024 13:46:57 +0100 Subject: [PATCH] fix: board macro ifelse --- src/handler/deploii_handler_WiFi_HTTP.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/handler/deploii_handler_WiFi_HTTP.cpp b/src/handler/deploii_handler_WiFi_HTTP.cpp index f77344d..c90ca62 100644 --- a/src/handler/deploii_handler_WiFi_HTTP.cpp +++ b/src/handler/deploii_handler_WiFi_HTTP.cpp @@ -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) @@ -67,4 +75,4 @@ void DeploiiHandlerWiFiHTTP::connectWiFi(char* ssid, const char* pwd) { } #else void DeploiiHandlerWiFiHTTP::connectWiFi(char* ssid, const char* pwd) {} -#endif \ No newline at end of file +#endif