diff options
author | Andy Wortman <ixineeringeverywhere@gmail.com> | 2019-03-14 23:04:31 -0700 |
---|---|---|
committer | Andy Wortman <ixineeringeverywhere@gmail.com> | 2019-03-14 23:04:31 -0700 |
commit | 132d623a422e1b73f6e5d8911a82a75290637d10 (patch) | |
tree | 245c31266a0a3306e8611b4e33f164004f746811 /src/main.rs | |
parent | e1fec0d69304aabc5d69226e787ed5939fcd8316 (diff) |
add qhy control software
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index a9a664b..3640f34 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,7 @@ #![allow(dead_code)] #![feature(alloc_layout_extra)] mod asicam; - +mod qhyccd; use crate::asicam::ASICamera2::{ControlType, ImageType}; use crate::asicam::Camera; @@ -15,7 +15,26 @@ fn main() { } fn operate_qhy() { + use crate::qhyccd::Control; println!("Operating on qhy camera ... or i'll die trying"); + let mut camera = qhyccd::acquire(0).unwrap(); + camera.set_exposure_ms(40000).unwrap(); + camera.set_param(Control::Gain, 64.0).unwrap(); + camera.set_param(Control::Offset, 00.0).unwrap(); + camera.set_param(Control::USBTraffic, 250.0).unwrap(); + camera.set_target_temp(0.0).unwrap(); + camera.set_param(Control::Cooler, 0.0).unwrap(); + println!("Binning modes:"); + println!("1x1: {}", camera.has_param(Control::Bin1x1Mode)); + println!("2x2: {}", camera.has_param(Control::Bin2x2Mode)); + println!("3x3: {}", camera.has_param(Control::Bin3x3Mode)); + println!("4x4: {}", camera.has_param(Control::Bin4x4Mode)); +// camera.set_param(Control::Speed, 1.0).unwrap(); + println!("current temp: {}", camera.get_param(Control::CurTemp)); + camera.set_defaults().unwrap(); +// camera.set_bin_mode(2).unwrap(); + camera.take_image("../../asdf.png"); + camera.release().unwrap(); } fn operate_asi() { |