mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
1 mb compiling version
This commit is contained in:
@@ -11,6 +11,8 @@ extern void clockInit();
|
||||
#include "sntp.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
class Clock {
|
||||
private:
|
||||
Time_t _time_local;
|
||||
|
||||
@@ -42,37 +42,19 @@
|
||||
//#define SSDP_ENABLED
|
||||
|
||||
//=========Sensors enable/disable=================================================================================================================================
|
||||
#define LEVEL_ENABLED
|
||||
#define ANALOG_ENABLED
|
||||
#define DALLAS_ENABLED
|
||||
#define DHT_ENABLED
|
||||
#define BMP_ENABLED
|
||||
#define BME_ENABLED
|
||||
#define SensorBme280Enabled
|
||||
#define SensorBmp280Enabled
|
||||
#define SensorDhtEnabled
|
||||
#define PwmOutEnable
|
||||
//#define SensorModbusEnabled
|
||||
|
||||
//=========others=================================================================================================================================
|
||||
//#define telegram
|
||||
//#define uartEnable
|
||||
|
||||
|
||||
//=========Gears enable/disable===================================================================================================================================
|
||||
#define STEPPER_ENABLED
|
||||
#define SERVO_ENABLED
|
||||
|
||||
|
||||
//========Other enable/disable====================================================================================================================================
|
||||
#define LOGGING_ENABLED
|
||||
#define SERIAL_ENABLED
|
||||
#define PUSH_ENABLED
|
||||
|
||||
struct Time_t {
|
||||
uint8_t second;
|
||||
uint8_t minute;
|
||||
uint8_t hour;
|
||||
uint8_t day_of_week;
|
||||
uint8_t day_of_month;
|
||||
uint8_t month;
|
||||
uint16_t day_of_year;
|
||||
uint16_t year;
|
||||
unsigned long days;
|
||||
unsigned long valid;
|
||||
};
|
||||
|
||||
//================================================================================================================================================================
|
||||
enum TimerTask_t { WIFI_SCAN,
|
||||
WIFI_MQTT_CONNECTION_CHECK,
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <ESPAsyncWebServer.h>
|
||||
//#include <FS.h>
|
||||
|
||||
#ifdef ESP8266
|
||||
#include <LittleFS.h>
|
||||
#endif
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef uartEnable
|
||||
#include "SoftwareSerial.h"
|
||||
|
||||
extern SoftwareSerial* myUART;
|
||||
|
||||
extern void uartInit();
|
||||
extern void uartHandle();
|
||||
extern void parse(String& incStr);
|
||||
extern void parse(String& incStr);
|
||||
#endif
|
||||
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#ifdef telegram
|
||||
#include "Global.h"
|
||||
|
||||
extern void sendTelegramMsg();
|
||||
@@ -7,4 +8,5 @@ extern void handleTelegram();
|
||||
extern bool isTelegramEnabled();
|
||||
extern bool isTelegramInputOn();
|
||||
extern void telegramMsgParse(String msg);
|
||||
extern String returnListOfParams();
|
||||
extern String returnListOfParams();
|
||||
#endif
|
||||
@@ -1,9 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
//#include "FS.h"
|
||||
|
||||
#ifdef ESP32
|
||||
#include "LITTLEFS.h"
|
||||
#define LittleFS LITTLEFS
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "Consts.h"
|
||||
|
||||
//#include "FS.h"
|
||||
|
||||
#ifdef ESP32
|
||||
#include "LITTLEFS.h"
|
||||
#define LittleFS LITTLEFS
|
||||
|
||||
@@ -48,6 +48,22 @@ int getOffsetInMinutes(int timezone);
|
||||
/*
|
||||
* Разбивает время на составляющие
|
||||
*/
|
||||
|
||||
struct Time_t {
|
||||
uint8_t second;
|
||||
uint8_t minute;
|
||||
uint8_t hour;
|
||||
uint8_t day_of_week;
|
||||
uint8_t day_of_month;
|
||||
uint8_t month;
|
||||
uint16_t day_of_year;
|
||||
uint16_t year;
|
||||
unsigned long days;
|
||||
unsigned long valid;
|
||||
};
|
||||
|
||||
void breakEpochToTime(unsigned long epoch, Time_t& tm);
|
||||
|
||||
|
||||
|
||||
void timeInit();
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "Consts.h"
|
||||
#ifdef SensorBme280Enabled
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "Class/LineParsing.h"
|
||||
#include "Global.h"
|
||||
#include "items/SensorConvertingClass.h"
|
||||
@@ -52,4 +53,5 @@ class SensorBme280Class : public SensorConvertingClass {
|
||||
SerialPrint("I", "Sensor", "'" + key + "' data: " + String(valueFl));
|
||||
}
|
||||
};
|
||||
extern SensorBme280Class mySensorBme280;
|
||||
extern SensorBme280Class mySensorBme280;
|
||||
#endif
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "Consts.h"
|
||||
#ifdef SensorBmp280Enabled
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "Class/LineParsing.h"
|
||||
#include "Global.h"
|
||||
#include "items/SensorConvertingClass.h"
|
||||
@@ -45,4 +46,5 @@ class SensorBmp280Class : public SensorConvertingClass {
|
||||
SerialPrint("I", "Sensor", "'" + key + "' data: " + String(valueFl));
|
||||
}
|
||||
};
|
||||
extern SensorBmp280Class mySensorBmp280;
|
||||
extern SensorBmp280Class mySensorBmp280;
|
||||
#endif
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "Consts.h"
|
||||
#ifdef SensorDhtEnabled
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "Class/LineParsing.h"
|
||||
#include "Global.h"
|
||||
#include "items/SensorConvertingClass.h"
|
||||
@@ -75,4 +76,5 @@ class SensorDhtClass : public SensorConvertingClass {
|
||||
}
|
||||
}
|
||||
};
|
||||
extern SensorDhtClass mySensorDht;
|
||||
extern SensorDhtClass mySensorDht;
|
||||
#endif
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifdef modbus
|
||||
#pragma once
|
||||
#include "Consts.h"
|
||||
#ifdef SensorModbusEnabled
|
||||
#include <Arduino.h>
|
||||
#include <ModbusMaster.h>
|
||||
#include <SoftwareSerial.h>
|
||||
|
||||
#include "Class/LineParsing.h"
|
||||
#include "Global.h"
|
||||
#include "items/SensorConvertingClass.h"
|
||||
@@ -82,4 +82,8 @@ class SensorModbusClass : public SensorConvertingClass {
|
||||
}
|
||||
};
|
||||
extern SensorModbusClass mySensorModbus;
|
||||
|
||||
extern void modbus();
|
||||
extern void modbusReading();
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "Consts.h"
|
||||
#ifdef PwmOutEnable
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "Global.h"
|
||||
|
||||
class PwmOut;
|
||||
@@ -27,3 +28,4 @@ extern MyPwmOutVector* myPwmOut;
|
||||
|
||||
extern void pwmOut();
|
||||
extern void pwmOutExecute();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user