From 0a0eb5a4e52a282169ecd75335cae25b5b5a8403 Mon Sep 17 00:00:00 2001 From: James McKenzie Date: Wed, 25 Jan 2023 09:43:59 +0000 Subject: fix formatting --- indi-lxd650/lxd650.cpp | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/indi-lxd650/lxd650.cpp b/indi-lxd650/lxd650.cpp index 746041c..8126ac9 100644 --- a/indi-lxd650/lxd650.cpp +++ b/indi-lxd650/lxd650.cpp @@ -161,23 +161,24 @@ bool LXD650::isSlewComplete() } + /************************************************************************************** ** ***************************************************************************************/ -void LXD650::show_alignment(const char *wot, double ra1,double dec1, double ra2,double dec2) +void LXD650::show_alignment (const char *wot, double ra1, double dec1, double ra2, double dec2) { -char ra1_str[32] = {0}; -char dec1_str[32] = {0}; -char ra2_str[32] = {0}; -char dec2_str[32] = {0}; - - fs_sexa(ra1_str, ra1, 2, 3600); - fs_sexa(dec1_str, dec1, 2, 3600); - fs_sexa(ra2_str, ra2, 2, 3600); - fs_sexa(dec2_str, dec2, 2, 3600); - - - LOGF_DEBUG("Mapping: %s RA %s DE %s => RA %s DE %s",wot,ra1_str,dec1_str,ra2_str,dec2_str); + char ra1_str[32] = {0}; + char dec1_str[32] = {0}; + char ra2_str[32] = {0}; + char dec2_str[32] = {0}; + + fs_sexa (ra1_str, ra1, 2, 3600); + fs_sexa (dec1_str, dec1, 2, 3600); + fs_sexa (ra2_str, ra2, 2, 3600); + fs_sexa (dec2_str, dec2, 2, 3600); + + + LOGF_DEBUG ("Mapping: %s RA %s DE %s => RA %s DE %s", wot, ra1_str, dec1_str, ra2_str, dec2_str); } @@ -216,6 +217,9 @@ bool LXD650::ReadScopeStatus() INDI::IEquatorialCoordinates MountRADE { currentRA, currentDEC }; TelescopeDirectionVector TDV = TelescopeDirectionVectorFromEquatorialCoordinates(MountRADE); +#if 0 + NewRaDec(currentRA, currentDEC); +#else double sky_RA, sky_DEC; if (!TransformTelescopeToCelestial(TDV, sky_RA, sky_DEC)) { sky_RA=currentRA; @@ -225,6 +229,8 @@ bool LXD650::ReadScopeStatus() NewRaDec(sky_RA, sky_DEC); show_alignment("Mount->Sky", currentRA, currentDEC, sky_RA, sky_DEC); +#endif + return true; } @@ -337,7 +343,7 @@ bool LXD650::Sync(double ra, double dec) return true; } #else -bool LXD650::Sync(double ra, double dec) +bool LXD650::Sync (double ra, double dec) { getBasicData(); @@ -347,23 +353,22 @@ bool LXD650::Sync(double ra, double dec) NewEntry.Declination = dec; INDI::IEquatorialCoordinates MountRADE {currentRA, currentDEC}; - NewEntry.TelescopeDirection = TelescopeDirectionVectorFromEquatorialCoordinates(MountRADE); + NewEntry.TelescopeDirection = TelescopeDirectionVectorFromEquatorialCoordinates (MountRADE); NewEntry.PrivateDataSize = 0; - DEBUGF(INDI::AlignmentSubsystem::DBG_ALIGNMENT, "New sync point Date %lf RA %lf DEC %lf TDV(x %lf y %lf z %lf)", - NewEntry.ObservationJulianDate, NewEntry.RightAscension, NewEntry.Declination, NewEntry.TelescopeDirection.x, - NewEntry.TelescopeDirection.y, NewEntry.TelescopeDirection.z); + DEBUGF (INDI::AlignmentSubsystem::DBG_ALIGNMENT, "New sync point Date %lf RA %lf DEC %lf TDV(x %lf y %lf z %lf)", + NewEntry.ObservationJulianDate, NewEntry.RightAscension, NewEntry.Declination, NewEntry.TelescopeDirection.x, + NewEntry.TelescopeDirection.y, NewEntry.TelescopeDirection.z); - if (!CheckForDuplicateSyncPoint(NewEntry)) - { - GetAlignmentDatabase().push_back(NewEntry); + if (!CheckForDuplicateSyncPoint (NewEntry)) { + GetAlignmentDatabase().push_back (NewEntry); // Tell the client about size change UpdateSize(); // Tell the math plugin to reinitialise - Initialise(this); + Initialise (this); // Force read before restarting ReadScopeStatus(); @@ -380,6 +385,7 @@ bool LXD650::Sync(double ra, double dec) return true; } + return false; } #endif -- cgit v1.2.3