финальная версия с сенсором

This commit is contained in:
Dmitry Borisenko
2021-12-14 23:55:17 +01:00
parent 1529da443b
commit b68fa1b0f6
6 changed files with 37 additions and 14 deletions

View File

@@ -24,6 +24,7 @@
#include "items/vImpulsOut.h"
#include "items/vLogging.h"
#include "items/vSensorAnalog.h"
#include "items/vSensorAny.h"
#include "items/vSensorBme280.h"
#include "items/vSensorBmp280.h"
#include "items/vSensorCcs811.h"
@@ -34,13 +35,12 @@
#include "items/vSensorSht20.h"
#include "items/vSensorUltrasonic.h"
#include "items/vSensorUptime.h"
//#include "WebServer.h"
void not_async_actions();
Timings metric;
boolean initialized = false;
extern int flagq ;
extern int flagq;
void setup() {
Serial.begin(115200);
Serial.flush();
@@ -97,12 +97,12 @@ void loop() {
#endif
#ifdef WEBSOCKET_ENABLED
ws.cleanupClients();
if ( flagq == 1){
SerialPrint("I", "WS ", "choose_log_date_and_send()");
choose_log_date_and_sendWS();
flagq = 0;
}
ws.cleanupClients();
if (flagq == 1) {
SerialPrint("I", "WS ", "choose_log_date_and_send()");
choose_log_date_and_sendWS();
flagq = 0;
}
#endif
timeNow->loop();
mqttLoop();
@@ -188,6 +188,13 @@ void loop() {
}
}
#endif
#ifdef EnableSensorAny
if (mySensorAny != nullptr) {
for (unsigned int i = 0; i < mySensorAny->size(); i++) {
mySensorAny->at(i).loop();
}
}
#endif
#ifdef EnableSensorBmp280
if (mySensorBmp280 != nullptr) {
for (unsigned int i = 0; i < mySensorBmp280->size(); i++) {