Commit 9cd9341e authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Reset RMS value when reacquiring a star

parent 0d65fa06
......@@ -736,7 +736,7 @@ void Guide::exportGuideData()
if (QFile::exists(path))
{
int r = KMessageBox::warningContinueCancel(0,
int r = KMessageBox::warningContinueCancel(nullptr,
i18n("A file named \"%1\" already exists. "
"Overwrite it?",
exportFile.fileName()),
......
......@@ -249,13 +249,25 @@ void cgmath::getStarScreenPosition(double *dx, double *dy) const
bool cgmath::reset(void)
{
square_alg_idx = AUTO_THRESHOLD;
// square_alg_idx = AUTO_THRESHOLD;
// sky coord. system vars.
star_pos = Vector(0);
scr_star_pos = Vector(0);
// // sky coord. system vars.
// star_pos = Vector(0);
// scr_star_pos = Vector(0);
// setReticleParameters(video_width / 2, video_height / 2, 0.0);
ticks = 0;
channel_ticks[GUIDE_RA] = channel_ticks[GUIDE_DEC] = 0;
accum_ticks[GUIDE_RA] = accum_ticks[GUIDE_DEC] = 0;
drift_integral[GUIDE_RA] = drift_integral[GUIDE_DEC] = 0;
out_params.reset();
memset(drift[GUIDE_RA], 0, sizeof(double) * MAX_ACCUM_CNT);
memset(drift[GUIDE_DEC], 0, sizeof(double) * MAX_ACCUM_CNT);
setReticleParameters(video_width / 2, video_height / 2, 0.0);
// cleanup stat vars.
sum = 0;
return true;
}
......
......@@ -1189,6 +1189,7 @@ bool InternalGuider::reacquire()
{
m_highRMSCounter=m_starLostCounter=0;
isFirstFrame = true;
pmath->reset();
// If we were in the process of dithering, wait until settle and resume
if (rememberState == GUIDE_DITHERING)
{
......
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