summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.rs6
-rw-r--r--src/qhyccd/mod.rs9
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;
+ }
+ }
}
}