From 63c700f12de4251da84e3f7beaf60e716ed6b3f5 Mon Sep 17 00:00:00 2001 From: Marc Planard Date: Thu, 29 Jun 2023 23:27:54 +0200 Subject: [PATCH] get edh --- src/redis_ctrl.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 {