From ee69c873d02b89a9a6d8b6651636399c73c4ba8c Mon Sep 17 00:00:00 2001 From: Andy Wortman Date: Sat, 2 Nov 2019 12:39:55 -0700 Subject: change colors, add disabled "high gain" mode that really just multiplies readout by 128 --- src/qhyccd/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/qhyccd') 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; + } + } } } -- cgit v1.1