mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
code optimization
This commit is contained in:
@@ -858,7 +858,7 @@ void EMSdevice::reset_entity_masks() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// disable/exclude/mask_out a device entity based on the id
|
// disable/exclude/mask_out a device entity based on the id
|
||||||
void EMSdevice::mask_entity(std::string & entity_id) {
|
void EMSdevice::mask_entity(const std::string & entity_id) {
|
||||||
// first character contains mask flags
|
// first character contains mask flags
|
||||||
uint8_t flag = Helpers::hextoint(entity_id.substr(0, 2).c_str());
|
uint8_t flag = Helpers::hextoint(entity_id.substr(0, 2).c_str());
|
||||||
for (auto & dv : devicevalues_) {
|
for (auto & dv : devicevalues_) {
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ class EMSdevice {
|
|||||||
char * show_telegram_handlers(char * result, const size_t len, const uint8_t handlers);
|
char * show_telegram_handlers(char * result, const size_t len, const uint8_t handlers);
|
||||||
void show_mqtt_handlers(uuid::console::Shell & shell) const;
|
void show_mqtt_handlers(uuid::console::Shell & shell) const;
|
||||||
void list_device_entries(JsonObject & output) const;
|
void list_device_entries(JsonObject & output) const;
|
||||||
void mask_entity(std::string & entity_id);
|
void mask_entity(const std::string & entity_id);
|
||||||
void reset_entity_masks();
|
void reset_entity_masks();
|
||||||
|
|
||||||
using process_function_p = std::function<void(std::shared_ptr<const Telegram>)>;
|
using process_function_p = std::function<void(std::shared_ptr<const Telegram>)>;
|
||||||
|
|||||||
Reference in New Issue
Block a user