summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames McKenzie <root@ka-ata-killa.panaceas.james.local>2023-01-25 09:43:59 +0000
committerJames McKenzie <root@ka-ata-killa.panaceas.james.local>2023-01-25 09:43:59 +0000
commit0a0eb5a4e52a282169ecd75335cae25b5b5a8403 (patch)
tree3d272a566e5f88b38b2d034fa913b3a90e94f9ef
parent407829214b67b860bba048e3a4d1703be391cc98 (diff)
downloadindi_mount_driver-0a0eb5a4e52a282169ecd75335cae25b5b5a8403.tar.gz
indi_mount_driver-0a0eb5a4e52a282169ecd75335cae25b5b5a8403.tar.bz2
indi_mount_driver-0a0eb5a4e52a282169ecd75335cae25b5b5a8403.zip
fix formatting
-rw-r--r--indi-lxd650/lxd650.cpp50
1 files 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