mirror of
https://github.com/esphome/esphome.git
synced 2025-10-28 21:53:48 +00:00
Activate owning-memory clang-tidy check (#1891)
* Activate owning-memory clang-tidy check * Lint * Lint * Fix issue with new NfcTag constructor * Update pointers for number and select * Add back the NOLINT to display buffer * Fix merge * DSMR fixes * Nextion fixes * Fix pipsolar * Fix lwip socket * Format * Change socket fix Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -18,7 +18,7 @@ void NextionTextSensor::process_text(const std::string &variable_name, const std
|
||||
void NextionTextSensor::update() {
|
||||
if (!this->nextion_->is_setup())
|
||||
return;
|
||||
this->nextion_->add_to_get_queue(this);
|
||||
this->nextion_->add_to_get_queue(shared_from_this());
|
||||
}
|
||||
|
||||
void NextionTextSensor::set_state(const std::string &state, bool publish, bool send_to_nextion) {
|
||||
@@ -29,7 +29,7 @@ void NextionTextSensor::set_state(const std::string &state, bool publish, bool s
|
||||
if (this->nextion_->is_sleeping() || !this->visible_) {
|
||||
this->needs_to_send_update_ = true;
|
||||
} else {
|
||||
this->nextion_->add_no_result_to_queue_with_set(this, state);
|
||||
this->nextion_->add_no_result_to_queue_with_set(shared_from_this(), state);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,10 @@ namespace esphome {
|
||||
namespace nextion {
|
||||
class NextionTextSensor;
|
||||
|
||||
class NextionTextSensor : public NextionComponent, public text_sensor::TextSensor, public PollingComponent {
|
||||
class NextionTextSensor : public NextionComponent,
|
||||
public text_sensor::TextSensor,
|
||||
public PollingComponent,
|
||||
public std::enable_shared_from_this<NextionTextSensor> {
|
||||
public:
|
||||
NextionTextSensor(NextionBase *nextion) { this->nextion_ = nextion; }
|
||||
void update() override;
|
||||
|
||||
Reference in New Issue
Block a user