summaryrefslogtreecommitdiff
path: root/include/qhy/minicam5base.h
blob: 874b606aca975b226b70cda75093f3a0821fb928 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/*
 QHYCCD SDK
 
 Copyright (c) 2014 QHYCCD.
 All Rights Reserved.
 
 This program is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the Free
 Software Foundation; either version 2 of the License, or (at your option)
 any later version.
 
 This program is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 more details.
 
 You should have received a copy of the GNU General Public License along with
 this program; if not, write to the Free Software Foundation, Inc., 59
 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 The full GNU General Public License is included in this distribution in the
 file called LICENSE.
 */

/*! @file minicam5f_m.h
 *  @brief MINICAM5S_M class define
 */

#include "qhy5liibase.h"

#ifndef MINICAM5BASE_DEF
#define MINICAM5BASE_DEF


/**
 * @brief MINICAM5S_M class define
 *
 * include all functions for miniCam5s-m
 */
class MINICAM5BASE:public QHY5LIIBASE
{
public:
    MINICAM5BASE();
    ~MINICAM5BASE();
            
    /**
     @fn uint32_t InitChipRegs(qhyccd_handle *h)
     @brief Init the registers and some other things
     @param h camera control handle
     @return
     success return QHYCCD_SUCCESS \n
     another QHYCCD_ERROR code on other failures
     */
    uint32_t InitChipRegs(qhyccd_handle *h);
    
    
    /**
     @fn double GetChipCoolTemp(qhyccd_handle *h)
     @brief get the current ccd/cmos temprature
     @param h camera control handle
     @return
     success return the current cool temprature \n
     another QHYCCD_ERROR code on other failures
     */
    double GetChipCoolTemp(qhyccd_handle *h);
    
    /**
     @fn double GetChipCoolPWM()
     @brief get the current ccd/cmos temprature
     @return
     success return the current cool temprature \n
     another QHYCCD_ERROR code on other failures
     */
    double GetChipCoolPWM();

    /**
     @fn uint32_t AutoTempControl(qhyccd_handle *h,double ttemp)
     @brief auto temprature control
     @param h camera control handle
     @param ttemp target temprature(degree Celsius)
     @return
     success return QHYCCD_SUCCESS \n
     another QHYCCD_ERROR code on other failures
     */
    uint32_t AutoTempControl(qhyccd_handle *h,double ttemp);

    /**
     @fn uint32_t SetChipCoolPWM(qhyccd_handle *h,double PWM)
     @brief set cool power
     @param h camera control handle
     @param PWM power(0-255)
     @return
     success return QHYCCD_SUCCESS \n
     another QHYCCD_ERROR code on other failures
     */
    uint32_t SetChipCoolPWM(qhyccd_handle *h,double PWM);
        
       
    /**
     @fn void SetAnalogGain(double gain)
     @brief set gain to camera,here it is the bottom
     @param gain gain value
     */
    void SetAnalogGain(qhyccd_handle *h,double gain);

	 /** 
	  @fn uint32_t SendOrder2CFW(qhyccd_handle *handle,char *order,uint32_t length)
      @brief control color filter wheel 
      @param handle camera control handle
	  @param order order send to color filter wheel
	  @param length the order string length
	  @return
	  on success,return QHYCCD_SUCCESS \n
	  another QHYCCD_ERROR code on other failures
    */
	 uint32_t SendOrder2CFW(qhyccd_handle *handle,char *order,uint32_t length);

	 /** 
	  @fn uint32_t GetCFWStatus(qhyccd_handle *handle,char *status)
      @brief get the color filter wheel status
      @param handle camera control handle
	  @param status the color filter wheel position status
	  @return
	  on success,return QHYCCD_SUCCESS \n
	  another QHYCCD_ERROR code on other failures
    */
	uint32_t GetCFWStatus(qhyccd_handle *handle,char *status);

private:
    //uint32_t expmode;  //!< expose time mode
    //double pllratio; //!< inter pll ratio
    //uint32_t longtimeflag;

	double lastTargetTemp;
	double  lastPWM;
};
#endif