add binning, feature, master pulse

This commit is contained in:
Iocuser
2022-06-29 17:38:13 +02:00
parent 6818883f5b
commit a2f8d4bb2c
2 changed files with 306 additions and 21 deletions
+35 -12
View File
@@ -146,8 +146,9 @@ Hama::Hama(const char* portName, int cameraId, int maxBuffers, size_t maxMemory,
connectCamera();
/*
int err = 0;
/*
err |= getParameter(DCAM_IDPROP_SENSORMODE);
err |= getParameter(DCAM_IDPROP_READOUTSPEED);
err |= getParameter(DCAM_IDPROP_READOUT_DIRECTION);
@@ -160,7 +161,6 @@ Hama::Hama(const char* portName, int cameraId, int maxBuffers, size_t maxMemory,
err |= getParameter(DCAM_IDPROP_TRIGGERTIMES);
err |= getParameter(DCAM_IDPROP_TRIGGERDELAY);
err |= getParameter(DCAM_IDPROP_INTERNALTRIGGER_HANDLING);
*/
err |= getParameterStr(DCAM_IDSTR_VENDOR);
err |= getParameterStr(DCAM_IDSTR_MODEL);
@@ -172,6 +172,7 @@ Hama::Hama(const char* portName, int cameraId, int maxBuffers, size_t maxMemory,
err |= getParameterStr(DCAM_IDSTR_DCAMAPIVERSION);
printf("[DEBUG] Error = %d\n", err);
*/
printf("[DEBUG] === END Constructor ADHama ===\n");
}
//============================================================================
@@ -413,6 +414,8 @@ asynStatus Hama::writeInt32(asynUser *pasynUser, epicsInt32 value){
getParamName(index, &paramName);
double value_d = 0;
//getIntegerParam(index, &value);
if (index == ADAcquire) {
printf("function ADAcquire\n");
@@ -420,9 +423,6 @@ asynStatus Hama::writeInt32(asynUser *pasynUser, epicsInt32 value){
else if (index == ADImageMode) {
printf("function ADImageMode\n");
}
else if (index == ADTriggerMode) {
printf("function ADTriggerMode\n");
}
else if (index == ADNumExposures) {
printf("function ADNumExposures\n");
}
@@ -459,23 +459,46 @@ asynStatus Hama::writeInt32(asynUser *pasynUser, epicsInt32 value){
printf("function BitPerChannel\n");
}
else if (index == hTriggerSource) {
printf("function TriggerSorce\n");
double value_d = 0;
//getIntegerParam(index, &value);
printf("Hi value = %d, value_d = %f\n", value, value_d);
dcamprop_setvalue(m_hdcam, DCAM_IDPROP_TRIGGERSOURCE, value);
dcamprop_getvalue(m_hdcam, DCAM_IDPROP_TRIGGERSOURCE, &value_d);
printf("value = %d, value_d = %f\n", value, value_d);
setIntegerParam(index, value_d);
}
else if (index == hTriggerMode) {
dcamprop_setvalue(m_hdcam, DCAM_IDPROP_TRIGGER_MODE, value);
dcamprop_getvalue(m_hdcam, DCAM_IDPROP_TRIGGER_MODE, &value_d);
}
else if (index == hTriggerActive) {
dcamprop_setvalue(m_hdcam, DCAM_IDPROP_TRIGGERACTIVE, value);
dcamprop_getvalue(m_hdcam, DCAM_IDPROP_TRIGGERACTIVE, &value_d);
}
else if (index == hTriggerGlobalExposure) {
dcamprop_setvalue(m_hdcam, DCAM_IDPROP_TRIGGER_GLOBALEXPOSURE, value);
dcamprop_getvalue(m_hdcam, DCAM_IDPROP_TRIGGER_GLOBALEXPOSURE, &value_d);
}
else if (index == hTriggerPolarity) {
dcamprop_setvalue(m_hdcam, DCAM_IDPROP_TRIGGERPOLARITY, value);
dcamprop_getvalue(m_hdcam, DCAM_IDPROP_TRIGGERPOLARITY, &value_d);
}
else if (index == hTriggerConnector) {
dcamprop_setvalue(m_hdcam, DCAM_IDPROP_TRIGGER_CONNECTOR, value);
dcamprop_getvalue(m_hdcam, DCAM_IDPROP_TRIGGER_CONNECTOR, &value_d);
}
else if (index == hTriggerTimes) {
dcamprop_setvalue(m_hdcam, DCAM_IDPROP_TRIGGERTIMES, value);
dcamprop_getvalue(m_hdcam, DCAM_IDPROP_TRIGGERTIMES, &value_d);
}
else if (index == hInternalTriggerHandling) {
dcamprop_setvalue(m_hdcam, DCAM_IDPROP_INTERNALTRIGGER_HANDLING, value);
dcamprop_getvalue(m_hdcam, DCAM_IDPROP_INTERNALTRIGGER_HANDLING, &value_d);
}
else{
printf("function ELSE.... \n");
}
setIntegerParam(index, value_d);
/* Do callbacks so higher layers see any changes */
status = (asynStatus) callParamCallbacks();
status = (asynStatus) callParamCallbacks();
if (status)
asynPrint(pasynUser, ASYN_TRACE_ERROR,