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/qhyccd | |
parent | 56ff8b55d5b831ed068439ff60909ffbb2fb568a (diff) |
change colors, add disabled "high gain" mode that really just multiplies readout by 128
Diffstat (limited to 'src/qhyccd')
-rw-r--r-- | src/qhyccd/mod.rs | 9 |
1 files changed, 9 insertions, 0 deletions
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; + } + } } } |