Skip to content

Commit

Permalink
Merge pull request #24 from almindor/bugfix
Browse files Browse the repository at this point in the history
Bug fixes for #23
  • Loading branch information
almindor authored Aug 26, 2022
2 parents 0d66e68 + ad1cb25 commit 47ecf5d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Changed

- fix `Display::clear` out of bounds pixels
- remove `ST7789` model `Bgr` bit override

## [v0.2.1] - 2022-08-03

### Added
Expand All @@ -29,4 +34,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [v0.1.0] - 2021-09-09

### Added
- Initial release
- Initial release
2 changes: 1 addition & 1 deletion src/graphics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ where
let fb_size = self.model.framebuffer_size(self.orientation);
let pixel_count = usize::from(fb_size.0) * usize::from(fb_size.1);
let colors = core::iter::repeat(color).take(pixel_count); // blank entire HW RAM contents
self.set_pixels(0, 0, fb_size.0, fb_size.1, colors)
self.set_pixels(0, 0, fb_size.0 - 1, fb_size.1 - 1, colors)
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/models/st7789.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Model for ST7789 {
DELAY: DelayUs<u32>,
DI: WriteOnlyDataCommand,
{
let madctl = options.madctl() ^ 0b0000_1000; // this model has flipped RGB/BGR bit
let madctl = options.madctl();
match rst {
Some(ref mut rst) => self.hard_reset(rst, delay)?,
None => write_command(di, Instruction::SWRESET, &[])?,
Expand Down

0 comments on commit 47ecf5d

Please sign in to comment.