This commit is contained in:
Marc Planard 2023-06-29 23:27:54 +02:00
parent f307fea63c
commit 63c700f12d

View File

@ -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<WorldState>{
Ok(WorldState::default())
let edh = self.get_edh()?;
info!("EDH: {:?}", edh);
Ok(WorldState {
edh,
..WorldState::default()
})
}
pub fn get_edh( &mut self ) -> LJResult<EDH> {