fix: i in point for etherdream is meh
This commit is contained in:
parent
514f4cc7c9
commit
22d7d3c718
@ -1,5 +1,6 @@
|
|||||||
use ether_dream::protocol::DacPoint;
|
use ether_dream::protocol::DacPoint;
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, Default, PartialEq)]
|
#[derive(Debug, Clone, Copy, Default, PartialEq)]
|
||||||
pub struct Point {
|
pub struct Point {
|
||||||
pub x: f32,
|
pub x: f32,
|
||||||
@ -48,10 +49,10 @@ impl From<Point> for DacPoint {
|
|||||||
fn from(pt: Point) -> DacPoint {
|
fn from(pt: Point) -> DacPoint {
|
||||||
let control = 0;
|
let control = 0;
|
||||||
let (u1, u2) = (0, 0);
|
let (u1, u2) = (0, 0);
|
||||||
let i = 255;
|
let i = 0;
|
||||||
let x = pt.x.clamp(-32000.0, 32000.0);
|
let x = pt.x.clamp(-32000.0, 32000.0);
|
||||||
let y = pt.y.clamp(-32000.0, 32000.0);
|
let y = pt.y.clamp(-32000.0, 32000.0);
|
||||||
DacPoint {
|
let pt = DacPoint {
|
||||||
control,
|
control,
|
||||||
x: x as i16,
|
x: x as i16,
|
||||||
y: y as i16,
|
y: y as i16,
|
||||||
@ -61,6 +62,8 @@ impl From<Point> for DacPoint {
|
|||||||
b: (pt.color.b as u16) * 255,
|
b: (pt.color.b as u16) * 255,
|
||||||
u1,
|
u1,
|
||||||
u2,
|
u2,
|
||||||
}
|
};
|
||||||
|
// debug!("point {:?}", pt);
|
||||||
|
pt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user