Fix ESP32 compilation failures

Fix Travis not sending email -TBC
This commit is contained in:
Luc 2020-12-18 07:00:19 +01:00
parent 21002cf62a
commit 0101f0a4fe
7 changed files with 12 additions and 14 deletions

View File

@ -63,5 +63,7 @@ script:
notifications: notifications:
email: email:
recipients:
- luc@tech-hunters.com
on_success: always on_success: always
on_failure: always on_failure: always

View File

@ -40,7 +40,7 @@
//COMMUNICATION_PROTOCOL: to communicate with printer or TFT //COMMUNICATION_PROTOCOL: to communicate with printer or TFT
//RAW_SERIAL standard serial //RAW_SERIAL standard serial
//MKS_SERIAL Mks protocol //MKS_SERIAL Mks protocol
#define COMMUNICATION_PROTOCOL MKS_SERIAL #define COMMUNICATION_PROTOCOL RAW_SERIAL
//AUTHENTICATION_FEATURE: protect pages by login password //AUTHENTICATION_FEATURE: protect pages by login password
//#define AUTHENTICATION_FEATURE //#define AUTHENTICATION_FEATURE

Binary file not shown.

View File

@ -22,7 +22,7 @@
#define _VERSION_ESP3D_H #define _VERSION_ESP3D_H
//version and sources location //version and sources location
#define FW_VERSION "3.0.0.a76" #define FW_VERSION "3.0.0.a77"
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0" #define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
#endif //_VERSION_ESP3D_H #endif //_VERSION_ESP3D_H

View File

@ -113,7 +113,7 @@ bool NetConfig::isHostnameValid (const char * hostname)
*/ */
IPAddress NetConfig::localIPAddress() IPAddress NetConfig::localIPAddress()
{ {
IPAddress current_ip = 0; IPAddress current_ip = IPAddress(0,0,0,0);
#if defined( WIFI_FEATURE) #if defined( WIFI_FEATURE)
if (WiFi.getMode() == WIFI_STA) { if (WiFi.getMode() == WIFI_STA) {
current_ip = WiFi.localIP(); current_ip = WiFi.localIP();

View File

@ -265,9 +265,7 @@ bool NetServices::begin()
if(WiFi.getMode() != WIFI_AP) { if(WiFi.getMode() != WIFI_AP) {
// Add service to MDNS-SD // Add service to MDNS-SD
log_esp3d("Add mdns service http / tcp port %d", HTTP_Server::port()); log_esp3d("Add mdns service http / tcp port %d", HTTP_Server::port());
if (!MDNS.addService("http", "tcp", HTTP_Server::port())) { MDNS.addService("http", "tcp", HTTP_Server::port());
log_esp3d("failed");
}
//Add TXT records //Add TXT records
MDNS.addServiceTxt("http", "tcp", "ESP3D", FW_VERSION); MDNS.addServiceTxt("http", "tcp", "ESP3D", FW_VERSION);
} }

View File

@ -56,6 +56,9 @@ typedef WiFiClientSecure TSecureClient;
typedef WiFiClientSecure TSecureClient; typedef WiFiClientSecure TSecureClient;
#include <WiFi.h> #include <WiFi.h>
#include <HTTPClient.h> #include <HTTPClient.h>
extern "C" {
#include "libb64/cdecode.h"
}
#endif //ARDUINO_ARCH_ESP32 #endif //ARDUINO_ARCH_ESP32
#include <base64.h> #include <base64.h>
@ -472,12 +475,7 @@ bool NotificationsService::getEmailFromSettings()
bool NotificationsService::decode64(const char* encodedURL, char *decodedURL) bool NotificationsService::decode64(const char* encodedURL, char *decodedURL)
{ {
size_t out_len = 0; size_t out_len = 0;
#if defined( ARDUINO_ARCH_ESP8266)
out_len = base64_decode_chars(encodedURL, strlen(encodedURL), decodedURL); out_len = base64_decode_chars(encodedURL, strlen(encodedURL), decodedURL);
#endif //ARDUINO_ARCH_ESP8266
#if defined( ARDUINO_ARCH_ESP32)
strcpy(base64_decode(encodedURL, strlen(encodedURL),&out_len);
#endif //ARDUINO_ARCH_ESP32
log_esp3d("URLE: %s", encodedURL); log_esp3d("URLE: %s", encodedURL);
log_esp3d("URLD: %s", decodedURL); log_esp3d("URLD: %s", decodedURL);
return (out_len>0); return (out_len>0);