mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Merge branch 'ver4dev' into FixLog
This commit is contained in:
@@ -24,10 +24,18 @@
|
||||
#define FIRMWARE_NAME "esp8266_4mb"
|
||||
#endif
|
||||
|
||||
#ifdef esp8266_16mb
|
||||
#define FIRMWARE_NAME "esp8266_16mb"
|
||||
#endif
|
||||
|
||||
#ifdef esp32_4mb
|
||||
#define FIRMWARE_NAME "esp32_4mb"
|
||||
#endif
|
||||
|
||||
#ifdef esp32_16mb
|
||||
#define FIRMWARE_NAME "esp32_16mb"
|
||||
#endif
|
||||
|
||||
#ifdef esp32s2_4mb
|
||||
#define FIRMWARE_NAME "esp32s2_4mb"
|
||||
#endif
|
||||
|
||||
@@ -14,6 +14,7 @@ boolean mqttConnect();
|
||||
void mqttReconnect();
|
||||
void mqttLoop();
|
||||
void mqttSubscribe();
|
||||
bool mqttIsConnect();
|
||||
|
||||
boolean publish(const String& topic, const String& data);
|
||||
boolean publishData(const String& topic, const String& data);
|
||||
@@ -21,6 +22,7 @@ boolean publishChartMqtt(const String& topic, const String& data);
|
||||
boolean publishJsonMqtt(const String& topic, const String& json);
|
||||
boolean publishStatusMqtt(const String& topic, const String& data);
|
||||
boolean publishEvent(const String& topic, const String& data);
|
||||
void mqttSubscribeExternal(String topic, bool usePrefix);
|
||||
|
||||
bool publishChartFileToMqtt(String path, String id, int maxCount);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ struct IoTValue {
|
||||
class IoTItem {
|
||||
public:
|
||||
IoTItem(const String& parameters);
|
||||
virtual ~IoTItem() {}
|
||||
virtual ~IoTItem() {};
|
||||
virtual void loop();
|
||||
virtual void doByInterval();
|
||||
virtual IoTValue execute(String command, std::vector<IoTValue>& param);
|
||||
@@ -35,9 +35,12 @@ class IoTItem {
|
||||
void setInterval(long interval);
|
||||
void setIntFromNet(int interval);
|
||||
|
||||
unsigned long currentMillis;
|
||||
unsigned long prevMillis;
|
||||
unsigned long difference;
|
||||
// unsigned long currentMillis;
|
||||
// unsigned long prevMillis;
|
||||
// unsigned long difference;
|
||||
unsigned long nextMillis=0; // достаточно 1 переменной, надо экономить память
|
||||
// задержка следующего вызова, не изменяет текущий _interval
|
||||
void suspendNextDoByInt(unsigned long _delay); // 0 - force
|
||||
|
||||
IoTValue value; // хранение основного значения, которое обновляется из сценария, execute(), loop() или doByInterval()
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ extern bool jsonRead(const String& json, String key, float& value, bool e = true
|
||||
extern bool jsonRead(const String& json, String key, String& value, bool e = true);
|
||||
extern bool jsonRead(const String& json, String key, bool& value, bool e = true);
|
||||
extern bool jsonRead(const String& json, String key, int& value, bool e = true);
|
||||
extern bool jsonReadArray(const String& json, String key, std::vector<String>& jArray, bool e = true);
|
||||
|
||||
extern String jsonReadStr(const String& json, String name, bool e = true);
|
||||
extern int jsonReadInt(const String& json, String name, bool e = true);
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
|
||||
#include "Global.h"
|
||||
#include "MqttClient.h"
|
||||
|
||||
boolean isNetworkActive();
|
||||
uint8_t getNumAPClients();
|
||||
void routerConnect();
|
||||
bool startAPMode();
|
||||
boolean RouterFind(String ssid);
|
||||
boolean RouterFind(std::vector<String> jArray);
|
||||
uint8_t RSSIquality();
|
||||
extern void wifiSignalInit();
|
||||
|
||||
Reference in New Issue
Block a user