Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Education
KStars
Commits
77c45c57
Commit
77c45c57
authored
Feb 04, 2017
by
Jasem Mutlaq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get pixel size info from CCD chip. Add warnings for DSLRs in case CCD info is incomplete
parent
96e25549
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
1 deletion
+43
-1
kstars/ekos/capture/capture.cpp
kstars/ekos/capture/capture.cpp
+8
-1
kstars/indi/indiccd.cpp
kstars/indi/indiccd.cpp
+31
-0
kstars/indi/indiccd.h
kstars/indi/indiccd.h
+4
-0
No files found.
kstars/ekos/capture/capture.cpp
View file @
77c45c57
...
@@ -612,6 +612,13 @@ void Capture::checkCCD(int ccdNum)
...
@@ -612,6 +612,13 @@ void Capture::checkCCD(int ccdNum)
appendLogText
(
i18n
(
"Using FITS transfer format from DSLR camera. Configure DSLR transfer format in options."
));
appendLogText
(
i18n
(
"Using FITS transfer format from DSLR camera. Configure DSLR transfer format in options."
));
else
else
appendLogText
(
i18n
(
"Using native transfer format from DSLR camera. Configure DSLR transfer format in options."
));
appendLogText
(
i18n
(
"Using native transfer format from DSLR camera. Configure DSLR transfer format in options."
));
double
pixelX
=
0
,
pixelY
=
0
;
bool
rc
=
targetChip
->
getPixelSize
(
pixelX
,
pixelY
);
if
(
rc
==
false
||
pixelX
==
0
||
pixelY
==
0
)
{
appendLogText
(
i18n
(
"DSLR CCD Information is incomplete. Please update CCD Information in Image Info section in the INDI Control Panel."
));
}
}
}
liveVideoB
->
setEnabled
(
currentCCD
->
hasVideoStream
());
liveVideoB
->
setEnabled
(
currentCCD
->
hasVideoStream
());
...
@@ -1480,7 +1487,7 @@ void Capture::setExposureProgress(ISD::CCDChip * tChip, double value, IPState st
...
@@ -1480,7 +1487,7 @@ void Capture::setExposureProgress(ISD::CCDChip * tChip, double value, IPState st
activeJob
->
setCaptureRetires
(
retries
);
activeJob
->
setCaptureRetires
(
retries
);
appendLogText
(
i18n
(
"Capture failed."
));
appendLogText
(
i18n
(
"Capture failed.
Check INDI Control Panel for details.
"
));
if
(
retries
==
3
)
if
(
retries
==
3
)
{
{
...
...
kstars/indi/indiccd.cpp
View file @
77c45c57
...
@@ -187,6 +187,37 @@ bool CCDChip::getFrameMinMax(int *minX, int *maxX, int *minY, int *maxY, int *mi
...
@@ -187,6 +187,37 @@ bool CCDChip::getFrameMinMax(int *minX, int *maxX, int *minY, int *maxY, int *mi
}
}
bool
CCDChip
::
getPixelSize
(
double
&
x
,
double
&
y
)
{
INumberVectorProperty
*
ccdInfoProp
=
NULL
;
switch
(
type
)
{
case
PRIMARY_CCD
:
ccdInfoProp
=
baseDevice
->
getNumber
(
"CCD_INFO"
);
break
;
case
GUIDE_CCD
:
ccdInfoProp
=
baseDevice
->
getNumber
(
"GUIDER_INFO"
);
break
;
}
if
(
ccdInfoProp
==
NULL
)
return
false
;
INumber
*
pixelX
=
IUFindNumber
(
ccdInfoProp
,
"CCD_PIXEL_SIZE_X"
);
INumber
*
pixelY
=
IUFindNumber
(
ccdInfoProp
,
"CCD_PIXEL_SIZE_Y"
);
if
(
pixelX
==
NULL
||
pixelY
==
NULL
)
return
false
;
x
=
pixelX
->
value
;
y
=
pixelY
->
value
;
return
true
;
}
bool
CCDChip
::
getFrame
(
int
*
x
,
int
*
y
,
int
*
w
,
int
*
h
)
bool
CCDChip
::
getFrame
(
int
*
x
,
int
*
y
,
int
*
w
,
int
*
h
)
{
{
...
...
kstars/indi/indiccd.h
View file @
77c45c57
...
@@ -57,6 +57,10 @@ public:
...
@@ -57,6 +57,10 @@ public:
bool
getFrame
(
int
*
x
,
int
*
y
,
int
*
w
,
int
*
h
);
bool
getFrame
(
int
*
x
,
int
*
y
,
int
*
w
,
int
*
h
);
bool
getFrameMinMax
(
int
*
minX
,
int
*
maxX
,
int
*
minY
,
int
*
maxY
,
int
*
minW
,
int
*
maxW
,
int
*
minH
,
int
*
maxH
);
bool
getFrameMinMax
(
int
*
minX
,
int
*
maxX
,
int
*
minY
,
int
*
maxY
,
int
*
minW
,
int
*
maxW
,
int
*
minH
,
int
*
maxH
);
bool
setFrame
(
int
x
,
int
y
,
int
w
,
int
h
);
bool
setFrame
(
int
x
,
int
y
,
int
w
,
int
h
);
// Pixel size
bool
getPixelSize
(
double
&
x
,
double
&
y
);
//bool getFocusFrame(int *x, int *y, int *w, int *h);
//bool getFocusFrame(int *x, int *y, int *w, int *h);
//bool setFocusFrame(int x, int y, int w, int h);
//bool setFocusFrame(int x, int y, int w, int h);
bool
resetFrame
();
bool
resetFrame
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment