1 mb compiling version

This commit is contained in:
Dmitry Borisenko
2020-12-16 13:59:01 +01:00
parent 9934690d0a
commit 078c4389b5
28 changed files with 168 additions and 174 deletions

View File

@@ -1,7 +1,7 @@
#include "Consts.h"
#ifdef SensorBme280Enabled
#include "items/SensorBme280Class.h"
#include "BufferExecute.h"
//#ifdef SensorBme280Enabled
//=========================================Модуль ультрозвукового дальномера==================================================================
//bme280-temp;id;anydata;Сенсоры;Температура;order;c[1]
//bme280-hum;id;anydata;Сенсоры;Температура;order;c[1]
@@ -44,4 +44,4 @@ void bme280ReadingPress() {
String key = sCmd.order();
mySensorBme280.SensorBme280ReadPress(key);
}
//#endif
#endif

View File

@@ -1,7 +1,7 @@
#include "Consts.h"
#ifdef SensorBmp280Enabled
#include "items/SensorBmp280Class.h"
#include "BufferExecute.h"
//#ifdef SensorBmp280Enabled
//=========================================Модуль ультрозвукового дальномера==================================================================
//bmp280-temp;id;anydata;Сенсоры;Температура;order;c[1]
//bmp280-hum;id;anydata;Сенсоры;Температура;order;c[1]
@@ -32,4 +32,4 @@ void bmp280ReadingPress() {
String key = sCmd.order();
mySensorBmp280.SensorBmp280ReadPress(key);
}
//#endif
#endif

View File

@@ -1,7 +1,7 @@
#include "Consts.h"
#ifdef SensorDhtEnabled
#include "items/SensorDhtClass.h"
#include "BufferExecute.h"
//#ifdef SensorDhtEnabled
//=========================================DHT Sensor==================================================================
//dht-temp;id;anydata;Сенсоры;Температура;order;pin;type[dht11];c[1]
//dht-hum;id;anydata;Сенсоры;Влажность;order;pin;type[dht11];c[1]
@@ -32,4 +32,4 @@ void dhtReadingHum() {
String key = sCmd.order();
mySensorDht.SensorDhtReadHum(key);
}
//#endif
#endif

View File

@@ -1,23 +1,23 @@
//#include "items/SensorModbusClass.h"
//
//#include "BufferExecute.h"
////#ifdef SensorModbusEnabled
////=========================================Модуль modbus===================================================================================
////modbus;id;anydata;Сенсоры;Температура;order;addr[1];regaddr[0];c[1]
////=========================================================================================================================================
//SensorModbusClass mySensorModbus;
//
//void modbus() {
// mySensorModbus.update();
// String key = mySensorModbus.gkey();
// sCmd.addCommand(key.c_str(), modbusReading);
// mySensorModbus.SensorModbusInit();
// mySensorModbus.clear();
//}
//void modbusReading() {
// String key = sCmd.order();
// String addr = sCmd.next();
// String regaddr = sCmd.next();
// mySensorModbus.SensorModbusRead(key, addr.toInt(), regaddr.toInt());
//}
////#endif
#include "Consts.h"
#ifdef SensorModbusEnabled
#include "items/SensorModbusClass.h"
#include "BufferExecute.h"
//=========================================Модуль modbus===================================================================================
//modbus;id;anydata;Сенсоры;Температура;order;addr[1];regaddr[0];c[1]
//=========================================================================================================================================
SensorModbusClass mySensorModbus;
void modbus() {
mySensorModbus.update();
String key = mySensorModbus.gkey();
sCmd.addCommand(key.c_str(), modbusReading);
mySensorModbus.SensorModbusInit();
mySensorModbus.clear();
}
void modbusReading() {
String key = sCmd.order();
String addr = sCmd.next();
String regaddr = sCmd.next();
mySensorModbus.SensorModbusRead(key, addr.toInt(), regaddr.toInt());
}
#endif

View File

@@ -21,12 +21,14 @@ ButtonOut::~ButtonOut() {}
void ButtonOut::execute(String state) {
if (_type == "UART") {
if (jsonReadBool(configSetupJson, "uart")) {
if (jsonReadBool(configSetupJson, "uartEnable")) {
#ifdef uartEnable
if (myUART) {
String msg = _key + " " + state;
myUART->print(msg);
SerialPrint("I", "<=UART", msg);
}
}
#endif
}
}
if (state != "" && _pin != "") {

View File

@@ -1,9 +1,13 @@
#include "Consts.h"
#ifdef PwmOutEnable
#include "items/vPwmOut.h"
#include "Class/LineParsing.h"
#include "Global.h"
#include "BufferExecute.h"
#include <Arduino.h>
//this class save data to flash
PwmOut::PwmOut(unsigned int pin, String key) {
_pin = pin;
@@ -52,4 +56,5 @@ void pwmOutExecute() {
myPwmOut->at(number).execute(state);
}
}
}
}
#endif