mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 01:09:51 +03:00
rename brand to brand_to_string()
This commit is contained in:
@@ -26,7 +26,7 @@ namespace emsesp {
|
||||
|
||||
uuid::log::Logger EMSdevice::logger_{F_(logger_name), uuid::log::Facility::CONSOLE};
|
||||
|
||||
std::string EMSdevice::brand() const {
|
||||
std::string EMSdevice::brand_to_string() const {
|
||||
switch (brand_) {
|
||||
case EMSdevice::Brand::BOSCH:
|
||||
return read_flash_string(F("Bosch"));
|
||||
@@ -143,7 +143,7 @@ std::string EMSdevice::to_string() const {
|
||||
snprintf_P(&str[0],
|
||||
str.capacity() + 1,
|
||||
PSTR("%s %s (DeviceID:0x%02X ProductID:%d, Version:%s)"),
|
||||
brand().c_str(),
|
||||
brand_to_string().c_str(),
|
||||
name_.c_str(),
|
||||
device_id_,
|
||||
product_id_,
|
||||
|
||||
@@ -86,11 +86,15 @@ class EMSdevice {
|
||||
brand_ = brand;
|
||||
}
|
||||
|
||||
inline uint8_t brand() const {
|
||||
return brand_;
|
||||
}
|
||||
|
||||
inline void name(const std::string & name) {
|
||||
name_ = name;
|
||||
}
|
||||
|
||||
std::string brand() const;
|
||||
std::string brand_to_string() const;
|
||||
static uint8_t decode_brand(uint8_t value);
|
||||
|
||||
std::string to_string() const;
|
||||
@@ -171,8 +175,8 @@ class EMSdevice {
|
||||
};
|
||||
|
||||
// device IDs
|
||||
static constexpr uint16_t EMS_DEVICE_ID_BOILER = 0x08; // fixed device_id for Master Boiler/UBA
|
||||
static constexpr uint16_t EMS_DEVICE_ID_MODEM = 0x48; // gateways like the KM200
|
||||
static constexpr uint8_t EMS_DEVICE_ID_BOILER = 0x08; // fixed device_id for Master Boiler/UBA
|
||||
static constexpr uint8_t EMS_DEVICE_ID_MODEM = 0x48; // gateways like the KM200
|
||||
|
||||
// type IDs
|
||||
static constexpr uint16_t EMS_TYPE_VERSION = 0x02; // type ID for Version information. Generic across all EMS devices.
|
||||
|
||||
Reference in New Issue
Block a user