diff options
author | gennyble <gen@nyble.dev> | 2023-09-18 17:19:23 -0500 |
---|---|---|
committer | gennyble <gen@nyble.dev> | 2023-09-18 17:19:23 -0500 |
commit | ce77e890520116915d0082c12a43c4aa388bba74 (patch) | |
tree | a149439188e98a7884f5cb13e7eb837b775f5d48 | |
parent | 8266a2b4d9801a6287a1e7d469feee51e290e07b (diff) | |
download | lri-rs-ce77e890520116915d0082c12a43c4aa388bba74.tar.gz lri-rs-ce77e890520116915d0082c12a43c4aa388bba74.zip |
extract tripod
-rw-r--r-- | lri-rs/src/block.rs | 6 | ||||
-rw-r--r-- | lri-rs/src/lib.rs | 2 | ||||
-rw-r--r-- | lri-study/src/main.rs | 6 |
3 files changed, 14 insertions, 0 deletions
diff --git a/lri-rs/src/block.rs b/lri-rs/src/block.rs index 77a0100..19e7294 100644 --- a/lri-rs/src/block.rs +++ b/lri-rs/src/block.rs @@ -219,6 +219,7 @@ impl<'lri> Block<'lri> { image_gain, hdr_mode, scene_mode, + is_on_tripod, .. } = vp; @@ -237,6 +238,10 @@ impl<'lri> Block<'lri> { if let Some(Ok(h)) = scene_mode.map(|ev| ev.enum_value()) { ext.scene = Some(h.into()); } + + if let Some(tri) = is_on_tripod { + ext.on_tripod = Some(tri); + } } } @@ -251,6 +256,7 @@ pub(crate) struct ExtractedData { pub af_achieved: Option<bool>, pub hdr: Option<HdrMode>, pub scene: Option<SceneMode>, + pub on_tripod: Option<bool>, } pub enum Message { diff --git a/lri-rs/src/lib.rs b/lri-rs/src/lib.rs index 404e501..ee1b928 100644 --- a/lri-rs/src/lib.rs +++ b/lri-rs/src/lib.rs @@ -22,6 +22,7 @@ pub struct LriFile<'lri> { pub image_gain: Option<f32>, pub hdr: Option<HdrMode>, pub scene: Option<SceneMode>, + pub on_tripod: Option<bool>, } impl<'lri> LriFile<'lri> { @@ -81,6 +82,7 @@ impl<'lri> LriFile<'lri> { image_gain: ext.image_gain, hdr: ext.hdr, scene: ext.scene, + on_tripod: ext.on_tripod, } } diff --git a/lri-study/src/main.rs b/lri-study/src/main.rs index 3b386e5..ac14c45 100644 --- a/lri-study/src/main.rs +++ b/lri-study/src/main.rs @@ -96,6 +96,12 @@ fn gather() -> ! { Some(SceneMode::Night) => print!("sc:ni "), } + match lri.on_tripod { + None => print!("{} ", "tri".dimmed()), + Some(false) => print!("{} ", "tri".red()), + Some(true) => print!("{} ", "tri".green()), + } + match lri.af_achieved { None => print!("{} - ", "af".dimmed()), Some(false) => print!("{} - ", "af".red()), |