Update esphome/components/waveshare_epaper/waveshare_epaper.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Johannes 2024-08-13 22:14:37 +02:00 committed by GitHub
parent d294d2d721
commit 6f1db1d3fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1534,8 +1534,8 @@ void GDEY075Z08::calculate_crcs_(bool full_sync) {
uint16_t segment_position = x + y * width_b; // linear position inside the segment in bytes uint16_t segment_position = x + y * width_b; // linear position inside the segment in bytes
uint16_t global_position = seg_y * height_px * this->get_width_internal() / 8 + uint16_t global_position = seg_y * height_px * this->get_width_internal() / 8 +
y * this->get_width_internal() / 8 + seg_x * width_b + x; y * this->get_width_internal() / 8 + seg_x * width_b + x;
segment[segment_position] = buffer_[global_position]; // copy black data segment[segment_position] = this->buffer_[global_position]; // copy black data
segment[segment_position + segment_size] = buffer_[global_position + buffer_half_size]; // copy red data segment[segment_position + segment_size] = this->buffer_[global_position + buffer_half_size]; // copy red data
} }
} }
// now calculate a CRC16_checksum and compare it against the stored value. // now calculate a CRC16_checksum and compare it against the stored value.