Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
DavJCosby committed Feb 8, 2024
1 parent 015ec2c commit 5936dca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
3 changes: 0 additions & 3 deletions examples/calibration.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
mod resources;
use std::mem::size_of;

use resources::tui::SledTerminalDisplay;

use glam::Vec2;
use sled::{color::Rgb, Sled, SledError};

fn main() -> Result<(), SledError> {
print!("{}", size_of::<Sled>());
let mut sled = Sled::new("./examples/resources/config.toml")?;
let mut display = SledTerminalDisplay::start("Calibration", sled.domain());

Expand All @@ -22,4 +20,3 @@ fn main() -> Result<(), SledError> {
display.refresh().unwrap();
Ok(())
}

8 changes: 4 additions & 4 deletions examples/quirky_trail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ mod drivers;
use drivers::quirky_trail;

mod resources;
use resources::tui::SledTerminalDisplay;
// use resources::tui::SledTerminalDisplay;

use sled::{scheduler::Scheduler, Sled};

fn main() {
let sled = Sled::new("./examples/resources/config.toml").unwrap();
let mut display = SledTerminalDisplay::start("Quirky Trail", sled.domain());
// let mut display = SledTerminalDisplay::start("Quirky Trail", sled.domain());
let mut driver = quirky_trail::build_driver();
driver.mount(sled);

let mut scheduler = Scheduler::fixed_hz(500.0);
scheduler.loop_until_err(|| {
driver.step();
display.leds = driver.read_colors_and_positions();
display.refresh()?;
// display.leds = driver.read_colors_and_positions();
// display.refresh()?;
Ok(())
});
}
2 changes: 0 additions & 2 deletions src/driver/buffers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ fn deref_option<T: Copy>(option: Option<&T>) -> Option<T> {
}
}

trait TypedIndex<T> {}

impl std::ops::Index<&str> for BufferContainer {
type Output = Vec<f32>;

Expand Down

0 comments on commit 5936dca

Please sign in to comment.