mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
добавление логирования
This commit is contained in:
@@ -35,6 +35,8 @@
|
||||
#define USE_LITTLEFS false
|
||||
#endif
|
||||
|
||||
#define START_DATETIME 1640995200 // 01.01.2022 00:00:00 константа для сокрацения unix time
|
||||
|
||||
#define MIN_DATETIME 1575158400
|
||||
#define LEAP_YEAR(Y) (((1970 + Y) > 0) && !((1970 + Y) % 4) && (((1970 + Y) % 100) || !((1970 + Y) % 400)))
|
||||
|
||||
|
||||
@@ -130,6 +130,8 @@ struct Time_t {
|
||||
};
|
||||
|
||||
extern unsigned long unixTime;
|
||||
extern unsigned long unixTimeShort;
|
||||
|
||||
extern bool isTimeSynch;
|
||||
extern Time_t _time_local;
|
||||
extern Time_t _time_utc;
|
||||
|
||||
@@ -31,6 +31,9 @@ void publishState();
|
||||
void mqttCallback(char* topic, uint8_t* payload, size_t length);
|
||||
void handleMqttStatus(bool send);
|
||||
void handleMqttStatus(bool send, int state);
|
||||
void sendAllFilesToMQTT();
|
||||
void sendLogData(String file, String topic);
|
||||
|
||||
const String getStateStr(int e);
|
||||
|
||||
void mqttUptimeCalc();
|
||||
|
||||
@@ -10,4 +10,6 @@ extern const String addFileLn(const String& filename, const String& str);
|
||||
extern const String readFile(const String& filename, size_t max_size);
|
||||
extern const String filepath(const String& filename);
|
||||
extern bool cutFile(const String& src, const String& dst);
|
||||
extern size_t countLines(const String filename);
|
||||
void removeFile(const String& filename);
|
||||
extern void onFlashWrite();
|
||||
Reference in New Issue
Block a user