Bi-monthly release with minor bug fixes and improvements
@@ -1041,22 +1042,25 @@ void Sv305CCD::TimerHit()
// helper : update camera control depending on control type
bool Sv305CCD::updateControl(int ControlType, SVB_CONTROL_TYPE SVB_Control, double values[], char *names[], int n)
{
- IUUpdateNumber(&ControlsNP[ControlType], values, names, n);
+ IUUpdateNumber(&ControlsNP[ControlType], values, names, n);
+ LOGF_INFO("Camera control %d to %.f\n", ControlType, ControlsN[ControlType].value);
+ ControlsNP[ControlType].s = IPS_OK;
+ IDSetNumber(&ControlsNP[ControlType], nullptr);
pthread_mutex_unlock(&cameraID_mutex);
// set control
status = SVBSetControlValue(cameraID, SVB_Control , ControlsN[ControlType].value, SVB_FALSE);
if(status != SVB_SUCCESS)
{
- LOGF_ERROR("Error, camera set control %d failed\n", ControlType);
+ LOGF_ERROR("Error, camera set control %d failed: sdk-id=%d, value=%d\n", ControlType, SVB_Control, ControlsN[ControlType].value);
+ ControlsNP[ControlType].s = IPS_ALERT;
+ IDSetNumber(&ControlsNP[ControlType], nullptr);
+ return false;
}
- LOGF_INFO("Camera control %d to %.f\n", ControlType, ControlsN[ControlType].value);
: