Commit bf3040dd authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Expand profile Pixmap to cover more area. Only submit state changes once per...

Expand profile Pixmap to cover more area. Only submit state changes once per action, GUIDE_DITHERING_SUCCESS was being emitted twice
parent 390e58cc
...@@ -1000,7 +1000,7 @@ bool Guide::dither() ...@@ -1000,7 +1000,7 @@ bool Guide::dither()
if (state != GUIDE_GUIDING) if (state != GUIDE_GUIDING)
capture(); capture();
state = GUIDE_DITHERING; setStatus(GUIDE_DITHERING);
return true; return true;
} }
...@@ -1191,7 +1191,7 @@ void Guide::setStatus(Ekos::GuideState newState) ...@@ -1191,7 +1191,7 @@ void Guide::setStatus(Ekos::GuideState newState)
break; break;
case GUIDE_GUIDING: case GUIDE_GUIDING:
if (previousState == GUIDE_SUSPENDED) if (previousState == GUIDE_SUSPENDED || previousState == GUIDE_DITHERING_SUCCESS)
appendLogText(i18n("Guiding resumed.")); appendLogText(i18n("Guiding resumed."));
else else
{ {
...@@ -1231,11 +1231,9 @@ void Guide::setStatus(Ekos::GuideState newState) ...@@ -1231,11 +1231,9 @@ void Guide::setStatus(Ekos::GuideState newState)
break; break;
case GUIDE_DITHERING_SUCCESS: case GUIDE_DITHERING_SUCCESS:
appendLogText(i18n("Dithering completed successfully. Resuming guiding...")); appendLogText(i18n("Dithering completed successfully."));
emit newStatus(state);
// Go back to guiding state immediately // Go back to guiding state immediately
state = GUIDE_GUIDING; setStatus(GUIDE_GUIDING);
emit newStatus(state);
capture(); capture();
break; break;
default: default:
...@@ -1805,7 +1803,7 @@ void Guide::setAxisDelta(double ra, double de) ...@@ -1805,7 +1803,7 @@ void Guide::setAxisDelta(double ra, double de)
emit newAxisDelta(ra,de); emit newAxisDelta(ra,de);
profilePixmap = driftGraph->grab(QRect(QPoint(0, 50), QSize(driftGraph->width(), 101))); profilePixmap = driftGraph->grab(QRect(QPoint(0, 50), QSize(driftGraph->width(), 150)));
emit newProfilePixmap(profilePixmap); emit newProfilePixmap(profilePixmap);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment