Hello Jasem,
I created following workaround, on the raspberry where my INDI drivers are running:
diff --git a/3rdparty/indi-qhy/qhy_ccd.cpp b/3rdparty/indi-qhy/qhy_ccd.cpp
index 787da68c..51f1b9b7 100644
--- a/3rdparty/indi-qhy/qhy_ccd.cpp
+++ b/3rdparty/indi-qhy/qhy_ccd.cpp
@@ -27,7 +27,7 @@
#include <algorithm>
#include <math.h>
-#define TEMP_THRESHOLD 0.2 /* Differential temperature threshold (C)*/
+#define TEMP_THRESHOLD 0.001 /* Differential temperature threshold (C)*/
#define MAX_DEVICES 4 /* Max device cameraCount */
//NB Disable for real driver
@@ -971,8 +971,8 @@ bool QHYCCD::setupParams()
int QHYCCD::SetTemperature(double temperature)
{
// If there difference, for example, is less than 0.1 degrees, let's immediately return OK.
- if (fabs(temperature - TemperatureN[0].value) < TEMP_THRESHOLD)
- return 1;
+ // if (fabs(temperature - TemperatureN[0].value) < TEMP_THRESHOLD)
+ // return 1;
LOGF_DEBUG("Requested temperature is %.3f, current temperature is %.3f", temperature, TemperatureN[0].value);
@@ -1754,7 +1754,7 @@ void QHYCCD::updateTemperature()
// No need to spam to log
if (fabs(ccdtemp - TemperatureN[0].value) > 0.001 || fabs(CoolerN[0].value - (coolpower / 255.0 * 100)) > 0.001)
{
- LOGF_DEBUG("CCD T.: %.3f (C) Power: %.3f (%%.2f)", ccdtemp, coolpower, coolpower / 255.0 * 100);
+ LOGF_DEBUG("CCD T.: %.3f (C) Power: %.3f (%.2f)", ccdtemp, coolpower, coolpower / 255.0 * 100);
}
TemperatureN[0].value = ccdtemp;
With this, basically the temperature regulation loop never stops and the closest possible temperature is always maintained, even if outside temperature changes.
I will further test this, when clear skies are available here, first tests looked promising.
Regards
Dirk