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
f3f5a18b
Commit
f3f5a18b
authored
May 22, 2017
by
Jasem Mutlaq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suspend guiding also if running two cameras from the same driver
parent
6259704c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
kstars/ekos/capture/capture.cpp
kstars/ekos/capture/capture.cpp
+16
-5
kstars/ekos/capture/capture.h
kstars/ekos/capture/capture.h
+2
-4
No files found.
kstars/ekos/capture/capture.cpp
View file @
f3f5a18b
...
@@ -701,6 +701,18 @@ void Capture::checkCCD(int ccdNum)
...
@@ -701,6 +701,18 @@ void Capture::checkCCD(int ccdNum)
}
}
}
}
void
Capture
::
setGuideChip
(
ISD
::
CCDChip
*
chip
)
{
guideChip
=
chip
;
// We should suspend guide in two scenarios:
// 1. If guide chip is within the primary CCD, then we cannot download any data from guide chip while primary CCD is downloading.
// 2. If we have two CCDs running from ONE driver (Multiple-Devices-Per-Driver mpdp is true). Same issue as above, only one download
// at a time.
// After primary CCD download is complete, we resume guiding.
suspendGuideOnDownload
=
(
currentCCD
->
getChip
(
ISD
::
CCDChip
::
GUIDE_CCD
)
==
guideChip
)
||
(
guideChip
->
getCCD
()
==
currentCCD
&&
currentCCD
->
getDriverInfo
()
->
getAuxInfo
().
value
(
"mdpd"
,
false
).
toBool
());
}
void
Capture
::
resetFrameToZero
()
void
Capture
::
resetFrameToZero
()
{
{
frameXIN
->
setMinimum
(
0
);
frameXIN
->
setMinimum
(
0
);
...
@@ -1224,10 +1236,9 @@ void Capture::processJobCompletion()
...
@@ -1224,10 +1236,9 @@ void Capture::processJobCompletion()
//Resume guiding if it was suspended before
//Resume guiding if it was suspended before
//if (isAutoGuiding && currentCCD->getChip(ISD::CCDChip::GUIDE_CCD) == guideChip)
//if (isAutoGuiding && currentCCD->getChip(ISD::CCDChip::GUIDE_CCD) == guideChip)
if
(
guideState
==
GUIDE_SUSPENDED
&&
currentCCD
->
getChip
(
ISD
::
CCDChip
::
GUIDE_CCD
)
==
guideChip
)
if
(
guideState
==
GUIDE_SUSPENDED
&&
suspendGuideOnDownload
)
emit
resumeGuiding
();
emit
resumeGuiding
();
}
}
}
}
bool
Capture
::
resumeSequence
()
bool
Capture
::
resumeSequence
()
...
@@ -1260,7 +1271,7 @@ bool Capture::resumeSequence()
...
@@ -1260,7 +1271,7 @@ bool Capture::resumeSequence()
//Resume guiding if it was suspended before
//Resume guiding if it was suspended before
//if (isAutoGuiding && currentCCD->getChip(ISD::CCDChip::GUIDE_CCD) == guideChip)
//if (isAutoGuiding && currentCCD->getChip(ISD::CCDChip::GUIDE_CCD) == guideChip)
if
(
guideState
==
GUIDE_SUSPENDED
&&
currentCCD
->
getChip
(
ISD
::
CCDChip
::
GUIDE_CCD
)
==
guideChip
)
if
(
guideState
==
GUIDE_SUSPENDED
&&
suspendGuideOnDownload
)
emit
resumeGuiding
();
emit
resumeGuiding
();
return
true
;
return
true
;
...
@@ -1283,7 +1294,7 @@ bool Capture::resumeSequence()
...
@@ -1283,7 +1294,7 @@ bool Capture::resumeSequence()
}
}
// If we suspended guiding due to primary chip download, resume guide chip guiding now
// If we suspended guiding due to primary chip download, resume guide chip guiding now
if
(
guideState
==
GUIDE_SUSPENDED
&&
currentCCD
->
getChip
(
ISD
::
CCDChip
::
GUIDE_CCD
)
==
guideChip
)
if
(
guideState
==
GUIDE_SUSPENDED
&&
suspendGuideOnDownload
)
emit
resumeGuiding
();
emit
resumeGuiding
();
if
(
guideState
==
GUIDE_GUIDING
&&
Options
::
ditherEnabled
()
&&
activeJob
->
getFrameType
()
==
FRAME_LIGHT
&&
--
ditherCounter
==
0
)
if
(
guideState
==
GUIDE_GUIDING
&&
Options
::
ditherEnabled
()
&&
activeJob
->
getFrameType
()
==
FRAME_LIGHT
&&
--
ditherCounter
==
0
)
...
@@ -1592,7 +1603,7 @@ void Capture::setExposureProgress(ISD::CCDChip * tChip, double value, IPState st
...
@@ -1592,7 +1603,7 @@ void Capture::setExposureProgress(ISD::CCDChip * tChip, double value, IPState st
}
}
//if (isAutoGuiding && Options::useEkosGuider() && currentCCD->getChip(ISD::CCDChip::GUIDE_CCD) == guideChip)
//if (isAutoGuiding && Options::useEkosGuider() && currentCCD->getChip(ISD::CCDChip::GUIDE_CCD) == guideChip)
if
(
guideState
==
GUIDE_GUIDING
&&
Options
::
guiderType
()
==
0
&&
currentCCD
->
getChip
(
ISD
::
CCDChip
::
GUIDE_CCD
)
==
guideChip
)
if
(
guideState
==
GUIDE_GUIDING
&&
Options
::
guiderType
()
==
0
&&
suspendGuideOnDownload
)
{
{
if
(
Options
::
captureLogging
())
if
(
Options
::
captureLogging
())
qDebug
()
<<
"Capture: Autoguiding suspended until primary CCD chip completes downloading..."
;
qDebug
()
<<
"Capture: Autoguiding suspended until primary CCD chip completes downloading..."
;
...
...
kstars/ekos/capture/capture.h
View file @
f3f5a18b
...
@@ -436,10 +436,7 @@ class Capture : public QWidget, public Ui::Capture
...
@@ -436,10 +436,7 @@ class Capture : public QWidget, public Ui::Capture
void
saveFITSDirectory
();
void
saveFITSDirectory
();
void
setDefaultCCD
(
QString
ccd
);
void
setDefaultCCD
(
QString
ccd
);
void
setNewRemoteFile
(
QString
file
);
void
setNewRemoteFile
(
QString
file
);
void
setGuideChip
(
ISD
::
CCDChip
*
chip
)
void
setGuideChip
(
ISD
::
CCDChip
*
chip
);
{
guideChip
=
chip
;
}
// Sequence Queue
// Sequence Queue
void
loadSequenceQueue
();
void
loadSequenceQueue
();
...
@@ -609,6 +606,7 @@ class Capture : public QWidget, public Ui::Capture
...
@@ -609,6 +606,7 @@ class Capture : public QWidget, public Ui::Capture
// Misc
// Misc
bool
ignoreJobProgress
;
bool
ignoreJobProgress
;
bool
suspendGuideOnDownload
=
false
;
// State
// State
CaptureState
state
;
CaptureState
state
;
...
...
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