diff --git a/src/redis_ctrl.rs b/src/redis_ctrl.rs index ee2efe7..5f6eea0 100644 --- a/src/redis_ctrl.rs +++ b/src/redis_ctrl.rs @@ -111,7 +111,8 @@ impl RedisCtrl { pub fn get_edh( &mut self ) -> LJResult { // 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> = from_str(&edh)?; let edh = EDH::new(edh)?; Ok(edh) diff --git a/src/worldstate.rs b/src/worldstate.rs index d51536b..aaf26e7 100644 --- a/src/worldstate.rs +++ b/src/worldstate.rs @@ -15,6 +15,9 @@ impl EDH { vec[2].len() != 3 { 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], vec[1][0], vec[1][1], vec[1][2], vec[2][0], vec[2][1], vec[2][2]);