mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 15:38:11 +01:00
Try fixing clang-tidy issues
This commit is contained in:
parent
391f68f51c
commit
7cef5a8ef8
3 changed files with 8 additions and 8 deletions
|
@ -10,13 +10,13 @@ static const char *const TAG = "waveshare_epaper_4.26in";
|
|||
|
||||
WaveshareEPaper4P26In::WaveshareEPaper4P26In() : WaveshareEPaper() { reset_duration_ = 20; }
|
||||
|
||||
void WaveshareEPaper4P26In::init_display_async_(bool fast_update, const std::function<void()> f) {
|
||||
void WaveshareEPaper4P26In::init_display_async_(bool fast_update, const std::function<void()> &&f) {
|
||||
// Reset the display
|
||||
this->reset_();
|
||||
wait_until_idle_async_([this, fast_update, f] {
|
||||
wait_until_idle_async_([this, fast_update, f(std::move(f))] {
|
||||
this->command(0x12); // SWRESET
|
||||
|
||||
wait_until_idle_async_([this, fast_update, f] {
|
||||
wait_until_idle_async_([this, fast_update, f(std::move(f))] {
|
||||
// Use the internal temperature sensor
|
||||
this->command(0x18);
|
||||
this->data(0x80);
|
||||
|
@ -66,7 +66,7 @@ void WaveshareEPaper4P26In::init_display_async_(bool fast_update, const std::fun
|
|||
this->data(0x00);
|
||||
|
||||
if (fast_update) {
|
||||
this->wait_until_idle_async_([this, f] {
|
||||
this->wait_until_idle_async_([this, f(std::move(f))] {
|
||||
this->command(0x1A);
|
||||
this->data(0x5A);
|
||||
|
||||
|
|
|
@ -164,12 +164,12 @@ bool WaveshareEPaperBase::wait_until_idle_() {
|
|||
return true;
|
||||
}
|
||||
|
||||
void WaveshareEPaperBase::wait_until_idle_async_(const std::function<void()> f) {
|
||||
void WaveshareEPaperBase::wait_until_idle_async_(const std::function<void()> &&f) {
|
||||
if (this->busy_pin_ == nullptr || !this->busy_pin_->digital_read()) {
|
||||
return f();
|
||||
}
|
||||
|
||||
this->set_timeout(20, [this, f] { this->wait_until_idle_async_(std::move(f)); });
|
||||
this->set_timeout(20, [this, f(std::move(f))] { this->wait_until_idle_async_(std::move(f)); });
|
||||
}
|
||||
|
||||
void WaveshareEPaperBase::update() {
|
||||
|
|
|
@ -36,7 +36,7 @@ class WaveshareEPaperBase : public display::DisplayBuffer,
|
|||
|
||||
protected:
|
||||
bool wait_until_idle_();
|
||||
void wait_until_idle_async_(const std::function<void()> f);
|
||||
void wait_until_idle_async_(const std::function<void()> &&f);
|
||||
|
||||
void setup_pins_();
|
||||
|
||||
|
@ -167,7 +167,7 @@ class WaveshareEPaper4P26In : public WaveshareEPaper {
|
|||
void set_full_update_every(uint32_t full_update_every);
|
||||
|
||||
protected:
|
||||
void init_display_async_(bool fast_update, const std::function<void()> f);
|
||||
void init_display_async_(bool fast_update, const std::function<void()> &&f);
|
||||
|
||||
int get_width_internal() override;
|
||||
int get_height_internal() override;
|
||||
|
|
Loading…
Reference in a new issue