From de6b9cf1538855507d35e6a537acde5ea005217e Mon Sep 17 00:00:00 2001 From: Nareshkumar Rao Date: Fri, 3 May 2024 23:57:36 +0200 Subject: [PATCH] wip --- src/control/data_logging.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/control/data_logging.rs b/src/control/data_logging.rs index 2885dcb..2c80a7d 100644 --- a/src/control/data_logging.rs +++ b/src/control/data_logging.rs @@ -42,16 +42,16 @@ impl DataRecords { } pub async fn data_logging_loop(program_state: ProgramStateShared) { - let DataLoggingSettings { - enabled, - frequency_mins, - } = lock_state(&program_state) - .map(|state| state.config.data_logging_settings.clone()) - .unwrap_or(DataLoggingSettings { - enabled: true, - frequency_mins: 60, - }); loop { + let DataLoggingSettings { + enabled, + frequency_mins, + } = lock_state(&program_state) + .map(|state| state.config.data_logging_settings.clone()) + .unwrap_or(DataLoggingSettings { + enabled: true, + frequency_mins: 60, + }); if enabled { let _ = DataRecords::push(program_state.clone()); }