diff --git a/src/redis_ctrl.rs b/src/redis_ctrl.rs index b78af9e..e7e80fa 100644 --- a/src/redis_ctrl.rs +++ b/src/redis_ctrl.rs @@ -3,6 +3,7 @@ use ron::de::from_str; use crate::device::Status; use crate::errors::{LJError, LJResult}; use crate::worldstate::{WorldState,EDH}; +use log::info; #[repr(u8)] #[derive(Debug, PartialEq)] @@ -99,7 +100,13 @@ impl RedisCtrl { } pub fn init_world_state( &mut self) -> LJResult{ - Ok(WorldState::default()) + let edh = self.get_edh()?; + info!("EDH: {:?}", edh); + + Ok(WorldState { + edh, + ..WorldState::default() + }) } pub fn get_edh( &mut self ) -> LJResult {