Skip to content

Add tracking-related interfaces for ASCOM mounts - #1457

Merged
bwdev01 merged 9 commits into
masterfrom
Ascom_Tracking
Aug 21, 2026
Merged

Add tracking-related interfaces for ASCOM mounts#1457
bwdev01 merged 9 commits into
masterfrom
Ascom_Tracking

Conversation

@bwdev01

@bwdev01 bwdev01 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/scope.h Outdated
Comment thread src/scope.h Outdated
Comment thread src/scope_ascom.cpp Outdated
Comment thread src/scope.cpp Outdated
Comment thread src/scope.h Outdated
Comment thread src/scope.h
@bwdev01
bwdev01 requested a review from agalasso August 14, 2026 20:24
Comment thread src/scope.cpp Outdated
Comment thread src/scope.cpp Outdated
Comment thread src/scope_ascom.cpp Outdated
Comment thread src/scope_ascom.cpp Outdated
@bwdev01
bwdev01 requested a review from agalasso August 17, 2026 01:27
Comment thread src/scope.cpp Outdated
Comment thread src/scope.cpp Outdated
Comment thread src/scope.cpp Outdated
Comment thread src/scope.h Outdated
Comment thread src/scope_ascom.cpp Outdated
@bwdev01
bwdev01 requested a review from agalasso August 18, 2026 02:08

@agalasso agalasso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks pretty good, a few minor suggestions

Comment thread src/scope_ascom.cpp Outdated
Comment thread src/scope_ascom.cpp Outdated
Comment thread src/scope_ascom.cpp Outdated
Comment thread src/scope_ascom.cpp Outdated
Comment thread src/scope_ascom.h Outdated
@bwdev01
bwdev01 requested a review from agalasso August 18, 2026 20:31

@agalasso agalasso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getting very close :)

Comment thread src/scope.cpp Outdated

bool Scope::GetTrackingRate(TrackingRateInfo *rateInfo)
{
rateInfo = &m_supportedTrackingRates.front(); // sidereal

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't actually do anything -- it just reassigns the local variable with no visible effect for the caller
Here's what we need:

Suggested change
rateInfo = &m_supportedTrackingRates.front(); // sidereal
*rateInfo = m_supportedTrackingRates[0]; // sidereal

Comment thread src/scope_ascom.cpp Outdated
Comment on lines +960 to +975
rateInfo->numericalID = (TrackingRate) vRes.iVal;
switch (rateInfo->numericalID)
{
case rateSidereal:
rateInfo->name = _("Sidereal");
break;
case rateLunar:
rateInfo->name = _("Lunar");
break;
case rateSolar:
rateInfo->name = _("Solar");
break;
case rateKing:
rateInfo->name = _("King");
break;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's explicitly check for an unknown rate rather than just quietly fall through. Also, I think it will be better to only update the result when the method succeeds -- no side-effects if the method fails.

Suggested change
rateInfo->numericalID = (TrackingRate) vRes.iVal;
switch (rateInfo->numericalID)
{
case rateSidereal:
rateInfo->name = _("Sidereal");
break;
case rateLunar:
rateInfo->name = _("Lunar");
break;
case rateSolar:
rateInfo->name = _("Solar");
break;
case rateKing:
rateInfo->name = _("King");
break;
}
wxString name;
switch (vRes.iVal)
{
case rateSidereal:
name = _("Sidereal");
break;
case rateLunar:
name = _("Lunar");
break;
case rateSolar:
name = _("Solar");
break;
case rateKing:
name = _("King");
break;
default:
throw ERROR_INFO(wxString::Format("Unknown tracking rate (%d)", vRes.iVal));
}
rateInfo->numericalID = (TrackingRate) vRes.iVal;
rateInfo->name = name;

@bwdev01

bwdev01 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Yes, getting close - about like Christmas...

@bwdev01
bwdev01 requested a review from agalasso August 20, 2026 01:59

@agalasso agalasso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@bwdev01
bwdev01 merged commit 27ca7e2 into master Aug 21, 2026
2 checks passed
@bwdev01
bwdev01 deleted the Ascom_Tracking branch August 21, 2026 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants