summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-11-06 08:22:49 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-11-06 08:22:49 (GMT)
commit3de1e6f807975a823a582a957c9b88efc2170de8 (patch)
treeb56a9a00107835af4c0811b4c3185bbde43cff95
parentb1ba2bcadc8eabc7a9e548ece860032d5458fd77 (diff)
Add more debug logging. Change status to progress when slewing is over
-rw-r--r--kstars/ekos/align/align.cpp32
1 files changed, 26 insertions, 6 deletions
diff --git a/kstars/ekos/align/align.cpp b/kstars/ekos/align/align.cpp
index 6fa4f2c..2aa087c 100644
--- a/kstars/ekos/align/align.cpp
+++ b/kstars/ekos/align/align.cpp
@@ -1054,11 +1054,23 @@ void Align::processTelescopeNumber(INumberVectorProperty *coord)
ScopeRAOut->setText(ra_dms);
ScopeDecOut->setText(dec_dms);
+ if (Options::alignmentLogging())
+ qDebug() << "Alignment: State is " << Ekos::getAlignStatusString(state) << " isSlewing? " << currentTelescope->isSlewing() << " slew Dirty? " << slew_dirty
+ << " Current GOTO Mode? " << currentGotoMode << " LoadSlewState? " << pstateStr(loadSlewState);
+
if (currentTelescope->isSlewing() && slew_dirty == false)
+ {
slew_dirty = true;
+ if (Options::alignmentLogging())
+ qDebug() << "Alignment: slew dirty is true.";
+ }
else if (currentTelescope->isSlewing() == false && slew_dirty)
{
slew_dirty = false;
+
+ if (Options::alignmentLogging())
+ qDebug() << "Alignment: slew dirty is false.";
+
if (Options::solverUpdateCoords())
copyCoordsToBoxes();
@@ -1067,12 +1079,23 @@ void Align::processTelescopeNumber(INumberVectorProperty *coord)
if (loadSlewState == IPS_BUSY)
{
loadSlewState = IPS_IDLE;
+
+ if (Options::alignmentLogging())
+ qDebug() << "Alignment: loadSlewState is IDLE.";
+
+ state = ALIGN_PROGRESS;
+ emit newStatus(state);
+
QTimer::singleShot(delaySpin->value(), this, SLOT(captureAndSolve()));
return;
}
else if (currentGotoMode == GOTO_SLEW && state == ALIGN_SLEWING)
{
appendLogText(i18n("Target accuracy is not met, running solver again..."));
+
+ state = ALIGN_PROGRESS;
+ emit newStatus(state);
+
QTimer::singleShot(delaySpin->value(), this, SLOT(captureAndSolve()));
return;
}
@@ -1168,18 +1191,15 @@ void Align::Sync()
void Align::SlewToTarget()
{
- //if (canSync && (loadSlewMode == false || (loadSlewMode == true && loadSlewIterations < loadSlewIterationsSpin->value() )))
if (canSync && loadSlewState == IPS_IDLE)
Sync();
- //m_slewToTargetSelected = slewR->isChecked();
+ state = ALIGN_SLEWING;
+ emit newStatus(state);
currentTelescope->Slew(&targetCoord);
- appendLogText(i18n("Slewing to target coordinates: RA (%1) DEC (%2).", targetCoord.ra().toHMSString(), targetCoord.dec().toDMSString()));
-
- state = ALIGN_SLEWING;
- emit newStatus(state);
+ appendLogText(i18n("Slewing to target coordinates: RA (%1) DEC (%2).", targetCoord.ra().toHMSString(), targetCoord.dec().toDMSString()));
}
void Align::executePolarAlign()