Skip to content

Commit

Permalink
drivers/dome: rigel_dome shutter parking (#2115)
Browse files Browse the repository at this point in the history
  • Loading branch information
Teasel-Ian authored Sep 18, 2024
1 parent 9fc5e54 commit 69343d3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions drivers/dome/rigel_dome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,16 @@ bool RigelDome::Sync(double az)
/////////////////////////////////////////////////////////////////////////////
IPState RigelDome::Park()
{
if (readShutterStatus() && ShutterParkPolicySP[SHUTTER_CLOSE_ON_PARK].getState() == ISS_ON)
{
if(ControlShutter(SHUTTER_CLOSE))
{
LOG_INFO("Shutter close on park");
}
else
return IPS_ALERT;
}

targetAz = GetAxis1Park();
if (setParkAz(targetAz))
{
Expand Down Expand Up @@ -400,6 +410,16 @@ bool RigelDome::setHome(double az)
/////////////////////////////////////////////////////////////////////////////
IPState RigelDome::UnPark()
{
if (readShutterStatus() && ShutterParkPolicySP[SHUTTER_OPEN_ON_UNPARK].getState() == ISS_ON)
{
if(ControlShutter(SHUTTER_OPEN))
{
LOG_INFO("Shutter open on unpark");
}
else
return IPS_ALERT;
}

return IPS_OK;
}

Expand Down

0 comments on commit 69343d3

Please sign in to comment.