Tags: indilib/indi
Tags
iEQ: clarify firmware labels and show N/A for absent hand controller (#… …2464) The Mount Info tab showed the four firmware fields from :FW1#/:FW2# with the raw element names (Board, Controller, RA, DEC) as labels. "Controller" is the Go2Nova hand-controller firmware, distinct from the main board, but the label sits next to the "Time Source: Controller" toggle and reads ambiguously. When no hand controller is in the serial path (e.g. connected directly to the mount's RS-232 port) the mount returns "xxxxxx" for that field, which the driver displayed verbatim and looked like a fault. - Give the firmware fields clear display labels (Main Board, Hand Controller). Element names are unchanged, so saved configs/clients are unaffected. - Show "N/A" instead of the raw "xxxxxx" placeholder when the mount does not report a hand-controller firmware. Cosmetic only; no functional change. Co-authored-by: Andreas R. <temp@ruthner.net>
CRUX TitanTCS: fix RA-stall during slew, park, unpark, goto-error rec… …overy, pier side (#2459) * CRUX TitanTCS: recover from goto-error state instead of stalling When :MS# returns an error code (e.g. target unreachable, or the mount is not yet aligned/synced), the firmware sets tracking-status bit5 (a goto-error flag) but does not physically move. The driver checked all of bits 2-5 with a single mask (& 0x3C), so it read that flag as active slewing and stayed in SCOPE_SLEWING while the mount was stationary. After a firmware safety timeout the mount then parked itself, which the user experienced as "RA stops after a few seconds". Changes: - Goto(): send #:Q# (abort) after :MS# returns a non-zero code, to clear the firmware's internal goto-error state before it can trigger the safety park. - GetMountParams(): distinguish real axis motion (bits 2-3) from the goto status flags (bits 4-5). If a goto-error flag is set without axis motion, send an abort and recover to the correct state (TRACKING or IDLE) instead of reporting SLEWING. Observed $?ts tracking-status values (from user logs): 3 = tracking (bits 0-1) 5 = RA tracking + RA slew correction 35 = tracking + goto-error flag (bit5) -- previously misread as slewing 60 = full slew (bits 2-5) Reported-by: Luc (Hobym Crux Traveler 140, StellarMate) * CRUX TitanTCS: fix unpark and park-state tracking ISNewSwitch() intercepted the ParkSP property and handled Park/UnPark itself, bypassing the INDI::Telescope base class. Consequences: - The base-class IsParked flag was never updated, so after a park Ekos still believed the mount was parked even after unparking, and blocked motion with "Please unpark the mount before issuing any motion/sync commands". - UnPark() set TrackState = SCOPE_PARKING (that state means parking-in-progress). - The #:hP? query issued immediately after :hP0# often still returned parked, because the mount had not processed the unpark yet. Fix: - Remove the custom ParkSP handler; let the base class handle the Park/Unpark switch and call the driver's Park()/UnPark(). - UnPark() sets SCOPE_IDLE and calls SetParked(false); polling promotes it to TRACKING once the mount reports tracking. - Sync IsParked in GetMountParams() from the mount's reported parking status so the flag always reflects the real state. Reported-by: Antoine (tester) — unpark did nothing from the INDI control panel. * CRUX TitanTCS: use lightweight polling during slew to prevent RA motor stall The driver polled status once per second with a 67-byte composite \GE command that bundles many queries into one round-trip. During a slew the TitanTCS firmware (single-threaded command processor) cannot parse that compound query and maintain RA/DEC step generation at the same time, so the RA motor loses steps and stalls partway through the slew while the driver still believes it is moving. Users saw "RA stops after a few seconds". Diagnosed by comparing INDI and NINA/ASCOM serial logs on the same mount: the ASCOM driver polls with individual short commands (:GR#, :GD#) at 2 s intervals and never stalls. Fix: during SCOPE_SLEWING / SCOPE_PARKING, poll with the two short standard LX200 queries (:GR#, :GD#) only. Slew completion is detected when the position stops changing (two consecutive stable samples), after which one full composite poll re-establishes the complete status. The composite \GE query is still used while tracking/idle, where it is safe. RA wraparound and the DEC=0 edge case are handled. * CRUX TitanTCS: park using native firmware commands, add park mode + park position Implement proper parking. The park commands were decoded from the TitanTCS ASCOM driver's own serial trace: :hP0# unpark :hP1# park -> move to the saved park point, then park :hP8# park in place (lock wherever pointing) :hS# save the current position as the park point Changes: - Add a "Park" mode selector (Options tab, mirrors the ASCOM app): "At saved position" (default) -> :hP1# (firmware moves to the saved point) "At current position" -> :hP8# (lock in place) - SetCurrentPark() sends :hS# so the mount stores its own park point (the controller beeps "Park point saved"), matching the ASCOM behaviour. - SetDefaultPark()/SetParkPosition() and InitPark() on connect fill the INDI park-position fields (kept for display; the firmware owns the real park point). - Remove the custom ParkSP handler that bypassed the base class. Rationale: the mount homes at the celestial pole, where sky coordinates are degenerate (reported RA is meaningless within arcseconds of the pole), so a coordinate-based park cannot reliably reach the correct mechanical home / pier side. The firmware stores the true mechanical position, so delegating to :hP1# / :hS# is reliable where a coordinate slew is not. Tested on a Hobym Crux Traveler 140 (StellarMate): save park point, park to saved point, park in place, and unpark all behave identically to the ASCOM app. * CRUX TitanTCS: report pier side for meridian-flip automation Enable TELESCOPE_HAS_PIER_SIDE and report the pier side each status poll so Ekos can perform automated meridian flips. This mount's LX200 subset has no pier-side query (the ASCOM driver derives it from a separate encoder protocol, #:\IA#, that this driver does not use), so we report the INDI-convention expected side computed from the hour angle via the base-class helper: HA <= 0 -> PIER_WEST, HA > 0 -> PIER_EAST. This is the standard approach for LX200 GEM drivers without a hardware pier query, and it is the convention Ekos itself uses, so meridian-flip timing is consistent. Note the INDI label reads opposite to the ASCOM app's SideOfPier for the same position (e.g. object east of the meridian: INDI PIER_WEST vs ASCOM pierEast) — a known INDI/ASCOM naming difference, not an error. Report-only (CanSetPierSide equivalent is false for this mount); Ekos uses it to decide WHEN to flip, and commands the flip via a normal goto. Can be verified in daytime by slewing to points east and west of the meridian and confirming the reported side changes across the meridian. --------- Co-authored-by: Andreas R. <temp@ruthner.net>
lx200_10micron: add shutdown command, guard behind parked state (#2415) Adds a Shutdown button on the Main Control tab that sends :shutdown# to power off the 10micron mount. The button is blocked (IPS_ALERT + warning) unless the mount is fully parked, preventing accidental power-off during active use. Property implemented with INDI::PropertySwitch using the modern .fill()/.reset()/.setState()/.apply()/.isNameMatch() API.
alignment: add plugin test suite with Halton sky sampling (#2352) * alignment: extend plugin interfaces for testability Add JulianOffset to TransformTelescopeToCelestial in MathPlugin and all concrete implementations (Basic, Dummy, Nearest, SVD, BuiltIn) so tests can inject a fixed observation time instead of relying on the system clock. MathPluginManagement propagates the parameter through to the loaded plugin. Add SetDatabaseReferencePosition(IGeographicCoordinates) overload to InMemoryDatabase so callers can pass a structured position directly. Guard the plugin-hook extern "C" functions in SVD, Nearest, and BuiltIn with NO_PLUGIN_HOOKS so the same translation units can be compiled into test binaries without symbol collisions. Fix BuiltIn singular-matrix handling: the MatrixMatrixMultiply and inverse steps were gated on a non-null check that prevented them from running after the identity fallback on the non-singular path. Remove the outer else and let both steps always run. Add indicore to AlignmentDriver's public include path and install HaltonSequence.h alongside the other public alignment headers. * alignment/simulator: fix AltAz azimuth convention and GEM meridian flip Fix two coordinate handling bugs in scopesim_helper revealed by the new test suite: AltAz: scopesim's azimuth convention places 0° at South (increasing clockwise West→North→East), while INDI's IHorizontalCoordinates places 0° at North. Apply +180° offset in apparentHaDecToMount so the simulated AltAz encoder matches what drivers expect. Also add an early return to prevent fallthrough into the equatorial code path. EQ_GEM: mountToApparentHaDec was assigning prio = primary only inside the flipped-pier else branch, leaving prio uninitialised on the normal (no-flip) path. Move the assignment before the flip check so it is always set. * alignment: add plugin test suite with Halton sky sampling Add a comprehensive test suite for the alignment math plugins (SVD, BuiltIn, Nearest) covering equatorial GEM, equatorial fork, AltAz, and meridian flip configurations across multiple geographic sites. Tests inject known mount errors (IH, ID, CH, NP, MA, ME) via scopesim_helper, align a subset of sky points, then validate round-trip accuracy on held-out points using a fixed RMS arcsecond target. Dual Halton sequences (bases 2/3 for alignment, 5/7 for validation) give uniform sky coverage without overlap. The QualityCheck test verifies Nearest meets a 100" RMS threshold. Add HaltonSequence.h (generic 2D quasi-random generator) and HOURS_TO_RAD / RAD_TO_HOURS macros to indicom.h. Wire up the test binary in CMakeLists. * alignment/simulator: fix AltAz mountToApparentHaDec azimuth convention After instrumentToObserved(), apparentHa holds corrected Azimuth in INDI convention (North=0). The subsequent rotateY() back to HA/Dec must use the corrected value, not the raw instrument axis prio. Convert from INDI North=0 to scopesim South=0 before forming the Vector. Without this fix, the pointing-model correction applied by instrumentToObserved was discarded before the AltAz→HA/Dec rotation, so AltAz mount errors were not reflected in the apparent HA/Dec output of the simulator. * alignment/simulator: apply observedToInstrument in AltAz apparentHaDecToMount The AltAz path was computing the apparent Az/Alt from the HA/Dec vector rotation but returning it directly as the mount position, bypassing observedToInstrument(). This meant pointing-model error terms (IH, ID, CH, MA, ME) were never applied to AltAz encoder positions in the simulator. Apply observedToInstrument() on the apparent Az/Alt before writing primary and secondary, consistent with the equatorial path. * alignment: add Arctic/Antarctic SVD tests, drop redundant buildEntry site param - Remove unused INDI::IGeographicCoordinates site parameter from buildEntry; the generator already encodes site coordinates set in buildGenerator - Add SVD_AlignValidate_Arctic (lat 78.2) and SVD_AlignValidate_Antarctic (lat -77.8) to cover high-latitude mount geometry - Remove unused kLondon constant Fixes -Werror=unused-parameter in CI.
PreviousNext