mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 15:38:11 +01:00
pulse_counter_ulp: Clang tidy
This commit is contained in:
parent
8c8bde9b90
commit
e86ade632d
1 changed files with 7 additions and 6 deletions
|
@ -1,10 +1,11 @@
|
|||
#include "pulse_counter_ulp_sensor.h"
|
||||
#include "esphome/core/log.h"
|
||||
#include "esp32/ulp.h"
|
||||
#include "soc/rtc_periph.h"
|
||||
#include "driver/rtc_io.h"
|
||||
#include "esp32/ulp.h"
|
||||
#include "esphome/core/helpers.h"
|
||||
#include "esphome/core/log.h"
|
||||
#include "soc/rtc_periph.h"
|
||||
#include "ulp_main.h"
|
||||
#include <esp_sleep.h>
|
||||
#include <ulp_main.h>
|
||||
|
||||
namespace esphome {
|
||||
namespace pulse_counter_ulp {
|
||||
|
@ -71,7 +72,7 @@ std::unique_ptr<UlpProgram> UlpProgram::start(const Config &config) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
return std::unique_ptr<UlpProgram>(new UlpProgram());
|
||||
return make_unique<UlpProgram>();
|
||||
}
|
||||
|
||||
UlpProgram::State UlpProgram::pop_state() {
|
||||
|
@ -107,7 +108,7 @@ void PulseCounterUlpSensor::setup() {
|
|||
this->storage_ = UlpProgram::start(this->config_);
|
||||
} else {
|
||||
ESP_LOGD(TAG, "Woke up from sleep, skipping set-up of ULP program");
|
||||
this->storage_ = std::unique_ptr<UlpProgram>(new UlpProgram);
|
||||
this->storage_ = make_unique<UlpProgram>();
|
||||
UlpProgram::State state = this->storage_->peek_state();
|
||||
this->last_time_ = clock::now() - state.run_count_ * state.mean_exec_time_;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue