From bed1216757cb4412df6d9cb0bbfd9f103b85890e Mon Sep 17 00:00:00 2001 From: Ben Gilsrud Date: Tue, 16 Aug 2016 20:11:40 -0500 Subject: [PATCH 2/2] Add missing DsiColorIII files --- 3rdparty/indi-dsi/DsiColorIII.cpp | 86 +++++++++++++++++++++++++++++++++++++++ 3rdparty/indi-dsi/DsiColorIII.h | 26 ++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 3rdparty/indi-dsi/DsiColorIII.cpp create mode 100644 3rdparty/indi-dsi/DsiColorIII.h diff --git a/3rdparty/indi-dsi/DsiColorIII.cpp b/3rdparty/indi-dsi/DsiColorIII.cpp new file mode 100644 index 0000000..bc74228 --- /dev/null +++ b/3rdparty/indi-dsi/DsiColorIII.cpp @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2009, Roland Roberts + * + * Modifications and extensions for DSI III support 2015, G. Schmidt (gs) + * + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "DsiColorIII.h" + +using namespace DSI; + +void +DsiColorIII::initImager(const char *devname) +{ + + command(DeviceCommand::SET_ROW_COUNT_EVEN, read_height_even); + command(DeviceCommand::SET_ROW_COUNT_ODD, read_height_odd); + + if (is_high_gain) + sendRegister(AdRegister::CONFIGURATION, 0x58); + else + sendRegister(AdRegister::CONFIGURATION, 0xd8); + + sendRegister(AdRegister::MUX_CONFIG, 0xc0); + + /* Sigh. "Interestingly," it would appear that you MUST take at least one + * throw-away image or else GET_EXP_TIMER_COUNT won't work on "real" + * exposures. Sounds like a firmware bug to me, but not something we can + * do anything about. Although MaximDL uses 4 exposures of 1000 ticks + * (100 ms) each, this shorter exposure works just fine. + */ + for (int i = 0; i < 1; i++) { + unsigned char *foo = getImage(1); + delete [] foo; + } +} + +DsiColorIII::DsiColorIII(const char *devname) : Device(devname) +{ + // color_type = ColorType.NONE; + is_high_gain = false; + + is_color = true; /* This assumes the ICX285AQ is used, which has a standard Bayer matrix */ + + /* Turn off test mode so we can actually return an image */ + test_pattern = false; + + /* The DSI Color III supports binning */ + is_binnable = true; + + /* The DSI Color III is equipped with a temperature sensor */ + has_tempsensor = true; + + /* Sony lists the pixel size a 6.45x6.45 microns. */ + + aspect_ratio = 1.0; + + read_width = 1434; + read_height_even = 0; + read_height_odd = 1050; + read_height = read_height_even + read_height_odd; + + read_bpp = 2; + + image_width = 1360; + image_height = 1024; + image_offset_x = 30; + image_offset_y = 13; + + + timeout_response = 1000; + timeout_request = 1000; + timeout_image = 5000; + pixel_size_x = 6.45; + pixel_size_y = 6.45; + + exposure_time = 10; + + initImager(); +} + +DsiColorIII::~DsiColorIII() {} diff --git a/3rdparty/indi-dsi/DsiColorIII.h b/3rdparty/indi-dsi/DsiColorIII.h new file mode 100644 index 0000000..054a31d --- /dev/null +++ b/3rdparty/indi-dsi/DsiColorIII.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2009, Roland Roberts + * + */ + +#ifndef __DsiColorIII_hh +#define __DsiColorIII_hh + +#include "DsiDevice.h" + +namespace DSI { + + class DsiColorIII : public Device { + + private: + void initImager(const char *devname = 0); + + public: + + DsiColorIII(const char *devname); + ~DsiColorIII(); + }; +}; + +#endif /* __DsiColorIII_hh */ + -- 2.7.4