mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
websocket & function
This commit is contained in:
@@ -152,8 +152,7 @@ class Clock {
|
||||
return String(buf);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
/*
|
||||
* Локальное время "чч:мм:cc"
|
||||
*/
|
||||
const String getTime() {
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
#define DEVICE_SCENARIO_FILE "s.scen.txt"
|
||||
//#define OTA_UPDATES_ENABLED
|
||||
//#define MDNS_ENABLED
|
||||
//#define WEBSOCKET_ENABLED
|
||||
#define WEBSOCKET_ENABLED
|
||||
//#define LAYOUT_IN_RAM
|
||||
//#define UDP_ENABLED
|
||||
//#define SSDP_ENABLED
|
||||
|
||||
@@ -23,7 +23,6 @@ class ImpulsOutClass {
|
||||
unsigned int _impulsCount = 0;
|
||||
unsigned int _impulsCountBuf = 0;
|
||||
unsigned int _impulsPin = 0;
|
||||
|
||||
};
|
||||
|
||||
extern MyImpulsOutVector* myImpulsOut;
|
||||
|
||||
@@ -11,15 +11,11 @@ typedef std::vector<LoggingClass> MyLoggingVector;
|
||||
|
||||
class LoggingClass {
|
||||
public:
|
||||
|
||||
LoggingClass(String interval, unsigned int maxPoints, String loggingValueKey, String key, String startState, bool savedFromWeb);
|
||||
~LoggingClass();
|
||||
|
||||
void loop();
|
||||
void execute(String keyOrValue);
|
||||
|
||||
private:
|
||||
|
||||
unsigned long currentMillis;
|
||||
unsigned long prevMillis;
|
||||
unsigned long difference;
|
||||
@@ -29,16 +25,14 @@ class LoggingClass {
|
||||
unsigned int _maxPoints;
|
||||
String _loggingValueKey;
|
||||
String _key;
|
||||
|
||||
|
||||
};
|
||||
|
||||
extern MyLoggingVector* myLogging;
|
||||
|
||||
extern void logging();
|
||||
extern void loggingExecute();
|
||||
extern void choose_log_date_and_send();
|
||||
extern void choose_log_date_and_sendWS();
|
||||
extern void sendLogData(String file, String topic);
|
||||
extern void sendLogDataWS(String file, String topic);
|
||||
extern void sendLogData2(String file, String topic);
|
||||
extern void cleanLogAndData();
|
||||
#endif
|
||||
|
||||
@@ -1,29 +1,19 @@
|
||||
#ifdef EnableOutput
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "Global.h"
|
||||
|
||||
class Output;
|
||||
|
||||
typedef std::vector<Output> MyOutputVector;
|
||||
|
||||
class Output {
|
||||
public:
|
||||
|
||||
Output(String key);
|
||||
~Output();
|
||||
|
||||
void execute(String value);
|
||||
|
||||
private:
|
||||
|
||||
String _key;
|
||||
|
||||
};
|
||||
|
||||
extern MyOutputVector* myOutput;
|
||||
|
||||
extern void outputValue();
|
||||
extern void outputExecute();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user