websocket & function

This commit is contained in:
avaksru
2021-12-13 16:26:43 +03:00
parent e46a6247f9
commit d083fbf9cf
28 changed files with 602 additions and 103 deletions

View File

@@ -152,8 +152,7 @@ class Clock {
return String(buf);
}
/*
/*
/*
* Локальное время "чч:мм:cc"
*/
const String getTime() {

View File

@@ -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

View File

@@ -23,7 +23,6 @@ class ImpulsOutClass {
unsigned int _impulsCount = 0;
unsigned int _impulsCountBuf = 0;
unsigned int _impulsPin = 0;
};
extern MyImpulsOutVector* myImpulsOut;

View File

@@ -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

View File

@@ -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