Merge pull request #3713 from TD-er/build/missing_includes

[TimeSource] Move ExtTimeSource_e to TimeSource.h to fix includes
This commit is contained in:
TD-er
2021-07-24 22:18:12 +02:00
committed by GitHub
6 changed files with 41 additions and 11 deletions
+3 -3
View File
@@ -35,9 +35,9 @@ struct SecurityStruct
char ControllerUser[CONTROLLER_MAX][26];
char ControllerPassword[CONTROLLER_MAX][64];
char Password[26];
uint8_t AllowedIPrangeLow[4] = {0}; // TD-er: Use these
uint8_t AllowedIPrangeHigh[4] = {0};
uint8_t IPblockLevel = 0;
uint8_t AllowedIPrangeLow[4] = {0}; // TD-er: Use these
uint8_t AllowedIPrangeHigh[4] = {0};
uint8_t IPblockLevel = 0;
//its safe to extend this struct, up to 4096 bytes, default values in config are 0. Make sure crc is last
uint8_t ProgmemMd5[16] = {0}; // crc of the binary that last saved the struct to file.
+2 -8
View File
@@ -5,6 +5,7 @@
#include "../CustomBuild/ESPEasyLimits.h"
#include "../DataTypes/EthernetParameters.h"
#include "../DataTypes/NetworkMedium.h"
#include "../DataTypes/TimeSource.h"
#include "../Globals/Plugins.h"
#include "../../ESPEasy_common.h"
@@ -40,14 +41,7 @@ enum class PinBootState {
};
// Do not change order as values are stored in settings
enum class ExtTimeSource_e {
None = 0,
DS1307,
DS3231,
PCF8523,
PCF8563
};
/*********************************************************************************************\
+13
View File
@@ -0,0 +1,13 @@
#include "../DataTypes/TimeSource.h"
const __FlashStringHelper* toString(ExtTimeSource_e timeSource)
{
switch (timeSource) {
case ExtTimeSource_e::None: break;
case ExtTimeSource_e::DS1307: return F("DS1307");
case ExtTimeSource_e::DS3231: return F("DS3231");
case ExtTimeSource_e::PCF8523: return F("PCF8523");
case ExtTimeSource_e::PCF8563: return F("PCF8563");
}
return F("-");
}
+19
View File
@@ -0,0 +1,19 @@
#ifndef DATATYPES_TIMESOURCE_H
#define DATATYPES_TIMESOURCE_H
#include <Arduino.h>
// Do not change order as values are stored in settings
enum class ExtTimeSource_e {
None = 0,
DS1307,
DS3231,
PCF8523,
PCF8563
};
const __FlashStringHelper* toString(ExtTimeSource_e timeSource);
#endif // ifndef DATATYPES_TIMESOURCE_H
+2
View File
@@ -1,5 +1,7 @@
#include "ESPEasy_time.h"
#include "../DataTypes/TimeSource.h"
#include "../ESPEasyCore/ESPEasy_Log.h"
#include "../ESPEasyCore/ESPEasyNetwork.h"
+2
View File
@@ -3,6 +3,8 @@
#include "../WebServer/common.h"
#include "../DataTypes/TimeSource.h"
#ifdef WEBSERVER_ADVANCED