mirror of
https://github.com/esphome/esphome.git
synced 2025-02-25 03:13:24 +01:00
Fixed incorrect display dimension (#8110)
This commit is contained in:
parent
75026be951
commit
98b872abc7
esphome/components/waveshare_epaper
@ -72,7 +72,8 @@ void WaveshareEPaper2P13InV3::write_buffer_(uint8_t cmd, int top, int bottom) {
|
|||||||
this->set_window_(top, bottom);
|
this->set_window_(top, bottom);
|
||||||
this->command(cmd);
|
this->command(cmd);
|
||||||
this->start_data_();
|
this->start_data_();
|
||||||
auto width_bytes = this->get_width_internal() / 8;
|
|
||||||
|
auto width_bytes = this->get_width_controller() / 8;
|
||||||
this->write_array(this->buffer_ + top * width_bytes, (bottom - top) * width_bytes);
|
this->write_array(this->buffer_ + top * width_bytes, (bottom - top) * width_bytes);
|
||||||
this->end_data_();
|
this->end_data_();
|
||||||
}
|
}
|
||||||
@ -162,7 +163,8 @@ void WaveshareEPaper2P13InV3::display() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int WaveshareEPaper2P13InV3::get_width_internal() { return 128; }
|
int WaveshareEPaper2P13InV3::get_width_controller() { return 128; }
|
||||||
|
int WaveshareEPaper2P13InV3::get_width_internal() { return 122; }
|
||||||
|
|
||||||
int WaveshareEPaper2P13InV3::get_height_internal() { return 250; }
|
int WaveshareEPaper2P13InV3::get_height_internal() { return 250; }
|
||||||
|
|
||||||
|
@ -811,6 +811,7 @@ class WaveshareEPaper2P13InV3 : public WaveshareEPaper {
|
|||||||
void initialize() override;
|
void initialize() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
int get_width_controller() override;
|
||||||
int get_width_internal() override;
|
int get_width_internal() override;
|
||||||
int get_height_internal() override;
|
int get_height_internal() override;
|
||||||
uint32_t idle_timeout_() override;
|
uint32_t idle_timeout_() override;
|
||||||
|
Loading…
Reference in New Issue
Block a user