Bi-monthly release with minor bug fixes and improvements
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Index: ../indi-asicam/asi_ccd.cpp
===================================================================
--- ../indi-asicam/asi_ccd.cpp (revision 2660)
+++ ../indi-asicam/asi_ccd.cpp (working copy)
@@ -227,6 +227,10 @@
IUFillNumber(&CoolerN[0], "CCD_COOLER_VALUE", "Cooling Power (%)", "%+06.2f", 0., 1., .2, 0.0);
IUFillNumberVector(&CoolerNP, CoolerN, 1, getDeviceName(), "CCD_COOLER_POWER", "Cooling Power", MAIN_CONTROL_TAB, IP_RO, 60, IPS_IDLE);
+ IUFillSwitch(&CoolerS[0], "CCD_COOLER_ON", "ON", ISS_OFF);
+ IUFillSwitch(&CoolerS[1], "CCD_COOLER_OFF", "OFF", ISS_ON);
+ IUFillSwitchVector(&CoolerSP, CoolerS, 2, getDeviceName(), "CCD_COOLER", "Cooler", MAIN_CONTROL_TAB, IP_RW, ISR_1OFMANY, 60, IPS_IDLE);
+
IUFillNumberVector(&ControlNP, NULL, 0, getDeviceName(), "CCD_CONTROLS", "Controls", CONTROL_TAB, IP_RW, 60, IPS_IDLE);
IUFillSwitchVector(&ControlSP, NULL, 0, getDeviceName(), "CCD_CONTROLS_MODE", "Set Auto", CONTROL_TAB, IP_RW, ISR_NOFMANY, 60, IPS_IDLE);
@@ -637,8 +641,8 @@
else
rc = activateCooler(false);
- CoolerSP.s = rc ? IPS_BUSY : IPS_ALERT;
- IDSetSwitch(&CoolerSP, NULL);
+ //CoolerSP.s = rc ? IPS_BUSY : IPS_ALERT;
+ //IDSetSwitch(&CoolerSP, NULL);
return true;
}
@@ -755,7 +759,21 @@
bool ASICCD::activateCooler(bool enable)
{
- return (ASISetControlValue(m_camInfo->CameraID, ASI_COOLER_ON, 0, enable ? ASI_TRUE : ASI_FALSE) == ASI_SUCCESS);
+ bool success;
+
+ success = (ASISetControlValue(m_camInfo->CameraID, ASI_COOLER_ON, enable ? ASI_TRUE : ASI_FALSE, ASI_FALSE) == ASI_SUCCESS);
+ if (enable) {
+ CoolerS[0].s = ISS_ON;
+ CoolerS[1].s = ISS_OFF;
+ CoolerSP.s = success ? IPS_BUSY : IPS_ALERT;
+ }
+ else {
+ CoolerS[1].s = ISS_ON;
+ CoolerS[0].s = ISS_OFF;
+ CoolerSP.s = success ? IPS_IDLE : IPS_ALERT;
+ }
+ IDSetSwitch(&CoolerSP, NULL);
+ return success;
}
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.