@@ -296,14 +296,26 @@ Line::Line(QString ln, int n, QSettings *s, QWidget *pw, QList<Line*> *p) :
296296 MountMotorIndex = value;
297297 if (ahp_gt_is_connected ()) {
298298 ahp_gt_select_device (MountMotorIndex);
299- if (ahp_gt_is_detected (Ra)) {
299+ if (ahp_gt_is_detected ()) {
300+ altaz = false ;
300301 fork = false ;
302+ if (ahp_gt_axis_is_detected (Ra)) {
303+ if ((ahp_gt_get_features (Ra) & isAZEQ) != 0 ) {
304+ altaz |= true ;
305+ }
306+ }
307+ if (ahp_gt_axis_is_detected (Dec)) {
308+ if ((ahp_gt_get_features (Dec) & isAZEQ) != 0 ) {
309+ altaz |= true ;
310+ }
311+ }
301312 if ((ahp_gt_get_mount_flags () & isForkMount) != 0 ) {
302313 fork = true ;
303314 }
304315 switch (ahp_gt_get_mount_type ()) {
305- case isMF:
306316 case isDOB:
317+ altaz = true ;
318+ case isMF:
307319 fork = true ;
308320 break ;
309321 default :
@@ -414,7 +426,7 @@ void Line::runClicked(bool checked)
414426void Line::updateLocation ()
415427{
416428 if (ahp_gt_is_connected ()) {
417- if (ahp_gt_is_detected (getRailIndex ())) {
429+ if (ahp_gt_axis_is_detected (getRailIndex ())) {
418430 ahp_gt_select_device (getRailIndex ());
419431 if (ahp_gt_is_axis_moving (RailX)) {
420432 double x = ahp_gt_get_position (RailX, nullptr );
@@ -464,7 +476,7 @@ void Line::setLocation(int value)
464476 targetLocation ()->xyz .z = xyz_locations[current_location].xyz .z ;
465477 if (update_location) {
466478 if (ahp_gt_is_connected ()) {
467- if (ahp_gt_is_detected (getRailIndex ())) {
479+ if (ahp_gt_axis_is_detected (getRailIndex ())) {
468480 ahp_gt_select_device (getRailIndex ());
469481 ahp_gt_goto_absolute (RailX, xyz_locations[current_location].xyz .x *2.0 *M_PI/ahp_gt_get_totalsteps (RailX)/1000 , M_PI * 2 * 800.0 / SIDEREAL_DAY);
470482 ahp_gt_goto_absolute (RailY, xyz_locations[current_location].xyz .y *2.0 *M_PI/ahp_gt_get_totalsteps (RailY)/1000 , M_PI * 2 * 800.0 / SIDEREAL_DAY);
@@ -483,7 +495,7 @@ void Line::updateRa()
483495 if (stream != nullptr )
484496 {
485497 if (ahp_gt_is_connected ()) {
486- if (ahp_gt_is_detected (getMountIndex ())) {
498+ if (ahp_gt_axis_is_detected (getMountIndex ())) {
487499 double v = ahp_gt_get_position (0 , nullptr );
488500 v *= 12.0 ;
489501 v /= M_PI;
@@ -498,7 +510,7 @@ void Line::updateDec()
498510 if (stream != nullptr )
499511 {
500512 if (ahp_gt_is_connected ()) {
501- if (ahp_gt_is_detected (getMountIndex ())) {
513+ if (ahp_gt_axis_is_detected (getMountIndex ())) {
502514 double v = ahp_gt_get_position (1 , nullptr );
503515 v *= 180.0 ;
504516 v /= M_PI;
@@ -562,7 +574,7 @@ bool Line::isRailBusy()
562574 if (stream != nullptr )
563575 {
564576 if (ahp_gt_is_connected ()) {
565- if (ahp_gt_is_detected (getRailIndex ())) {
577+ if (ahp_gt_axis_is_detected (getRailIndex ())) {
566578 bool busy = ahp_gt_is_axis_moving (RailX);
567579 busy |= ahp_gt_is_axis_moving (RailY);
568580 busy |= ahp_gt_is_axis_moving (RailZ);
@@ -578,7 +590,7 @@ bool Line::isMountBusy()
578590 if (stream != nullptr )
579591 {
580592 if (ahp_gt_is_connected ()) {
581- if (ahp_gt_is_detected (getMountIndex ())) {
593+ if (ahp_gt_axis_is_detected (getMountIndex ())) {
582594 bool busy = ahp_gt_is_axis_moving (Ra);
583595 busy |= ahp_gt_is_axis_moving (Dec);
584596 return busy;
@@ -590,7 +602,7 @@ bool Line::isMountBusy()
590602
591603void Line::gotoRaDec (double ra, double dec) {
592604 if (ahp_gt_is_connected ()) {
593- if (ahp_gt_is_detected (getMountIndex ())) {
605+ if (ahp_gt_axis_is_detected (getMountIndex ())) {
594606 ahp_gt_select_device (getMountIndex ());
595607 ahp_gt_set_location (Latitude, Longitude, Elevation);
596608 ahp_gt_goto_radec (ra, dec);
@@ -600,7 +612,7 @@ void Line::gotoRaDec(double ra, double dec) {
600612
601613void Line::startTracking () {
602614 if (ahp_gt_is_connected ()) {
603- if (ahp_gt_is_detected (getMountIndex ())) {
615+ if (ahp_gt_axis_is_detected (getMountIndex ())) {
604616 Line::motor_lock ();
605617 ahp_gt_select_device (getMountIndex ());
606618 ahp_gt_stop_motion (Ra, 1 );
@@ -612,7 +624,7 @@ void Line::startTracking() {
612624
613625void Line::startSlewing (double ra_rate, double dec_rate) {
614626 if (ahp_gt_is_connected ()) {
615- if (ahp_gt_is_detected (getMountIndex ())) {
627+ if (ahp_gt_axis_is_detected (getMountIndex ())) {
616628 Line::motor_lock ();
617629 ahp_gt_select_device (getMountIndex ());
618630 if (ra_rate != 0.0 ) {
@@ -630,14 +642,14 @@ void Line::startSlewing(double ra_rate, double dec_rate) {
630642
631643void Line::haltMotors () {
632644 if (ahp_gt_is_connected ()) {
633- if (ahp_gt_is_detected (getMountIndex ())) {
645+ if (ahp_gt_axis_is_detected (getMountIndex ())) {
634646 Line::motor_lock ();
635647 ahp_gt_select_device (getMountIndex ());
636648 ahp_gt_stop_motion (Ra, 1 );
637649 ahp_gt_stop_motion (Dec, 1 );
638650 Line::motor_unlock ();
639651 }
640- if (ahp_gt_is_detected (getRailIndex ())) {
652+ if (ahp_gt_axis_is_detected (getRailIndex ())) {
641653 Line::motor_lock ();
642654 ahp_gt_select_device (getRailIndex ());
643655 ahp_gt_stop_motion (RailX, 1 );
0 commit comments