mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-30 02:29:12 +03:00
move device unique_id count into constructor
This commit is contained in:
@@ -43,6 +43,7 @@ class EMSdevice {
|
||||
, name_(name)
|
||||
, flags_(flags)
|
||||
, brand_(brand) {
|
||||
unique_id_++;
|
||||
}
|
||||
|
||||
virtual ~EMSdevice() = default; // destructor of base class must always be virtual because it's a polymorphic class
|
||||
@@ -270,7 +271,7 @@ class EMSdevice {
|
||||
static constexpr uint8_t EMS_DEVICE_FLAG_JUNKERS_2 = (1 << 6); // 6th bit set if older models, like FR120, FR100
|
||||
|
||||
private:
|
||||
uint8_t unique_id_;
|
||||
uint8_t unique_id_ = 0;
|
||||
uint8_t device_type_ = DeviceType::SYSTEM;
|
||||
uint8_t device_id_ = 0;
|
||||
uint8_t product_id_ = 0;
|
||||
|
||||
Reference in New Issue
Block a user