summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2019-03-15 19:08:25 -0700
committeriximeow <me@iximeow.net>2019-03-15 19:08:25 -0700
commit7dbe9921deaf57e9908ff95a806bcffd4bec7dd3 (patch)
treef8fefb3962fa8961b498941078cada2d196cfe4b /src/main.rs
parent132d623a422e1b73f6e5d8911a82a75290637d10 (diff)
several in-the-field tweaks for qhy367c
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/main.rs b/src/main.rs
index 3640f34..eeb816d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -18,12 +18,19 @@ 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();
+ camera.set_exposure_ms(4500).unwrap();
+ camera.set_param(Control::Gain, 100.0).unwrap();
+ camera.set_param(Control::Offset, 000.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));
@@ -32,8 +39,14 @@ fn operate_qhy() {
// camera.set_param(Control::Speed, 1.0).unwrap();
println!("current temp: {}", camera.get_param(Control::CurTemp));
camera.set_defaults().unwrap();
+ camera.set_param(Control::CONTROL_WBR, 4027.0).unwrap();
+ camera.set_param(Control::CONTROL_WBG, 4027.0).unwrap();
+ camera.set_param(Control::CONTROL_WBB, 4027.0).unwrap();
// camera.set_bin_mode(2).unwrap();
- camera.take_image("../../asdf.png");
+ let object = "jupiter";
+ for i in 0..10 {
+ camera.take_image(&format!("{}_{}.png", object, i));//, i));
+ }
camera.release().unwrap();
}