Skip to content

Commit

Permalink
fix FTBFS
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Jan 22, 2024
1 parent 2623e4e commit f1bfae3
Showing 1 changed file with 20 additions and 23 deletions.
43 changes: 20 additions & 23 deletions strand-cam/src/strand-cam.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2395,11 +2395,12 @@ pub enum ImPtDetectCfgSource {
ChangedSavedToDisk((&'static AppInfo, String)),
}

// impl Default for ImPtDetectCfgSource {
// fn default() -> Self {
// ImPtDetectCfgSource::ChangesNotSavedToDisk(default_im_pt_detect())
// }
// }
#[cfg(feature = "flydra_feat_detect")]
impl Default for ImPtDetectCfgSource {
fn default() -> Self {
ImPtDetectCfgSource::ChangesNotSavedToDisk(default_im_pt_detect())
}
}

#[cfg(feature = "plugin-process-frame")]
pub struct ProcessFrameCbData {
Expand Down Expand Up @@ -2487,21 +2488,6 @@ pub struct StandaloneArgs {
pub tracker_cfg_src: ImPtDetectCfgSource,
}

// impl Default for StandaloneArgs {
// fn default() -> Self {
// Self {
// camera_name: Default::default(),
// pixel_format: Default::default(),
// force_camera_sync_mode: Default::default(),
// software_limit_framerate: Default::default(),
// acquisition_duration_allowed_imprecision_msec: Default::default(),
// camera_settings_filename: Default::default(),
// #[cfg(feature = "flydra_feat_detect")]
// tracker_cfg_src: ImPtDetectCfgSource::ChangesNotSavedToDisk(default_im_pt_detect()),
// }
// }
// }

#[derive(Debug)]
pub enum StandaloneOrBraid {
Standalone(StandaloneArgs),
Expand Down Expand Up @@ -2944,6 +2930,17 @@ where
Err(a) => a.pixel_format.clone(),
};

let acquisition_duration_allowed_imprecision_msec = match &res_braid {
Ok(bi) => bi
.config_from_braid
.config
.acquisition_duration_allowed_imprecision_msec
.clone(),
Err(a) => a.acquisition_duration_allowed_imprecision_msec.clone(),
};
#[cfg(not(feature = "flydra_feat_detect"))]
let _ = acquisition_duration_allowed_imprecision_msec;

let (frame_rate_limit_supported, mut frame_rate_limit_enabled) =
if let Some(fname) = &camera_settings_filename {
let settings = std::fs::read_to_string(&fname).with_context(|| {
Expand Down Expand Up @@ -3377,7 +3374,7 @@ where
measured_fps: 0.0,
is_saving_im_pt_detect_csv: None,
has_image_tracker_compiled,
im_pt_detect_cfg,
im_pt_detect_cfg: im_pt_detect_cfg.clone(),
has_flydratrax_compiled,
kalman_tracking_config,
led_program_config,
Expand Down Expand Up @@ -3544,7 +3541,7 @@ where

#[cfg(feature = "flydra_feat_detect")]
let acquisition_duration_allowed_imprecision_msec =
args.acquisition_duration_allowed_imprecision_msec;
acquisition_duration_allowed_imprecision_msec;
#[cfg(feature = "flydra_feat_detect")]
let csv_save_dir = args.csv_save_dir.clone();
#[cfg(feature = "flydratrax")]
Expand Down Expand Up @@ -3598,7 +3595,7 @@ where
image_height,
rx_frame,
#[cfg(feature = "flydra_feat_detect")]
tracker_cfg,
im_pt_detect_cfg,
#[cfg(feature = "flydra_feat_detect")]
std::path::Path::new(&csv_save_dir).to_path_buf(),
firehose_tx,
Expand Down

0 comments on commit f1bfae3

Please sign in to comment.