Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZWO AM5 Save home position in the mount #2093

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions drivers/telescope/lx200am5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,16 @@ bool LX200AM5::goHome()
return sendCommand(":hC#");
}

/////////////////////////////////////////////////////////////////////////////
///
/////////////////////////////////////////////////////////////////////////////
bool LX200AM5::setHome()
{
const char cmd[] = ":SOa#";
char status ='0';
return sendCommand(cmd, &status, strlen(cmd), sizeof(status)) && status == '1';
}

/////////////////////////////////////////////////////////////////////////////
///
/////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -651,6 +661,12 @@ IPState LX200AM5::ExecuteHomeAction(TelescopeHomeAction action)
else
return IPS_ALERT;

case HOME_SET:
if (setHome())
return IPS_OK;
else
return IPS_ALERT;

default:
return IPS_ALERT;

Expand Down
1 change: 1 addition & 0 deletions drivers/telescope/lx200am5.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class LX200AM5 : public LX200Generic

// Homing
bool goHome();
bool setHome();

// Guide Rate
bool setGuideRate(double value);
Expand Down
Loading