|
@ -42,6 +42,7 @@ impl DataRecords { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
pub async fn data_logging_loop(program_state: ProgramStateShared) { |
|
|
pub async fn data_logging_loop(program_state: ProgramStateShared) { |
|
|
|
|
|
loop { |
|
|
let DataLoggingSettings { |
|
|
let DataLoggingSettings { |
|
|
enabled, |
|
|
enabled, |
|
|
frequency_mins, |
|
|
frequency_mins, |
|
@ -51,7 +52,6 @@ pub async fn data_logging_loop(program_state: ProgramStateShared) { |
|
|
enabled: true, |
|
|
enabled: true, |
|
|
frequency_mins: 60, |
|
|
frequency_mins: 60, |
|
|
}); |
|
|
}); |
|
|
loop { |
|
|
|
|
|
if enabled { |
|
|
if enabled { |
|
|
let _ = DataRecords::push(program_state.clone()); |
|
|
let _ = DataRecords::push(program_state.clone()); |
|
|
} |
|
|
} |
|
|