void MyFrame::OnMoveComplete(wxThreadEvent& event) { try { Mount *pThisMount = event.GetPayload<Mount *>(); assert(pThisMount->IsBusy()); pThisMount->DecrementRequestCount(); Mount::MOVE_RESULT moveResult = static_cast<Mount::MOVE_RESULT>(event.GetInt()); pMount->LogGuideStepInfo(); if (moveResult != Mount::MOVE_OK) { if (moveResult == Mount::MOVE_STOP_GUIDING) { Debug.Write("mount move error indicates guiding should stop\n"); pGuider->StopGuiding(); } throw ERROR_INFO("Error reported moving"); } } catch (wxString Msg) { POSSIBLY_UNUSED(Msg); } }
void MyFrame::OnMoveComplete(wxThreadEvent& event) { try { Mount *mount = event.GetPayload<Mount *>(); assert(mount->IsBusy()); mount->DecrementRequestCount(); Mount::MOVE_RESULT moveResult = static_cast<Mount::MOVE_RESULT>(event.GetInt()); mount->LogGuideStepInfo(); // deliver the outstanding GuidingStopped notification if this is a late-arriving // move completion event if (!pGuider->IsCalibratingOrGuiding() && (!pMount || !pMount->IsBusy()) && (!pSecondaryMount || !pSecondaryMount->IsBusy())) { pFrame->NotifyGuidingStopped(); } if (moveResult != Mount::MOVE_OK) { mount->IncrementErrorCount(); if (moveResult == Mount::MOVE_STOP_GUIDING) { Debug.Write("mount move error indicates guiding should stop\n"); pGuider->StopGuiding(); } throw ERROR_INFO("Error reported moving"); } } catch (const wxString& Msg) { POSSIBLY_UNUSED(Msg); } }