Hello,
some time ago, I noticed that the temperature regulation for cooled QHY cameras is broken. It starts cooling, until the temperature is reached, and then stops measuring and regulating the temperature for the rest of the night.
Now I have build a patch, which does fix the issue, which works fine with my QHY8L camera. Before I submit a pull request, some more testing is needed. I think, following should be tested:
1. Does the change have any effect on non cooled why cameras?
2. Does the change have any effect on cooled, non regulated why cameras?
3. Does this issues exist on other cooled regulated QHY cameras, and if so, does the patch fix this too?
If you own a QHY camera and are willing to test, your help would be appreciated.
I can provide the compiled binary for 32 Bit ARM compiled on Astroberry 2.0 (Debian Buster...). It should run on raspberry 3 and 4 32 Bit, but I am not sure if it works on Ubuntu based distributions. But I could build one on a Raspberry Pi 3 running StellarMate if required.
For other architectures, I do not yet have a build environment, but at least amd64 and maybe i386 could be arranged.
For those who compile their INDI Library themselves here is the patch:
diff --git a/indi-qhy/qhy_ccd.cpp b/indi-qhy/qhy_ccd.cpp
index eeaef0dd..84fa1149 100644
--- a/indi-qhy/qhy_ccd.cpp
+++ b/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.05 /* Differential temperature threshold (C)*/
#define MAX_DEVICES 4 /* Max device cameraCount */
//NB Disable for real driver
@@ -1778,6 +1778,12 @@ void QHYCCD::updateTemperature()
{
SetQHYCCDParam(m_CameraHandle, CONTROL_MANULPWM, m_PWMRequest);
}
+ // Temperature Readout does not work, if we do not set "something"
+ else if (TemperatureNP.s == IPS_OK)
+ {
+ SetQHYCCDParam(m_CameraHandle, CONTROL_MANULPWM, CoolerN[0].value * 255.0 /100 );
+ }
+
ccdtemp = GetQHYCCDParam(m_CameraHandle, CONTROL_CURTEMP);
coolpower = GetQHYCCDParam(m_CameraHandle, CONTROL_CURPWM);
@@ -1803,9 +1809,21 @@ void QHYCCD::updateTemperature()
if (TemperatureNP.s == IPS_BUSY && fabs(TemperatureN[0].value - m_TemperatureRequest) <= TEMP_THRESHOLD)
{
- TemperatureN[0].value = m_TemperatureRequest;
+ TemperatureN[0].value = ccdtemp;
TemperatureNP.s = IPS_OK;
}
+ // Restart regulation if needed.
+ if (TemperatureNP.s == IPS_OK && fabs(TemperatureN[0].value - m_TemperatureRequest) > TEMP_THRESHOLD)
+ {
+ TemperatureN[0].value = ccdtemp;
+ TemperatureNP.s = IPS_BUSY;
+ }
+
+
+
+
+
+
IDSetNumber(&TemperatureNP, nullptr);
IDSetNumber(&CoolerNP, nullptr);
Regards
Dirk