diff options
author | Andy Wortman <ixineeringeverywhere@gmail.com> | 2019-11-02 12:39:55 -0700 |
---|---|---|
committer | Andy Wortman <ixineeringeverywhere@gmail.com> | 2019-11-02 12:39:55 -0700 |
commit | ee69c873d02b89a9a6d8b6651636399c73c4ba8c (patch) | |
tree | 5ddc0eac37f40740ae9cda87f2355818781ef16b /src | |
parent | 56ff8b55d5b831ed068439ff60909ffbb2fb568a (diff) |
change colors, add disabled "high gain" mode that really just multiplies readout by 128
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 6 | ||||
-rw-r--r-- | src/qhyccd/mod.rs | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index a4ff360..4b54a3a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -161,13 +161,13 @@ fn operate_qhy(target: &'static str, count: Option<u32>, free_frames: Receiver<V let mut image_id = 0u32; let mut settings_copy = qhyccd::Settings::default(); - camera_tx.send(QHYMessage::SetControl(Control::Exposure, 120000.0 * 1000.0)).unwrap(); + camera_tx.send(QHYMessage::SetControl(Control::Exposure, 2000.0 * 1000.0)).unwrap(); camera_tx.send(QHYMessage::SetControl(Control::Offset, 00.0)).unwrap(); // camera_tx.send(QHYMessage::SetControl(Control::Gamma, 10.0)).unwrap(); // camera_tx.send(QHYMessage::SetControl(Control::Gamma, 2.0)).unwrap(); - camera_tx.send(QHYMessage::SetControl(Control::Cooler, 00.0)).unwrap(); + camera_tx.send(QHYMessage::SetControl(Control::Cooler, 15.0)).unwrap(); camera_tx.send(QHYMessage::SetControl(Control::USBTraffic, 60.0)).unwrap(); - camera_tx.send(QHYMessage::SetControl(Control::Color, 1.0)).unwrap(); // disable color + camera_tx.send(QHYMessage::SetControl(Control::Color, 0.0)).unwrap(); // disable color // camera_tx.send(QHYMessage::SetControl(Control::Gain, 3750.0)).unwrap(); camera_tx.send(QHYMessage::SetControl(Control::Gain, 4000.0)).unwrap(); // camera_tx.send(QHYMessage::SetControl(Control::Gain, 4000.0)).unwrap(); diff --git a/src/qhyccd/mod.rs b/src/qhyccd/mod.rs index becb698..5300fe1 100644 --- a/src/qhyccd/mod.rs +++ b/src/qhyccd/mod.rs @@ -124,6 +124,15 @@ pub fn fix_channels_and_endianness(dataslice: &mut [u8]) { let g_low = dataslice[i * 6 + 2]; dataslice[i * 6 + 2] = dataslice[i * 6 + 3]; dataslice[i * 6 + 3] = g_low; + + if false { + for e in 0..3 { + let el = ((dataslice[i * 6 + e * 2] as u16) << 8) | (dataslice[i * 6 + e * 2 + 1] as u16); + let el = el.saturating_mul(128); + dataslice[i * 6 + e * 2] = (el >> 8) as u8; + dataslice[i * 6 + e * 2 + 1] = el as u8; + } + } } } |