diff --git a/drivers/telescope/lx200am5.cpp b/drivers/telescope/lx200am5.cpp index 23127966d2..c75177ff32 100644 --- a/drivers/telescope/lx200am5.cpp +++ b/drivers/telescope/lx200am5.cpp @@ -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'; +} + ///////////////////////////////////////////////////////////////////////////// /// ///////////////////////////////////////////////////////////////////////////// @@ -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; diff --git a/drivers/telescope/lx200am5.h b/drivers/telescope/lx200am5.h index 5eb7ac4cc0..35ba04414e 100644 --- a/drivers/telescope/lx200am5.h +++ b/drivers/telescope/lx200am5.h @@ -112,6 +112,7 @@ class LX200AM5 : public LX200Generic // Homing bool goHome(); + bool setHome(); // Guide Rate bool setGuideRate(double value);