From 58ae68b8107ed471560fb952c3676e354ba3a99b Mon Sep 17 00:00:00 2001 From: Alain Date: Mon, 23 Oct 2023 21:04:11 +0200 Subject: [PATCH] Fixed 9 Stars Align (#1956) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Allowing Meridian Flip Limits East and West -180 .. 180 * setup version * defaut Meridian Value to -20 West / +20 East * Fixed setUTCOffset to Onstep formt :SG[sHH]# * fix after change in lx200driver.cpp and fix to have UTC hh:00, hh:30, hh:45 * fix negtives UTC Offsets * fixed UTC uninitialized structure tahnks Norikyu * OnStep 1.17 minor fix * Onstep * Onstep * Implemented Focuser Temperature Compensation * Fixed Focuser T° Compensation * removed unused properties causing undefined defNumberVector * Fixed minor bugs and typo * fix minor bugs and typo * minor fixes * fixes OnStepX :Ft# and :GX98# * fixed Focuser Temperature in Ekos * fixed FOCUS_TEMPERATURE Property name * Weather and Focus T° fixes * version 1.20 * clean up version 1.20 * fixed 9 stars align --- drivers.xml | 2 +- drivers/telescope/lx200_OnStep.cpp | 15 +++++++++++---- drivers/telescope/lx200_OnStep.h | 2 ++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers.xml b/drivers.xml index ec01c13879..8d1f8bc1c6 100644 --- a/drivers.xml +++ b/drivers.xml @@ -33,7 +33,7 @@ indi_lx200_OnStep - 1.20 + 1.21 indi_lx200_OpenAstroTech diff --git a/drivers/telescope/lx200_OnStep.cpp b/drivers/telescope/lx200_OnStep.cpp index 20bb2c4478..681f099440 100644 --- a/drivers/telescope/lx200_OnStep.cpp +++ b/drivers/telescope/lx200_OnStep.cpp @@ -50,7 +50,7 @@ LX200_OnStep::LX200_OnStep() : LX200Generic(), WI(this), RotatorInterface(this) currentCatalog = LX200_STAR_C; currentSubCatalog = 0; - setVersion(1, 20); // don't forget to update libindi/drivers.xml + setVersion(1, 21); // don't forget to update libindi/drivers.xml setLX200Capability(LX200_HAS_TRACKING_FREQ | LX200_HAS_SITES | LX200_HAS_ALIGNMENT_TYPE | LX200_HAS_PULSE_GUIDING | LX200_HAS_PRECISE_TRACKING_FREQ); @@ -4616,7 +4616,7 @@ IPState LX200_OnStep::AlignStartGeometric (int stars) // Check for max number of stars and gracefully fall back to max, if more are requested. char read_buffer[RB_MAX_LEN] = {0}; int error_or_fail = getCommandSingleCharErrorOrLongResponse(PortFD, read_buffer, ":A?#"); - if(error_or_fail != 4 || read_buffer[0] < '0' || read_buffer[0] > '9' || read_buffer[1] < '0' || read_buffer[1] > '9' + if(error_or_fail != 4 || read_buffer[0] < '0' || read_buffer[0] > '9' || read_buffer[1] < '0' || read_buffer[1] > ':' || read_buffer[2] < '0' || read_buffer[2] > '9') { LOGF_INFO("Getting Alignment Status: response Error, response = %s>", read_buffer); @@ -4662,7 +4662,7 @@ bool LX200_OnStep::UpdateAlignStatus () // :A?# Align status // Returns: mno# // where m is the maximum number of alignment stars - // n is the current alignment star (0 otherwise) + // n is the current alignment star (0 otherwise) or ':' in case 9 stars selected // o is the last required alignment star when an alignment is in progress (0 otherwise) char msg[40] = {0}; @@ -4671,7 +4671,7 @@ bool LX200_OnStep::UpdateAlignStatus () char read_buffer[RB_MAX_LEN] = {0}; int error_or_fail = getCommandSingleCharErrorOrLongResponse(PortFD, read_buffer, ":A?#"); - if(error_or_fail != 4 || read_buffer[0] < '0' || read_buffer[0] > '9' || read_buffer[1] < '0' || read_buffer[1] > '9' + if(error_or_fail != 4 || read_buffer[0] < '0' || read_buffer[0] > '9' || read_buffer[1] < '0' || read_buffer[1] > ':' || read_buffer[2] < '0' || read_buffer[2] > '9') { LOGF_INFO("Getting Alignment Status: response Error, response = %s>", read_buffer); @@ -4683,7 +4683,14 @@ bool LX200_OnStep::UpdateAlignStatus () snprintf(stars, sizeof(stars), "%d", max_stars); IUSaveText(&OSNAlignT[5], stars); snprintf(stars, sizeof(stars), "%d", current_star); + if (read_buffer[1] > '9') + { + IUSaveText(&OSNAlignT[6], ":"); + } + else + { IUSaveText(&OSNAlignT[6], stars); + } snprintf(stars, sizeof(stars), "%d", align_stars); IUSaveText(&OSNAlignT[7], stars); LOGF_DEBUG("Align: max_stars: %i current star: %u, align_stars %u", max_stars, current_star, align_stars); diff --git a/drivers/telescope/lx200_OnStep.h b/drivers/telescope/lx200_OnStep.h index 846160871d..08a2981b21 100644 --- a/drivers/telescope/lx200_OnStep.h +++ b/drivers/telescope/lx200_OnStep.h @@ -25,6 +25,8 @@ =========================================== Version not yet updated/No INDI release: + Version 1.21 + - fixed Onstep returning '9:9' when 9 star alignment is achieved thanks to Howard Dutton Version 1.20 - fixed wrong messages due to different return with OnStepX - fixed Focuser Temerature not shown on Ekos