diff options
Diffstat (limited to 'src/qhyccd')
-rw-r--r-- | src/qhyccd/mod.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/qhyccd/mod.rs b/src/qhyccd/mod.rs index 5300fe1..1f7bcb2 100644 --- a/src/qhyccd/mod.rs +++ b/src/qhyccd/mod.rs @@ -395,11 +395,14 @@ impl Camera { // TODO: handle mono cameras correctly if mono { unsafe { - check(QHYCCDCam::SetQHYCCDDebayerOnOff(self.handle, 0))?; + // well, this can fail if debayering just isn't supported. so let's... not + QHYCCDCam::SetQHYCCDDebayerOnOff(self.handle, 0); } + /* self.set_control(Control::CONTROL_WBR, 1000.0)?; self.set_control(Control::CONTROL_WBG, 1000.0)?; self.set_control(Control::CONTROL_WBB, 1000.0)?; + */ self.settings.channels = 1; } else { unsafe { @@ -420,6 +423,10 @@ impl Camera { 1 | 2 | 3 | 4 => { self.set_color_mode(false)?; }, + 0 => { + // no, the color control is not available. mono it is! + self.set_color_mode(true)?; + } a @ _ => { println!("unexpected response when querying color setting: {}", a); return Err(CameraError::QHYError) @@ -432,6 +439,9 @@ impl Camera { self.settings.bpp = 16; } println!("roi set to {} x {} ???", imagew, imageh); + println!("gain limits: {:?}", self.get_control_limits(Control::Gain)?); + println!("exposure limits: {:?}", self.get_control_limits(Control::Exposure)?); +// panic!("hi"); Ok(()) } } |