fetch the right edh for this laser
This commit is contained in:
parent
42773aa2a2
commit
ddf44460ae
@ -111,7 +111,8 @@ impl RedisCtrl {
|
|||||||
|
|
||||||
pub fn get_edh( &mut self ) -> LJResult<EDH> {
|
pub fn get_edh( &mut self ) -> LJResult<EDH> {
|
||||||
// Get new EDH
|
// Get new EDH
|
||||||
let edh : String = self.connection.get("/EDH/0")?;
|
let edh_key = format!("/EDH/{}", self.laser_id);
|
||||||
|
let edh : String = self.connection.get(edh_key)?;
|
||||||
let edh : Vec<Vec<f32>> = from_str(&edh)?;
|
let edh : Vec<Vec<f32>> = from_str(&edh)?;
|
||||||
let edh = EDH::new(edh)?;
|
let edh = EDH::new(edh)?;
|
||||||
Ok(edh)
|
Ok(edh)
|
||||||
|
@ -15,6 +15,9 @@ impl EDH {
|
|||||||
vec[2].len() != 3 {
|
vec[2].len() != 3 {
|
||||||
return Err(Box::new(LJError::BadEDH));
|
return Err(Box::new(LJError::BadEDH));
|
||||||
}
|
}
|
||||||
|
//
|
||||||
|
// [FIX] Not sure of the order, if is it's vec[x][y] or vec[y][x] ...
|
||||||
|
//
|
||||||
let matrix = Matrix3::new(vec[0][0], vec[0][1], vec[0][2],
|
let matrix = Matrix3::new(vec[0][0], vec[0][1], vec[0][2],
|
||||||
vec[1][0], vec[1][1], vec[1][2],
|
vec[1][0], vec[1][1], vec[1][2],
|
||||||
vec[2][0], vec[2][1], vec[2][2]);
|
vec[2][0], vec[2][1], vec[2][2]);
|
||||||
|
Loading…
Reference in New Issue
Block a user