Compil. fix with updated libs, CRIT locks leak fix

This commit is contained in:
2021-07-27 21:34:55 +03:00
parent ff606482e8
commit 39d876be96
24 changed files with 29637 additions and 30083 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
1234567890

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -20,4 +20,5 @@ int abstractOut::isActive()
int abstractOut::Setup()
{
if (item) item->setCmd(CMD_OFF);
return 1;
}

View File

@@ -1041,6 +1041,7 @@ uint16_t readCache::analogReadCached (uint8_t _pin)
uint8_t readCache::digitalReadCached(uint8_t _pin)
{
///TBD
return 0;
}
#ifdef MCP23017

View File

@@ -575,6 +575,46 @@ return 0;
// Recursive function with small stack consumption
// if cmd defined - execute Ctrl for any group members recursively
// else performs Activity check for group members and return true if any member is active
bool digGroup (aJsonObject *itemArr, itemCmd *cmd, char* subItem)
{ if (!itemArr || itemArr->type!=aJson_Array) return false;
// Iterate across array of names
aJsonObject *i = itemArr->child;
configLocked++;
while (i) {
if (i->type == aJson_String)
{ //debugSerial<< i->valuestring<<endl;
aJsonObject *nextItem = aJson.getObjectItem(items, i->valuestring);
if (nextItem && nextItem->type == aJson_Array) //nextItem is correct item
{
Item it(nextItem);
if (cmd && it.isValid()) it.Ctrl(*cmd,subItem,false); //Execute (non recursive)
//Retrieve itemType
aJsonObject * itemtype = aJson.getArrayItem(nextItem,0);
if (itemtype && itemtype->type == aJson_Int && itemtype->valueint == CH_GROUP)
{ //is Group
aJsonObject * itemSubArray = aJson.getArrayItem(nextItem,1);
short res = digGroup(itemSubArray,cmd,subItem);
if (!cmd && res)
{
configLocked--;
return true; //Not execution, just activity check. If any channel is active - return true
}
}
else // Normal channel
if (!cmd && it.isValid() && it.isActive())
{
configLocked--;
return true; //Not execution, just activity check. If any channel is active - return true
}
}
}
i = i->next;
} //while
configLocked--;
return false;
}
/* LOCKS LEAK - maintenance critical fix
bool digGroup (aJsonObject *itemArr, itemCmd *cmd, char* subItem)
{ if (!itemArr || itemArr->type!=aJson_Array) return false;
// Iterate across array of names
@@ -605,6 +645,7 @@ bool digGroup (aJsonObject *itemArr, itemCmd *cmd, char* subItem)
configLocked--;
return false;
}
*/
int Item::Ctrl(itemCmd cmd, char* subItem, bool allowRecursion)
{

View File

@@ -943,23 +943,23 @@ return false;
int itemCmd::doMapping(aJsonObject *mappingData)
{
return 0;
}
int itemCmd::doReverseMapping (aJsonObject *mappingData)
{
return 0;
}
int itemCmd::doMappingCmd(aJsonObject *mappingData)
{
return 0;
}
int itemCmd::doReverseMappingCmd (aJsonObject *mappingData)
{
return 0;
}
char * itemCmd::toString(char * Buffer, int bufLen, int sendFlags, bool scale100 )

View File

@@ -403,7 +403,7 @@ void setupSyslog()
char *syslogServer = getStringFromConfig(udpSyslogArr, 0);
if (n>1) syslogPort = aJson.getArrayItem(udpSyslogArr, 1)->valueint;
inet_ntoa_r(Ethernet.localIP(),syslogDeviceHostname,sizeof(syslogDeviceHostname));
_inet_ntoa_r(Ethernet.localIP(),syslogDeviceHostname,sizeof(syslogDeviceHostname));
infoSerial<<F("Syslog params:")<<syslogServer<<":"<<syslogPort<<":"<<syslogDeviceHostname<<endl;
udpSyslog.server(syslogServer, syslogPort);
udpSyslog.deviceHostname(syslogDeviceHostname);
@@ -820,7 +820,9 @@ void onInitialStateInitLAN() {
WiFi.mode(WIFI_STA); // ESP 32 - WiFi.disconnect(); instead
infoSerial<<F("WIFI AP/Password:")<<QUOTE(ESP_WIFI_AP)<<F("/")<<QUOTE(ESP_WIFI_PWD)<<endl;
#ifndef ARDUINO_ARCH_ESP32
wifi_set_macaddr(STATION_IF,mac); //ESP32 to check
#endif
WiFi.begin(QUOTE(ESP_WIFI_AP), QUOTE(ESP_WIFI_PWD));
@@ -1256,24 +1258,24 @@ void cmdFunctionIp(int arg_cnt, char **args)
/*
#if defined(ARDUINO_ARCH_AVR) || defined(__SAM3X8E__) || defined(NRF5)
DNSClient dns;
#define inet_aton(cp, addr) dns.inet_aton(cp, addr)
#define _inet_aton(cp, addr) dns._inet_aton(cp, addr)
#else
#define inet_aton(cp, addr) inet_aton(cp, addr)
#define _inet_aton(cp, addr) _inet_aton(cp, addr)
#endif
*/
// switch (arg_cnt) {
// case 5:
if (arg_cnt>4 && inet_aton(args[4], ip)) saveFlash(OFFSET_MASK, ip);
if (arg_cnt>4 && _inet_aton(args[4], ip)) saveFlash(OFFSET_MASK, ip);
else saveFlash(OFFSET_MASK, ip0);
// case 4:
if (arg_cnt>3 && inet_aton(args[3], ip)) saveFlash(OFFSET_GW, ip);
if (arg_cnt>3 && _inet_aton(args[3], ip)) saveFlash(OFFSET_GW, ip);
else saveFlash(OFFSET_GW, ip0);
// case 3:
if (arg_cnt>2 && inet_aton(args[2], ip)) saveFlash(OFFSET_DNS, ip);
if (arg_cnt>2 && _inet_aton(args[2], ip)) saveFlash(OFFSET_DNS, ip);
else saveFlash(OFFSET_DNS, ip0);
// case 2:
if (arg_cnt>1 && inet_aton(args[1], ip)) saveFlash(OFFSET_IP, ip);
if (arg_cnt>1 && _inet_aton(args[1], ip)) saveFlash(OFFSET_IP, ip);
else saveFlash(OFFSET_IP, ip0);
// break;
@@ -1507,10 +1509,23 @@ lan_status loadConfigFromHttp(int arg_cnt, char **args)
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32) //|| defined (NRF5)
HTTPClient httpClient;
#if defined(WIFI_ENABLE)
WiFiClient configEthClient;
#else
EthernetClient configEthClient;
#endif
String fullURI = "http://";
fullURI+=configServer;
fullURI+=URI;
#if defined(ARDUINO_ARCH_ESP8266)
httpClient.begin(configEthClient,fullURI);
#else
httpClient.begin(fullURI);
#endif
int httpResponseCode = httpClient.GET();
if (httpResponseCode > 0) {
infoSerial.printf("[HTTP] GET... code: %d\n", httpResponseCode);

View File

@@ -52,6 +52,7 @@ int out_dmx::getChanType()
}
return 0;
}
return 0;
}
int out_dmx::PixelCtrl(itemCmd cmd, char* subItem, bool show)

View File

@@ -323,7 +323,7 @@ void ReadUniqueID( uint32_t * pdwUniqueID )
}
int inet_aton(const char* aIPAddrString, IPAddress& aResult)
int _inet_aton(const char* aIPAddrString, IPAddress& aResult)
{
// See if we've been given a valid IP address
const char* p =aIPAddrString;
@@ -393,7 +393,7 @@ int inet_aton(const char* aIPAddrString, IPAddress& aResult)
* @return either pointer to buf which now holds the ASCII
* representation of addr or NULL if buf was too small
*/
char *inet_ntoa_r(IPAddress addr, char *buf, int buflen)
char *_inet_ntoa_r(IPAddress addr, char *buf, int buflen)
{
short n;
char intbuf[4];

View File

@@ -54,8 +54,8 @@ void parseBytes(const char* str, char separator, byte* bytes, int maxBytes, int
int log(const char *str, ...);
void printFloatValueToStr(float value, char *valstr);
void ReadUniqueID( uint32_t * pdwUniqueID );
int inet_aton(const char* aIPAddrString, IPAddress& aResult);
char *inet_ntoa_r(IPAddress addr, char *buf, int buflen);
int _inet_aton(const char* aIPAddrString, IPAddress& aResult);
char *_inet_ntoa_r(IPAddress addr, char *buf, int buflen);
void printIPAddress(IPAddress ipAddress);
char* setTopic(char* buf, int8_t buflen, topicType tt, const char* suffix = NULL);
void printUlongValueToStr(char *valstr, unsigned long value);

View File

@@ -94,7 +94,7 @@ lib_deps =
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/Ethernet2
ArduinoHttpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/aJson#b063de5fb8041e039aaff06b21790edb12c22fdf
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/knolleary/pubsubclient.git
@@ -105,8 +105,8 @@ lib_deps =
Streaming
https://github.com/anklimov/NRFFlashStorage
https://github.com/adafruit/Adafruit_NeoPixel.git
https://github.com/anklimov/ArduinoOTA
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library
https://github.com/anklimov/ArduinoOTA#8feeea77869a5039857d2d23d0a46f8a8fe1514a
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library#65438e94ef5cdeb73d7a79d37b8ca46ee9331cd2
https://github.com/arcao/Syslog.git
br3ttb/PID@^1.2.1
monitor_speed = 115200
@@ -141,7 +141,7 @@ lib_ignore =
lib_deps =
https://github.com/ebenolson/WIFIMANAGER-ESP32.git
https://github.com/zhouhan0126/WebServer-esp32.git
https://github.com/anklimov/aJson
https://github.com/anklimov/aJson#b063de5fb8041e039aaff06b21790edb12c22fdf
https://github.com/anklimov/CmdArduino
https://github.com/knolleary/pubsubclient.git
Streaming
@@ -160,8 +160,8 @@ lib_deps =
SparkFun CCS811 Arduino Library@~1.0.7
M5Stack
Adafruit NeoPixel
https://github.com/anklimov/ArduinoOTA
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library
https://github.com/anklimov/ArduinoOTA#8feeea77869a5039857d2d23d0a46f8a8fe1514a
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library#65438e94ef5cdeb73d7a79d37b8ca46ee9331cd2
https://github.com/arcao/Syslog.git
br3ttb/PID@^1.2.1
monitor_speed = 115200
@@ -199,7 +199,7 @@ lib_ignore =
lib_deps =
https://github.com/ebenolson/WIFIMANAGER-ESP32.git
https://github.com/zhouhan0126/WebServer-esp32.git
https://github.com/anklimov/aJson
https://github.com/anklimov/aJson#b063de5fb8041e039aaff06b21790edb12c22fdf
https://github.com/anklimov/CmdArduino
https://github.com/knolleary/pubsubclient.git
Streaming
@@ -216,8 +216,8 @@ lib_deps =
ClosedCube HDC1080
SparkFun CCS811 Arduino Library@~1.0.7
Adafruit NeoPixel
https://github.com/anklimov/ArduinoOTA
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library
https://github.com/anklimov/ArduinoOTA#8feeea77869a5039857d2d23d0a46f8a8fe1514a
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library#65438e94ef5cdeb73d7a79d37b8ca46ee9331cd2
https://github.com/arcao/Syslog.git
br3ttb/PID@^1.2.1
monitor_speed = 115200
@@ -251,7 +251,7 @@ lib_deps =
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxDue
ArduinoHttpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/aJson#b063de5fb8041e039aaff06b21790edb12c22fdf
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/Ethernet5100
@@ -267,8 +267,8 @@ lib_deps =
ClosedCube HDC1080
SparkFun CCS811 Arduino Library@~1.0.7
Adafruit NeoPixel
https://github.com/anklimov/ArduinoOTA
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library
https://github.com/anklimov/ArduinoOTA#8feeea77869a5039857d2d23d0a46f8a8fe1514a
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library#65438e94ef5cdeb73d7a79d37b8ca46ee9331cd2
br3ttb/PID@^1.2.1
monitor_speed = 115200
@@ -309,7 +309,7 @@ lib_deps =
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxDue
ArduinoHttpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/aJson#b063de5fb8041e039aaff06b21790edb12c22fdf
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/Ethernet.git
@@ -325,8 +325,8 @@ lib_deps =
ClosedCube HDC1080
SparkFun CCS811 Arduino Library@~1.0.7
Adafruit NeoPixel
https://github.com/anklimov/ArduinoOTA
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library
https://github.com/anklimov/ArduinoOTA#8feeea77869a5039857d2d23d0a46f8a8fe1514a
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library#65438e94ef5cdeb73d7a79d37b8ca46ee9331cd2
br3ttb/PID@^1.2.1
monitor_speed = 115200
@@ -355,7 +355,7 @@ lib_deps =
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxSimple
https://github.com/anklimov/httpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/aJson#b063de5fb8041e039aaff06b21790edb12c22fdf
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/DMXSerial
@@ -371,8 +371,8 @@ lib_deps =
ClosedCube HDC1080
SparkFun CCS811 Arduino Library@~1.0.7
Adafruit NeoPixel
https://github.com/anklimov/ArduinoOTA
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library
https://github.com/anklimov/ArduinoOTA#8feeea77869a5039857d2d23d0a46f8a8fe1514a
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library#65438e94ef5cdeb73d7a79d37b8ca46ee9331cd2
br3ttb/PID@^1.2.1
monitor_speed = 115200
@@ -402,7 +402,7 @@ lib_deps =
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxSimple
https://github.com/anklimov/httpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/aJson#b063de5fb8041e039aaff06b21790edb12c22fdf
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/DMXSerial
@@ -417,8 +417,8 @@ lib_deps =
ClosedCube HDC1080
SparkFun CCS811 Arduino Library@~1.0.7
Adafruit NeoPixel
https://github.com/anklimov/ArduinoOTA
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library
https://github.com/anklimov/ArduinoOTA#8feeea77869a5039857d2d23d0a46f8a8fe1514a
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library#65438e94ef5cdeb73d7a79d37b8ca46ee9331cd2
br3ttb/PID@^1.2.1
monitor_speed = 115200
@@ -464,7 +464,7 @@ lib_deps =
;https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/ESP-Dmx
ESP8266HTTPClient
https://github.com/anklimov/aJson
https://github.com/anklimov/aJson#b063de5fb8041e039aaff06b21790edb12c22fdf
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/knolleary/pubsubclient.git
@@ -480,8 +480,8 @@ lib_deps =
ClosedCube HDC1080
SparkFun CCS811 Arduino Library@~1.0.7
Adafruit NeoPixel
https://github.com/anklimov/ArduinoOTA.git
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library
https://github.com/anklimov/ArduinoOTA#8feeea77869a5039857d2d23d0a46f8a8fe1514a
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library#65438e94ef5cdeb73d7a79d37b8ca46ee9331cd2
br3ttb/PID@^1.2.1
monitor_speed = 115200
@@ -513,7 +513,7 @@ lib_deps =
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxSimple
https://github.com/anklimov/httpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/aJson#b063de5fb8041e039aaff06b21790edb12c22fdf
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/DMXSerial
@@ -528,8 +528,8 @@ lib_deps =
ClosedCube HDC1080
SparkFun CCS811 Arduino Library@~1.0.7
Adafruit NeoPixel
https://github.com/anklimov/ArduinoOTA
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library
https://github.com/anklimov/ArduinoOTA#8feeea77869a5039857d2d23d0a46f8a8fe1514a
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library#65438e94ef5cdeb73d7a79d37b8ca46ee9331cd2
br3ttb/PID@^1.2.1
monitor_speed = 115200
@@ -562,7 +562,7 @@ lib_deps =
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxDue
ArduinoHttpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/aJson#b063de5fb8041e039aaff06b21790edb12c22fdf
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/Ethernet2
@@ -579,8 +579,8 @@ lib_deps =
ClosedCube HDC1080
SparkFun CCS811 Arduino Library@~1.0.7
Adafruit NeoPixel
https://github.com/anklimov/ArduinoOTA
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library
https://github.com/anklimov/ArduinoOTA#8feeea77869a5039857d2d23d0a46f8a8fe1514a
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library#65438e94ef5cdeb73d7a79d37b8ca46ee9331cd2
br3ttb/PID@^1.2.1
monitor_speed = 115200
@@ -617,7 +617,7 @@ lib_deps =
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxDue
ArduinoHttpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/aJson#b063de5fb8041e039aaff06b21790edb12c22fdf
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/Ethernet
@@ -634,8 +634,8 @@ lib_deps =
ClosedCube HDC1080
SparkFun CCS811 Arduino Library@~1.0.7
Adafruit NeoPixel
https://github.com/anklimov/ArduinoOTA
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library
https://github.com/anklimov/ArduinoOTA#8feeea77869a5039857d2d23d0a46f8a8fe1514a
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library#65438e94ef5cdeb73d7a79d37b8ca46ee9331cd2
br3ttb/PID@^1.2.1
monitor_speed = 115200
@@ -665,7 +665,7 @@ lib_deps =
https://github.com/anklimov/DS2482_OneWire
https://github.com/anklimov/DmxSimple
https://github.com/anklimov/httpClient
https://github.com/anklimov/aJson
https://github.com/anklimov/aJson#b063de5fb8041e039aaff06b21790edb12c22fdf
https://github.com/anklimov/CmdArduino
https://github.com/anklimov/ModbusMaster
https://github.com/anklimov/DMXSerial
@@ -680,8 +680,8 @@ lib_deps =
ClosedCube HDC1080
SparkFun CCS811 Arduino Library@~1.0.7
Adafruit NeoPixel
https://github.com/anklimov/ArduinoOTA
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library
https://github.com/anklimov/ArduinoOTA#8feeea77869a5039857d2d23d0a46f8a8fe1514a
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library#65438e94ef5cdeb73d7a79d37b8ca46ee9331cd2
https://github.com/arcao/Syslog.git
br3ttb/PID@^1.2.1
monitor_speed = 115200
@@ -726,7 +726,7 @@ lib_ignore =
M5Stack
ArduinoOTA
lib_deps =
https://github.com/anklimov/aJson
https://github.com/anklimov/aJson#b063de5fb8041e039aaff06b21790edb12c22fdf
https://github.com/anklimov/CmdArduino
ArduinoHttpClient
https://github.com/knolleary/pubsubclient.git
@@ -734,7 +734,7 @@ lib_deps =
UIPEthernet
https://github.com/anklimov/NRFFlashStorage
Adafruit NeoPixel
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library
https://github.com/adafruit/Adafruit-MCP23017-Arduino-Library#65438e94ef5cdeb73d7a79d37b8ca46ee9331cd2
SPI
br3ttb/PID@^1.2.1
monitor_speed = 115200