Skip to content

Commit

Permalink
fix theme buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
BrendanBall committed Nov 1, 2023
1 parent b08bb25 commit a2f86b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 3 additions & 7 deletions display_themes/src/theme_2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,11 @@ use heapless::String;
use core::fmt::Write;
use core::fmt;

pub struct Theme2 {
display_text: String<60>,
}
pub struct Theme2;

impl Theme2 {
pub fn new() -> Self {
Theme2 {
display_text: String::new(),
}
Theme2
}
}

Expand Down Expand Up @@ -230,7 +226,7 @@ impl Theme<TriColor> for Theme2
DRAWTARGET: DrawTarget<Color = TriColor> + OriginDimensions,
DRAWTARGET::Error: fmt::Debug
{
self.display_text.clear();
display.clear(TriColor::White)?;

let display_area = display.bounding_box();

Expand Down
1 change: 0 additions & 1 deletion esp32c3_nostd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ fn main() -> ! {

let mut display = Display2in9b::default();
display.set_rotation(DisplayRotation::Rotate270);
display.clear(TriColor::White).expect("failed clearing display");

let mut display = Display {
spi: spi,
Expand Down

0 comments on commit a2f86b2

Please sign in to comment.