Telescope Control Library
Diff: Axis.cpp
- Revision:
- 2:2ee28add0821
- Parent:
- 0:6cb2eaf8b133
- Child:
- 9:d0413a9b1386
diff -r a4d5537de7ae -r 2ee28add0821 Axis.cpp --- a/Axis.cpp Sun Aug 19 05:37:52 2018 +0000 +++ b/Axis.cpp Mon Aug 20 23:42:21 2018 +0000 @@ -1,13 +1,13 @@ /* * Axis.cpp * - * Created on: 2018Äê2ÔÂ24ÈÕ + * Created on: 2018��2��24�� * Author: caoyuan9642 */ #include <Axis.h> -#define AXIS_DEBUG 1 +#define AXIS_DEBUG 0 static inline double min(double x, double y) { @@ -22,7 +22,7 @@ TelescopeConfiguration::getDouble( "default_guide_speed_sidereal") * sidereal_speed), status( AXIS_STOPPED), slewState(AXIS_NOT_SLEWING), slew_finish_sem(0, - 1), slew_finish_state(FINISH_COMPLETE) + 1), slew_finish_state(FINISH_COMPLETE), guiding(false) { if (stepsPerDeg <= 0) error("Axis: steps per degree must be > 0"); @@ -557,6 +557,7 @@ else if (flags & AXIS_GUIDE_SIGNAL) { bool stopped = false; + guiding = true; // Guide. Process all commands in the queue while (true) { @@ -655,6 +656,7 @@ break; } } + guiding = false; if (stopped) { //Complete break out