Skip to content

Commit

Permalink
lib: Clear led strip before starting
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric committed Jul 31, 2023
1 parent 4b7bc6e commit 2bd123b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ impl NavigatorBuilder {
bmp.zero().unwrap();

let mut neopixel = Strip::new(Bus::Spi0, self.rgb_led_strip_size).unwrap();
// Clear RGB led strip before starting using it
neopixel.clear();

let mut spi = Spidev::open("/dev/spidev1.0").expect("Error: Failed during setting up SPI");
let options = SpidevOptions::new()
Expand Down

0 comments on commit 2bd123b

Please sign in to comment.