mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-28 04:07:47 +00:00
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:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*********************************************************************************************\
|
||||
|
||||
@@ -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("-");
|
||||
}
|
||||
@@ -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
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "ESPEasy_time.h"
|
||||
|
||||
#include "../DataTypes/TimeSource.h"
|
||||
|
||||
#include "../ESPEasyCore/ESPEasy_Log.h"
|
||||
#include "../ESPEasyCore/ESPEasyNetwork.h"
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "../WebServer/common.h"
|
||||
|
||||
#include "../DataTypes/TimeSource.h"
|
||||
|
||||
|
||||
#ifdef WEBSERVER_ADVANCED
|
||||
|
||||
|
||||
Reference in New Issue
Block a user