mirror of
https://github.com/esphome/esphome.git
synced 2026-05-31 17:06:40 +08:00
[slow_pwm] Fix dump_summary deprecation warning (#13460)
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#include "slow_pwm_output.h"
|
#include "slow_pwm_output.h"
|
||||||
#include "esphome/core/log.h"
|
|
||||||
#include "esphome/core/application.h"
|
#include "esphome/core/application.h"
|
||||||
|
#include "esphome/core/gpio.h"
|
||||||
|
#include "esphome/core/log.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome {
|
||||||
namespace slow_pwm {
|
namespace slow_pwm {
|
||||||
@@ -20,7 +21,9 @@ void SlowPWMOutput::set_output_state_(bool new_state) {
|
|||||||
}
|
}
|
||||||
if (new_state != current_state_) {
|
if (new_state != current_state_) {
|
||||||
if (this->pin_) {
|
if (this->pin_) {
|
||||||
ESP_LOGV(TAG, "Switching output pin %s to %s", this->pin_->dump_summary().c_str(), ONOFF(new_state));
|
char pin_summary[GPIO_SUMMARY_MAX_LEN];
|
||||||
|
this->pin_->dump_summary(pin_summary, sizeof(pin_summary));
|
||||||
|
ESP_LOGV(TAG, "Switching output pin %s to %s", pin_summary, ONOFF(new_state));
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGV(TAG, "Switching to %s", ONOFF(new_state));
|
ESP_LOGV(TAG, "Switching to %s", ONOFF(new_state));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user