cleared some warnings
This commit is contained in:
@@ -6,33 +6,36 @@
|
||||
#define EEPROM_SIZE 512
|
||||
#define EEPROMSTRUCT_OFFSET 0
|
||||
|
||||
#define EEPROM_STRING_SMALL 32
|
||||
#define EEPROM_STRING_LARGE 64
|
||||
|
||||
void startEeprom(void);
|
||||
void storeApMode(bool state);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool enable;
|
||||
char channel[32];
|
||||
char channel[EEPROM_STRING_SMALL];
|
||||
} channel_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool apMode;
|
||||
char ssid[32];
|
||||
char password[32];
|
||||
char noderedHost[64];
|
||||
char noderedUrl[32];
|
||||
char ssid[EEPROM_STRING_SMALL];
|
||||
char password[EEPROM_STRING_SMALL];
|
||||
char noderedHost[EEPROM_STRING_LARGE];
|
||||
char noderedUrl[EEPROM_STRING_SMALL];
|
||||
uint32_t updateTime;
|
||||
char device[32];
|
||||
char device[EEPROM_STRING_SMALL];
|
||||
channel_t channel[INPUT_CHANNELS]; //for clearity, 0 not used
|
||||
char www_username[32];
|
||||
char www_password[32];
|
||||
char www_username[EEPROM_STRING_SMALL];
|
||||
char www_password[EEPROM_STRING_SMALL];
|
||||
bool ssdp;
|
||||
bool use_prtg;
|
||||
bool use_nodered;
|
||||
char prtgHost[32];
|
||||
char prtgHost[EEPROM_STRING_SMALL];
|
||||
uint32_t prtgHttpPort;
|
||||
char serialnumber[32]; //1602IOT034
|
||||
char serialnumber[EEPROM_STRING_SMALL]; //1602IOT034
|
||||
bool isSerialSet;
|
||||
bool use_mdns;
|
||||
bool use_llmnr;
|
||||
|
||||
@@ -20,4 +20,6 @@ lib_deps =
|
||||
me-no-dev/ESP Async WebServer@^1.2.3
|
||||
monitor_speed = 115200
|
||||
check_tool = cppcheck, clangtidy
|
||||
check_skip_packages = yes
|
||||
check_skip_packages = yes
|
||||
;check_flags =
|
||||
; cppcheck: --addon=cert.py
|
||||
@@ -266,8 +266,12 @@ void InputsGet(AsyncWebServerRequest *request)
|
||||
}
|
||||
}
|
||||
|
||||
//std::array<const char, INPUT_CHANNELS> enableTable = {"", "en1", "en2", "en3", "en4"};
|
||||
const char *enableTable[INPUT_CHANNELS] = {"", "en1", "en2", "en3", "en4"};
|
||||
|
||||
//std::array<const char, INPUT_CHANNELS> *channelTable = {"", "ch1Name", "ch2Name", "ch3Name", "ch4Name"};
|
||||
const char *channelTable[INPUT_CHANNELS] = {"", "ch1Name", "ch2Name", "ch3Name", "ch4Name"};
|
||||
|
||||
void InputsPost(AsyncWebServerRequest *request)
|
||||
{
|
||||
if (isAuthenticated(request))
|
||||
|
||||
@@ -181,11 +181,12 @@ channel_t *getEepromChannel(int channel)
|
||||
|
||||
bool anyChannelEnabled()
|
||||
{
|
||||
if (eepromStruct.channel[1].enable == true || eepromStruct.channel[2].enable == true || eepromStruct.channel[3].enable == true || eepromStruct.channel[4].enable == true)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return (eepromStruct.channel[1].enable || eepromStruct.channel[2].enable || eepromStruct.channel[3].enable || eepromStruct.channel[4].enable);
|
||||
// if (eepromStruct.channel[1].enable == true || eepromStruct.channel[2].enable == true || eepromStruct.channel[3].enable == true || eepromStruct.channel[4].enable == true)
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
}
|
||||
|
||||
bool saveEeprom()
|
||||
|
||||
@@ -95,7 +95,7 @@ void uptime_update()
|
||||
uptime.Rollover++;
|
||||
uptime.HighMillis = 0;
|
||||
}
|
||||
long secsUp = millis() / 1000;
|
||||
int32_t secsUp = millis() / 1000;
|
||||
uptime.Second = secsUp % 60;
|
||||
uptime.Minute = (secsUp / 60) % 60;
|
||||
uptime.Hour = (secsUp / (60 * 60)) % 24;
|
||||
@@ -165,7 +165,7 @@ void setup()
|
||||
startNETBIOS();
|
||||
|
||||
unsigned int ledCounter = 0;
|
||||
while (1)
|
||||
while (true)
|
||||
{
|
||||
//only config webserver, fast flashing green led
|
||||
dnsServer.processNextRequest();
|
||||
|
||||
Reference in New Issue
Block a user