From 067813973dfdb249b8ba61c62236eeab3e3c3f39 Mon Sep 17 00:00:00 2001 From: Jarno Paananen Date: Wed, 20 Dec 2023 02:37:26 +0200 Subject: [PATCH] Workaround for apparent ASI SDK 1.31 and 1.32 bug that gives bogus default values for GPS controls on cameras that don't have GPS and fails to complete exposures if the value is written back. More discussion on the issue at https://github.com/indilib/indi-3rdparty/issues/867 --- indi-asi/asi_base.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indi-asi/asi_base.cpp b/indi-asi/asi_base.cpp index df8653534..5d548dce1 100644 --- a/indi-asi/asi_base.cpp +++ b/indi-asi/asi_base.cpp @@ -1436,6 +1436,13 @@ void ASIBase::createControls(int piNumberOfControls) ASI_BOOL isAuto = ASI_FALSE; ASIGetControlValue(mCameraInfo.CameraID, cap.ControlType, &value, &isAuto); + // Workaround for apparent ASI SDK 1.31 and 1.32 bug that gives bogus default values for GPS + // controls on cameras that don't have GPS and fails to complete exposures if the value is written back. + if (cap.ControlType == ASI_GPS_START_LINE || cap.ControlType == ASI_GPS_END_LINE) + { + value = 0; + } + if (cap.IsWritable) { LOGF_DEBUG("Adding above control as writable control number %d.", ControlNP.size());