mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
move all statics up
This commit is contained in:
@@ -28,6 +28,24 @@ static_assert(uuid::console::thread_safe, "uuid-console must be thread-safe");
|
|||||||
|
|
||||||
namespace emsesp {
|
namespace emsesp {
|
||||||
|
|
||||||
|
// Static member definitions
|
||||||
|
std::deque<std::unique_ptr<EMSdevice>> EMSESP::emsdevices;
|
||||||
|
std::vector<EMSESP::Device_record> EMSESP::device_library_;
|
||||||
|
uuid::log::Logger EMSESP::logger_{F_(emsesp), uuid::log::Facility::KERN};
|
||||||
|
uint16_t EMSESP::watch_id_ = WATCH_ID_NONE;
|
||||||
|
uint8_t EMSESP::watch_ = 0;
|
||||||
|
uint16_t EMSESP::read_id_ = WATCH_ID_NONE;
|
||||||
|
bool EMSESP::read_next_ = false;
|
||||||
|
uint16_t EMSESP::publish_id_ = 0;
|
||||||
|
uint16_t EMSESP::response_id_ = 0;
|
||||||
|
bool EMSESP::tap_water_active_ = false;
|
||||||
|
uint8_t EMSESP::publish_all_idx_ = 0;
|
||||||
|
uint8_t EMSESP::unique_id_count_ = 0;
|
||||||
|
bool EMSESP::trace_raw_ = false;
|
||||||
|
uint16_t EMSESP::wait_validate_ = 0;
|
||||||
|
bool EMSESP::wait_km_ = true;
|
||||||
|
uint32_t EMSESP::last_fetch_ = 0;
|
||||||
|
|
||||||
AsyncWebServer webServer(80);
|
AsyncWebServer webServer(80);
|
||||||
|
|
||||||
#if defined(EMSESP_STANDALONE)
|
#if defined(EMSESP_STANDALONE)
|
||||||
@@ -56,10 +74,6 @@ WebLogService EMSESP::webLogService = WebLogService(&webServer, EMSESP
|
|||||||
using DeviceFlags = EMSdevice;
|
using DeviceFlags = EMSdevice;
|
||||||
using DeviceType = EMSdevice::DeviceType;
|
using DeviceType = EMSdevice::DeviceType;
|
||||||
|
|
||||||
std::deque<std::unique_ptr<EMSdevice>> EMSESP::emsdevices; // array of all the detected EMS devices
|
|
||||||
std::vector<EMSESP::Device_record> EMSESP::device_library_; // library of all our known EMS devices, in heap
|
|
||||||
|
|
||||||
uuid::log::Logger EMSESP::logger_{F_(emsesp), uuid::log::Facility::KERN};
|
|
||||||
uuid::log::Logger EMSESP::logger() {
|
uuid::log::Logger EMSESP::logger() {
|
||||||
return logger_;
|
return logger_;
|
||||||
}
|
}
|
||||||
@@ -79,21 +93,6 @@ AnalogSensor EMSESP::analogsensor_; // Analog sensors
|
|||||||
Shower EMSESP::shower_; // Shower logic
|
Shower EMSESP::shower_; // Shower logic
|
||||||
Preferences EMSESP::nvs_; // NV Storage
|
Preferences EMSESP::nvs_; // NV Storage
|
||||||
|
|
||||||
// static/common variables
|
|
||||||
uint16_t EMSESP::watch_id_ = WATCH_ID_NONE; // for when log is TRACE. 0 means no trace set
|
|
||||||
uint8_t EMSESP::watch_ = 0; // trace off
|
|
||||||
uint16_t EMSESP::read_id_ = WATCH_ID_NONE;
|
|
||||||
bool EMSESP::read_next_ = false;
|
|
||||||
uint16_t EMSESP::publish_id_ = 0;
|
|
||||||
uint16_t EMSESP::response_id_ = 0;
|
|
||||||
bool EMSESP::tap_water_active_ = false; // for when Boiler states we having running warm water. used in Shower()
|
|
||||||
uint32_t EMSESP::last_fetch_ = 0;
|
|
||||||
uint8_t EMSESP::publish_all_idx_ = 0;
|
|
||||||
uint8_t EMSESP::unique_id_count_ = 0;
|
|
||||||
bool EMSESP::trace_raw_ = false;
|
|
||||||
uint16_t EMSESP::wait_validate_ = 0;
|
|
||||||
bool EMSESP::wait_km_ = true;
|
|
||||||
|
|
||||||
// for a specific EMS device go and request data values
|
// for a specific EMS device go and request data values
|
||||||
// or if device_id is 0 it will fetch from all our known and active devices
|
// or if device_id is 0 it will fetch from all our known and active devices
|
||||||
void EMSESP::fetch_device_values(const uint8_t device_id) {
|
void EMSESP::fetch_device_values(const uint8_t device_id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user