summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2019-03-24 17:53:02 -0700
committeriximeow <me@iximeow.net>2019-03-24 17:53:02 -0700
commit571ee6acb18112088d2b9ebf264ee30d75001f3f (patch)
treeaa8d1b32ebca5f57d1796aba234792f384f5a912
parentc80c18604b20e0e79fc0d2666e9bab218cdb1e81 (diff)
remove qhy cruft
-rw-r--r--src/main.rs31
1 files changed, 9 insertions, 22 deletions
diff --git a/src/main.rs b/src/main.rs
index 4a96614..95de6fd 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -11,44 +11,31 @@ use crate::asicam::ASICamera2::{ControlType, ImageType};
use crate::asicam::Camera;
fn main() {
+ let test = true;
println!("Doing qhy...");
- operate_qhy();
+ operate_qhy(test);
println!("Doing asi...");
- operate_asi();
+// operate_asi(test);
}
-fn operate_qhy() {
+fn operate_qhy(test: bool) {
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(2500).unwrap();
- camera.set_param(Control::Gain, 100.0).unwrap();
- camera.set_param(Control::Offset, 000.0).unwrap();
+ camera.set_defaults().unwrap();
+ camera.set_exposure_ms(1).unwrap();
+ camera.set_param(Control::Gain, 34.0).unwrap();
+ camera.set_param(Control::Offset, 00.0).unwrap();
camera.set_param(Control::USBTraffic, 50.0).unwrap();
// camera.set_target_temp(0.0).unwrap();
camera.set_param(Control::Cooler, -15.0).unwrap();
println!("Gain: {:?}", camera.get_param_limits(Control::Gain));
- println!("Offset: {:?}", camera.get_param_limits(Control::Offset));
- println!("USBTraffic: {:?}", camera.get_param_limits(Control::USBTraffic));
- println!("Gama: {:?}", camera.get_param_limits(Control::Gamma));
- println!("WB Red: {:?}", camera.get_param_limits(Control::CONTROL_WBR));
- println!("WB Green: {:?}", camera.get_param_limits(Control::CONTROL_WBG));
- println!("WB Blue: {:?}", camera.get_param_limits(Control::CONTROL_WBB));
- 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));
- println!("Gain: {:?}", camera.get_param_limits(Control::Gain));
- println!("Offset: {:?}", camera.get_param_limits(Control::Offset));
- println!("USBTraffic: {:?}", camera.get_param_limits(Control::USBTraffic));
- println!("Gama: {:?}", camera.get_param_limits(Control::Gamma));
camera.set_param(Control::CONTROL_WBR, 2750.0).unwrap();
camera.set_param(Control::CONTROL_WBG, 2500.0).unwrap();
camera.set_param(Control::CONTROL_WBB, 3000.0).unwrap();
- //camera.set_bin_mode(2).unwrap();
+ // camera.set_bin_mode(2).unwrap();
if !test {
let object = "m13";
for i in 0..20 {