fix draw loop

This commit is contained in:
Marc Planard 2023-06-08 21:06:33 +02:00
parent 560b3be71b
commit d9b96f6090
2 changed files with 4 additions and 7 deletions

View File

@ -46,15 +46,12 @@ impl Device for HeliosDevice {
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())?;
while let Ok(DeviceStatus::NotReady) = self.dac.status() {
self.dac.write_frame(frame.clone())?;
}
Ok(()) Ok(())
} }

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)
} }