move to newest framework 6.3.2

This commit is contained in:
andreas 2023-08-24 15:22:02 +02:00
parent ec4bf842ec
commit f025fddc71
6 changed files with 12 additions and 10 deletions

View File

@ -131,7 +131,7 @@ def generateCfg(inFile,outFile,addDirs=[]):
continue
if len(n) > 15:
raise Exception("%s: config names must be max 15 caracters"%n)
data+=' static constexpr const __FlashStringHelper* %s=F("%s");\n'%(n,n)
data+=' static constexpr const char* %s="%s";\n'%(n,n)
data+=' protected:\n'
data+=' GwConfigInterface *configs[%d]={\n'%(l)
first=True

View File

@ -4,8 +4,9 @@
#include "GwLog.h"
#include <Arduino.h>
#include <map>
#include <vector>
#define GW_BOAT_VALUE_LEN 32
#define GWSC(name) static constexpr const __FlashStringHelper* name=F(#name)
#define GWSC(name) static constexpr const char* name=#name
//see https://github.com/wellenvogel/esp32-nmea2000/issues/44
//factor to convert from N2k/SI rad/s to current NMEA rad/min
@ -164,10 +165,10 @@ public:
virtual ~GwBoatItemNameProvider() {}
};
#define GWBOATDATA(type,name,time,fmt) \
static constexpr const __FlashStringHelper* _##name=F(#name); \
GwBoatItem<type> *name=new GwBoatItem<type>(F(#name),GwBoatItemBase::fmt,time,&values) ;
static constexpr const char* _##name=#name; \
GwBoatItem<type> *name=new GwBoatItem<type>(#name,GwBoatItemBase::fmt,time,&values) ;
#define GWSPECBOATDATA(clazz,name,time,fmt) \
clazz *name=new clazz(F(#name),GwBoatItemBase::fmt,time,&values) ;
clazz *name=new clazz(#name,GwBoatItemBase::fmt,time,&values) ;
class GwBoatData{
private:
GwLog *logger;

View File

@ -59,7 +59,7 @@ int GwSocketServer::available()
int client_sock;
struct sockaddr_in _client;
int cs = sizeof(struct sockaddr_in);
client_sock = lwip_accept_r(listener, (struct sockaddr *)&_client, (socklen_t *)&cs);
client_sock = accept(listener, (struct sockaddr *)&_client, (socklen_t *)&cs);
if (client_sock >= 0)
{
int val = 1;

View File

@ -80,7 +80,7 @@ void GwTcpClient::startConnection()
return;
}
fcntl( sockfd, F_SETFL, fcntl( sockfd, F_GETFL, 0 ) | O_NONBLOCK );
int res = lwip_connect_r(sockfd, (struct sockaddr*)&serveraddr, sizeof(serveraddr));
int res = connect(sockfd, (struct sockaddr*)&serveraddr, sizeof(serveraddr));
if (res < 0 ) {
if (errno != EINPROGRESS){
error=String("connect error ")+String(strerror(errno));
@ -258,7 +258,7 @@ void GwTcpClient::resolveHost(String host)
if (xTaskCreate([](void *p)
{
ResolveArgs *args = (ResolveArgs *)p;
struct ip4_addr addr;
esp_ip4_addr_t addr;
addr.addr = 0;
esp_err_t err = mdns_query_a(args->host.c_str(), args->timeout, &addr);
if (err)

View File

@ -64,7 +64,6 @@ void GwWebServer::begin(){
GwWebServer::~GwWebServer(){
server->end();
delete server;
vQueueDelete(queue);
}
void GwWebServer::handleAsyncWebRequest(AsyncWebServerRequest *request, GwRequestMessage *msg)
{

View File

@ -17,8 +17,10 @@ extra_configs=
lib/*task*/platformio.ini
[env]
platform = espressif32 @ 3.4.0
platform = espressif32 @ 6.3.2
framework = arduino
;platform_packages=
; framework-arduinoespressif32 @ 3.20011.230801
lib_deps =
ttlappalainen/NMEA2000-library @ 4.17.2
ttlappalainen/NMEA0183 @ 1.7.1