Compare commits

..

No commits in common. "481472d5920322376d7f3be75a6881e36aca71e6" and "a791514cbe2aacea80da1c305f7747edd5a713f3" have entirely different histories.

5 changed files with 6 additions and 8 deletions

2
.gitignore vendored
View File

@ -1,6 +1,6 @@
# Configuration file # Configuration file
settings.* Settings.*
# Generated by Cargo # Generated by Cargo
# will have compiled files and executables # will have compiled files and executables

View File

@ -42,16 +42,14 @@ impl Device for HeliosDevice {
} }
} }
fn draw(&mut self, fn draw(&self,
line: Vec<Point>, line: Vec<Point>,
speed: u32, speed: u32,
) -> LJResult<()> { ) -> LJResult<()> {
while let Ok(DeviceStatus::NotReady) = self.dac.status() { while let Ok(DeviceStatus::NotReady) = self.dac.status() {}
}
let points: Vec<helios_dac::Point> = line.into_iter().map(|p| p.into()).collect(); let points: Vec<helios_dac::Point> = line.into_iter().map(|p| p.into()).collect();
let frame = Frame::new(speed, points); let _frame = Frame::new(speed, points);
self.dac.write_frame(frame.clone())?;
Ok(()) Ok(())
} }

View File

@ -29,7 +29,7 @@ pub struct Status {
pub trait Device { pub trait Device {
fn status( &self ) -> Status; fn status( &self ) -> Status;
fn draw( fn draw(
&mut self, &self,
frame: Vec<Point>, frame: Vec<Point>,
speed: u32, speed: u32,
) -> LJResult<()> ; ) -> LJResult<()> ;

View File

@ -109,6 +109,6 @@ fn get_next_frame(
line = transformer.apply(&line); line = transformer.apply(&line);
} }
//info!("Line: {:?}", line); info!("Line: {:?}", line);
Ok(line) Ok(line)
} }