Skip to content

Commit

Permalink
fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
gferraro committed Oct 16, 2024
1 parent 951b033 commit e6ed1d5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/core1_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub enum Core1Task {
HighPowerMode = 0xeb,
ReceiveFrameWithPendingFFC = 0xac,
}
#[derive(Format)]

enum StatusRecording {
StartupStatus = 0,
Expand Down Expand Up @@ -845,7 +846,10 @@ pub fn core_1_task(
&& motion_detection_triggered_this_frame
&& cptv_stream.is_none(); // wait until lepton stabilises before recording

if made_startup_status_recording && !made_shutdown_status_recording {
if made_startup_status_recording
&& !made_shutdown_status_recording
&& status_recording_pending.is_none()
{
if dev_mode {
if synced_date_time.date_time_utc + Duration::minutes(1)
> startup_date_time_utc + Duration::minutes(4)
Expand Down Expand Up @@ -920,6 +924,9 @@ pub fn core_1_task(
} else {
making_status_recording = false;
}
if making_status_recording {
info!("Making status recording {}", status_recording_pending);
}
} else if !should_end_current_recording {
if let Some(cptv_stream) = &mut cptv_stream {
if let Some(prev_telemetry) = &prev_frame_telemetry {
Expand Down

0 comments on commit e6ed1d5

Please sign in to comment.