mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
Gisteresis termostat
This commit is contained in:
@@ -30,7 +30,28 @@ public:
|
||||
|
||||
String setEventSign = selectFromMarkerToMarker(condition, " ", 1);
|
||||
String setEventValue = selectFromMarkerToMarker(condition, " ", 2);
|
||||
if (!isDigitStr(setEventValue)) setEventValue = getValue(setEventValue); //jsonReadStr(configLiveJson , setEventValue);
|
||||
|
||||
if (!isDigitStr(setEventValue)) {
|
||||
if (setEventValue.indexOf("+-") != -1) {
|
||||
String setEventValueName = selectToMarker(setEventValue, "+-");
|
||||
String gisteresisValue = selectToMarkerLast(setEventValue, "+-");
|
||||
gisteresisValue.replace("+-", "");
|
||||
String value = getValue(setEventValueName);
|
||||
String upValue = String(value.toFloat() + gisteresisValue.toFloat());
|
||||
String lowValue = String(value.toFloat() - gisteresisValue.toFloat());
|
||||
|
||||
if (setEventSign == ">") {
|
||||
setEventValue = upValue;
|
||||
}
|
||||
else if (setEventSign == "<") {
|
||||
setEventValue = lowValue;
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
setEventValue = getValue(setEventValue);
|
||||
}
|
||||
}
|
||||
|
||||
boolean flag = false;
|
||||
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
//===========Firmware=============================================================================================================================================
|
||||
#define FIRMWARE_VERSION 268
|
||||
//#define FLASH_SIZE_1MB
|
||||
#ifdef ESP8266
|
||||
#define FIRMWARE_NAME "esp8266-iotm"
|
||||
#define FIRMWARE_VERSION 268
|
||||
#endif
|
||||
#ifdef ESP32
|
||||
#define FIRMWARE_NAME "esp32-iotm"
|
||||
#define FIRMWARE_VERSION 268
|
||||
#endif
|
||||
#define FLASH_4MB true
|
||||
|
||||
//===========FSystem==============================================================================================================================================
|
||||
#define NUM_BUTTONS 6
|
||||
@@ -86,6 +85,8 @@ enum NotAsyncActions {
|
||||
do_MQTTPARAMSCHANGED,
|
||||
do_deviceInit,
|
||||
do_delChoosingItems,
|
||||
do_addItem,
|
||||
do_addPreset,
|
||||
do_sendScenUDP,
|
||||
do_sendScenMQTT,
|
||||
do_LAST,
|
||||
@@ -117,4 +118,7 @@ enum ConfigType_t {
|
||||
|
||||
//17.11.2020 (SSDP OFF, UDP OFF)
|
||||
//RAM: [===== ] 45.7% (used 37476 bytes from 81920 bytes)
|
||||
//Flash: [===== ] 54.5% (used 569296 bytes from 1044464 bytes)
|
||||
//Flash: [===== ] 54.5% (used 569296 bytes from 1044464 bytes)
|
||||
|
||||
//RAM: [===== ] 45.6% (used 37336 bytes from 81920 bytes)
|
||||
//Flash: [====== ] 55.3% (used 577396 bytes from 1044464 bytes)
|
||||
@@ -85,14 +85,18 @@ extern int pwmOut_EnterCounter;
|
||||
extern String countDown_KeyList;
|
||||
extern int countDown_EnterCounter;
|
||||
//=========================================
|
||||
extern String logging_KeyList;
|
||||
extern int logging_EnterCounter;
|
||||
//=========================================
|
||||
|
||||
// Sensors
|
||||
extern String sensorReadingMap10sec;
|
||||
extern String sensorReadingMap30sec;
|
||||
|
||||
extern String itemName;
|
||||
extern String presetName;
|
||||
|
||||
|
||||
extern String loggingKeyList;
|
||||
extern int enter_to_logging_counter;
|
||||
extern int scenario_line_status[40];
|
||||
extern int lastVersion;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ class LoggingClass {
|
||||
~LoggingClass();
|
||||
|
||||
void loop();
|
||||
void execute(String payload);
|
||||
|
||||
private:
|
||||
|
||||
@@ -25,12 +26,13 @@ class LoggingClass {
|
||||
String _loggingValueKey;
|
||||
String _key;
|
||||
|
||||
void addNewDelOldData(const String filename, size_t maxPoints, String payload);
|
||||
|
||||
};
|
||||
|
||||
extern MyLoggingVector* myLogging;
|
||||
|
||||
extern void logging();
|
||||
extern void loggingExecute();
|
||||
extern void choose_log_date_and_send();
|
||||
extern void sendLogData(String file, String topic);
|
||||
extern void cleanLogAndData();
|
||||
|
||||
Reference in New Issue
Block a user