mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
changes
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
/*
|
||||
* Main consts
|
||||
*/
|
||||
#define FIRMWARE_VERSION "2.4.0"
|
||||
#define FIRMWARE_NAME "esp8266-iotm"
|
||||
#define FIRMWARE_VERSION "240"
|
||||
#define NUM_BUTTONS 6
|
||||
#define LED_PIN 2
|
||||
#define FLASH_4MB true
|
||||
@@ -10,7 +11,7 @@
|
||||
|
||||
#define MQTT_RECONNECT_INTERVAL 20000
|
||||
|
||||
#define TELEMETRY_UPDATE_INTERVAL 7200000
|
||||
#define TELEMETRY_UPDATE_INTERVAL_MIN 1
|
||||
|
||||
#define DEVICE_CONFIG_FILE "s.conf.csv"
|
||||
#define DEVICE_SCENARIO_FILE "s.scen.txt"
|
||||
@@ -134,3 +135,5 @@ enum BusScanner_t {
|
||||
BS_I2C,
|
||||
BS_ONE_WIRE
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -148,4 +148,4 @@ extern void uptime_init();
|
||||
|
||||
// Web
|
||||
extern void web_init();
|
||||
extern void telemetry_init();
|
||||
|
||||
|
||||
@@ -8,4 +8,3 @@ extern void Device_init();
|
||||
extern void prsets_init();
|
||||
extern void handle_uptime();
|
||||
extern void handle_statistics();
|
||||
extern void telemetry_init();
|
||||
11
include/Utils/statUtils.h
Normal file
11
include/Utils/statUtils.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
//#include "/lib/WifiLocation.h"
|
||||
#include <Arduino.h>
|
||||
#include "Global.h"
|
||||
|
||||
extern void initSt();
|
||||
extern void updateDevice(String lat, String lon, String accur, String uptime, String firm);
|
||||
extern void addNewDevice(String model);
|
||||
extern void updateDeviceList(String model, String firmVer);
|
||||
extern void createNewDevJson(String& json, String model);
|
||||
//extern WifiLocation location();
|
||||
45
include/items/SensorBme280Class.h
Normal file
45
include/items/SensorBme280Class.h
Normal file
@@ -0,0 +1,45 @@
|
||||
//#pragma once
|
||||
//#include <Arduino.h>
|
||||
//#include "Class/LineParsing.h"
|
||||
//#include "Global.h"
|
||||
//#include "items/SensorConvertingClass.h"
|
||||
//
|
||||
//class SensorBme280Class : public SensorConvertingClass {
|
||||
// public:
|
||||
// SensorBme280Class() : SensorConvertingClass(){};
|
||||
//
|
||||
// void SensorBme280Init() {
|
||||
// oneWire = new OneWire((uint8_t)_pin.toInt());
|
||||
// sensors.setOneWire(oneWire);
|
||||
// sensors.begin();
|
||||
// sensors.setResolution(48);
|
||||
//
|
||||
// sensorReadingMap += _key + ",";
|
||||
// //Bme280EnterCounter++;
|
||||
//
|
||||
// //jsonWriteInt(configOptionJson, _key + "_num", Bme280EnterCounter);
|
||||
// jsonWriteStr(configOptionJson, _key + "_map", _map);
|
||||
// jsonWriteStr(configOptionJson, _key + "_с", _c);
|
||||
// }
|
||||
//
|
||||
// void SensorBme280Read(String key) {
|
||||
// float value;
|
||||
// byte num = sensors.getDS18Count();
|
||||
// sensors.requestTemperatures();
|
||||
//
|
||||
// int cnt = jsonReadInt(configOptionJson, key + "_num");
|
||||
//
|
||||
// for (byte i = 0; i < num; i++) {
|
||||
// if (i == cnt) {
|
||||
// value = sensors.getTempCByIndex(i);
|
||||
// //value = this->mapping(key, value);
|
||||
// float valueFl = this->correction(key, value);
|
||||
// eventGen(key, "");
|
||||
// jsonWriteStr(configLiveJson, key, String(valueFl));
|
||||
// MqttClient::publishStatus(key, String(valueFl));
|
||||
// Serial.println("[I] sensor '" + key + "' data: " + String(valueFl));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//};
|
||||
//extern SensorBme280Class mySensorBme280;
|
||||
Reference in New Issue
Block a user