1. Added comment "// NOLINT" after delay()

2. Updated formatting
This commit is contained in:
Tim Pehla 2024-11-11 18:40:52 +01:00
parent 1e08562a58
commit 28776d9169
2 changed files with 37 additions and 41 deletions

View file

@ -2649,7 +2649,7 @@ bool WaveshareEPaper7P5InV2P::wait_until_idle_() {
return false;
}
App.feed_wdt();
delay(10);
delay(10); // NOLINT
}
return true;
}
@ -2657,22 +2657,21 @@ bool WaveshareEPaper7P5InV2P::wait_until_idle_() {
void WaveshareEPaper7P5InV2P::reset_() {
if (this->reset_pin_ != nullptr) {
this->reset_pin_->digital_write(true);
delay(20);
delay(20); // NOLINT
this->reset_pin_->digital_write(false);
delay(2);
delay(2); // NOLINT
this->reset_pin_->digital_write(true);
delay(20);
delay(20); // NOLINT
}
}
void WaveshareEPaper7P5InV2P::turn_on_display_() {
this->command(0x12);
delay(100);
delay(100); // NOLINT
this->wait_until_idle_();
}
void WaveshareEPaper7P5InV2P::initialize() {
this->reset_();
// COMMAND POWER SETTING
@ -2691,7 +2690,7 @@ void WaveshareEPaper7P5InV2P::initialize() {
// COMMAND POWER DRIVER HAT UP
this->command(0x04);
delay(100);
delay(100); // NOLINT
this->wait_until_idle_();
// COMMAND PANEL SETTING
@ -2735,11 +2734,10 @@ void HOT WaveshareEPaper7P5InV2P::display() {
ESP_LOGI(TAG, "Power on the display and hat");
this->command(0x04);
delay(200);
delay(200); // NOLINT
this->wait_until_idle_();
if (this->full_update_every_ == 1) {
this->command(0x13);
for (uint32_t i = 0; i < buf_len; i++) {
this->data(~(this->buffer_[i]));
@ -2757,7 +2755,6 @@ void HOT WaveshareEPaper7P5InV2P::display() {
this->data(0x07);
if (this->at_update_ == 0) {
// Enable fast refresh
this->command(0xE5);
this->data(0x5A);
@ -2765,27 +2762,26 @@ void HOT WaveshareEPaper7P5InV2P::display() {
this->command(0x92);
this->command(0x10);
delay(2);
delay(2); // NOLINT
for (uint32_t i = 0; i < buf_len; i++) {
this->data(~(this->buffer_[i]));
}
delay(100);
delay(100); // NOLINT
this->wait_until_idle_();
this->command(0x13);
delay(2);
delay(2); // NOLINT
for (uint32_t i = 0; i < buf_len; i++) {
this->data(this->buffer_[i]);
}
delay(100);
delay(100); // NOLINT
this->wait_until_idle_();
this->turn_on_display_();
} else {
// Enable partial refresh
this->command(0xE5);
this->data(0x6E);
@ -2807,12 +2803,12 @@ void HOT WaveshareEPaper7P5InV2P::display() {
this->data(0x01);
this->command(0x13);
delay(2);
delay(2); // NOLINT
for (uint32_t i = 0; i < buf_len; i++) {
this->data(this->buffer_[i]);
}
delay(100);
delay(100); // NOLINT
this->wait_until_idle_();
this->turn_on_display_();
@ -2838,7 +2834,7 @@ void WaveshareEPaper7P5InV2P::dump_config() {
LOG_PIN(" Busy Pin: ", this->busy_pin_);
LOG_UPDATE_INTERVAL(this);
}
void WaveshareEPaper7P5InV2P::set_full_update_every(uint32_t full_update_every) {
void WaveshareEPaper7P5InV2P::set_full_update_every(uint32_t full_update_every) {
this->full_update_every_ = full_update_every;
}