fix warnings and make clippy happy
This commit is contained in:
parent
ad3b3803ce
commit
22d007d938
@ -54,14 +54,15 @@ impl Conf {
|
|||||||
let mut v = vec![];
|
let mut v = vec![];
|
||||||
for t in &self.transformers {
|
for t in &self.transformers {
|
||||||
let t : Box<dyn transformer::Transformers> = match t {
|
let t : Box<dyn transformer::Transformers> = match t {
|
||||||
TransformConf::Translate(t) => Box::new(t.clone()),
|
TransformConf::Translate(t) => Box::new(*t),
|
||||||
TransformConf::Replicate(r) => Box::new(r.clone())
|
TransformConf::Replicate(r) => Box::new(*r)
|
||||||
};
|
};
|
||||||
v.push(t);
|
v.push(t);
|
||||||
}
|
}
|
||||||
v
|
v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn dump() {
|
pub fn dump() {
|
||||||
let conf = Conf { laser_id: 0,
|
let conf = Conf { laser_id: 0,
|
||||||
debug: true,
|
debug: true,
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
use helios_dac::{NativeHeliosDac, NativeHeliosDacController};
|
use helios_dac::{NativeHeliosDac, NativeHeliosDacController};
|
||||||
use helios_dac::{
|
use helios_dac::{
|
||||||
// Coordinate,
|
// Coordinate,
|
||||||
Color,
|
// Color,
|
||||||
DeviceStatus,
|
DeviceStatus,
|
||||||
Frame,
|
Frame,
|
||||||
Point as HeliosPoint,
|
// Point as HeliosPoint,
|
||||||
};
|
};
|
||||||
use crate::conf::HeliosConf;
|
use crate::conf::HeliosConf;
|
||||||
use crate::device::{Device, Status};
|
use crate::device::{Device, Status};
|
||||||
@ -35,11 +35,11 @@ impl HeliosDevice {
|
|||||||
|
|
||||||
impl Device for HeliosDevice {
|
impl Device for HeliosDevice {
|
||||||
fn status(&self) -> Status {
|
fn status(&self) -> Status {
|
||||||
return Status {
|
Status {
|
||||||
active: true,
|
active: true,
|
||||||
last_traced_at: "now".to_string(),
|
last_traced_at: "now".to_string(),
|
||||||
properties: vec!["foo".to_string()],
|
properties: vec!["foo".to_string()],
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn draw(&self,
|
fn draw(&self,
|
||||||
@ -49,7 +49,7 @@ impl Device for HeliosDevice {
|
|||||||
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);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ use crate::point::Point;
|
|||||||
|
|
||||||
mod helios;
|
mod helios;
|
||||||
|
|
||||||
use crate::conf::{Conf, DacFamily, EtherDreamConf, HeliosConf};
|
use crate::conf::{Conf, DacFamily, /*EtherDreamConf, HeliosConf*/};
|
||||||
use crate::device::helios::HeliosDevice;
|
use crate::device::helios::HeliosDevice;
|
||||||
use crate::errors::LJResult;
|
use crate::errors::LJResult;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ use redis_ctrl::{RedisCtrl, Order};
|
|||||||
use conf::Conf;
|
use conf::Conf;
|
||||||
use errors::LJResult;
|
use errors::LJResult;
|
||||||
use point::Point;
|
use point::Point;
|
||||||
use transformer::{Transformers, Translate, Replicate};
|
use transformer::Transformers;
|
||||||
use log::{LevelFilter, info, /* warn, */ error};
|
use log::{LevelFilter, info, /* warn, */ error};
|
||||||
use env_logger::Builder;
|
use env_logger::Builder;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user