diff --git a/drivers/telescope/celestrongps.cpp b/drivers/telescope/celestrongps.cpp index 262942b..3f9e02f 100644 --- a/drivers/telescope/celestrongps.cpp +++ b/drivers/telescope/celestrongps.cpp @@ -653,6 +653,8 @@ bool CelestronGPS::MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command) switch (command) { case MOTION_START: + TrackState = SCOPE_SLEWING; + manualSlewing = true; if (driver.start_motion(move, rate) == false) { LOG_ERROR("Error setting N/S motion direction."); @@ -663,6 +665,7 @@ bool CelestronGPS::MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command) break; case MOTION_STOP: + manualSlewing = false; if (driver.stop_motion(move) == false) { LOG_ERROR("Error stopping N/S motion."); @@ -684,6 +687,8 @@ bool CelestronGPS::MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command) switch (command) { case MOTION_START: + TrackState = SCOPE_SLEWING; + manualSlewing = true; if (driver.start_motion(move, rate) == false) { LOG_ERROR("Error setting W/E motion direction."); @@ -694,6 +699,7 @@ bool CelestronGPS::MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command) break; case MOTION_STOP: + manualSlewing = false; if (driver.stop_motion(move) == false) { LOG_ERROR("Error stopping W/E motion."); @@ -819,7 +825,7 @@ bool CelestronGPS::ReadScopeStatus() case SCOPE_SLEWING: // are we done? bool slewing; - if (driver.is_slewing(&slewing) && !slewing) + if (driver.is_slewing(&slewing) && !slewing && !manualSlewing) { LOG_INFO("Slew complete, tracking..."); SetTrackEnabled(true); diff --git a/drivers/telescope/celestrongps.h b/drivers/telescope/celestrongps.h index 59d3ede..58f5b58 100644 --- a/drivers/telescope/celestrongps.h +++ b/drivers/telescope/celestrongps.h @@ -178,6 +178,7 @@ class CelestronGPS : public INDI::Telescope, public INDI::GuiderInterface, publi ISwitchVectorProperty DSTSettingSP; bool slewToIndex; + bool manualSlewing; size_t numPecBins = 0;