Skip to content

Commit

Permalink
Fix issues to build successfully (indilib#927)
Browse files Browse the repository at this point in the history
  • Loading branch information
naheedsa authored May 20, 2024
1 parent 721c724 commit 68b8f50
Show file tree
Hide file tree
Showing 7 changed files with 180 additions and 160 deletions.
12 changes: 6 additions & 6 deletions indi-armadillo-platypus/beaver_dome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,12 @@ IPState Beaver::MoveAbs(double az)
//////////////////////////////////////////////////////////////////////////////
IPState Beaver::MoveRel(double azDiff)
{
m_TargetRotatorAz = DomeAbsPosN[0].value + azDiff;
m_TargetRotatorAz = DomeAbsPosNP[0].getValue() + azDiff;

if (m_TargetRotatorAz < DomeAbsPosN[0].min)
m_TargetRotatorAz += DomeAbsPosN[0].max;
if (m_TargetRotatorAz > DomeAbsPosN[0].max)
m_TargetRotatorAz -= DomeAbsPosN[0].max;
if (m_TargetRotatorAz < DomeAbsPosNP[0].getMin())
m_TargetRotatorAz += DomeAbsPosNP[0].getMax();
if (m_TargetRotatorAz > DomeAbsPosNP[0].getMax())
m_TargetRotatorAz -= DomeAbsPosNP[0].getMax();

// It will take a few cycles to reach final position
return MoveAbs(m_TargetRotatorAz);
Expand Down Expand Up @@ -378,7 +378,7 @@ bool Beaver::rotatorGetAz()
double res = 0;
if (sendCommand("!dome getaz#", res))
{
DomeAbsPosN[0].value = res;
DomeAbsPosNP[0].setValue(res);
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions indi-armadillo-platypus/dragonfly_dome.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ void DragonFlyDome::TimerHit()
if (getDomeState() == DOME_MOVING || getDomeState() == DOME_PARKING || getDomeState() == DOME_UNPARKING)
{
// Roll off is opening
if (DomeMotionS[DOME_CW].s == ISS_ON)
if (DomeMotionSP[DOME_CW].getState() == ISS_ON)
{
if (isSensorOn(DomeControlSensorNP[SENSOR_UNPARKED].getValue()))
{
Expand All @@ -418,7 +418,7 @@ void DragonFlyDome::TimerHit()
}
}
// Roll Off is closing
else if (DomeMotionS[DOME_CCW].s == ISS_ON)
else if (DomeMotionSP[DOME_CCW].getState() == ISS_ON)
{
if (isSensorOn(DomeControlSensorNP[SENSOR_PARKED].getValue()))
{
Expand Down
Loading

0 comments on commit 68b8f50

Please sign in to comment.