pulse chip fixed

This commit is contained in:
Dhanya Maliakal 2015-11-20 16:41:27 +01:00
parent c097dfc8b3
commit 8ae1e812e6
5 changed files with 6 additions and 6 deletions

View File

@ -1777,13 +1777,13 @@ int Feb_Control_PulseChip(int npulses){
cprintf(RED,"some wait error\n"); cprintf(RED,"some wait error\n");
} }
Feb_Control_SetExternalEnableMode(on,1); Feb_Control_SetExternalEnableMode(on,1);
counter_bit = ~0; counter_bit = (on?0:1);
printf("counter_bit:%d\n",counter_bit); printf("counter_bit:%d\n",counter_bit);
if(on) if(on)
printf("Pulse chip success\n"); printf("Pulse chip success\n\n");
else else
printf("Reset to normal mode success\n"); printf("Reset to normal mode success\n\n");
return 1; return 1;
} }

View File

@ -172,7 +172,7 @@ int Feb_Control_GetModuleNumber();
//functions for testing //functions for testing
/*int Feb_Control_SetTestModeVariable(int on=1);*/ /*int Feb_Control_SetTestModeVariable(int on=1);*/
int Feb_Control_SetTestModeVariable(int on); int Feb_Control_SetInTestModeVariable(int on);
int Feb_Control_GetTestModeVariable(); int Feb_Control_GetTestModeVariable();
void Feb_Control_Set_Counter_Bit(int value); void Feb_Control_Set_Counter_Bit(int value);

View File

@ -5150,7 +5150,7 @@ int multiSlsDetector::pulseChip(int n) {
int ret=-100,ret1; int ret=-100,ret1;
for (int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++) for (int idet=0; idet<thisMultiDetector->numberOfDetectors; idet++)
if (detectors[idet]){ if (detectors[idet]){
ret1=detectors[idet]->pulsePixelNMove(n); ret1=detectors[idet]->pulseChip(n);
if(detectors[idet]->getErrorMask()) if(detectors[idet]->getErrorMask())
setErrorMask(getErrorMask()|(1<<idet)); setErrorMask(getErrorMask()|(1<<idet));
if(ret==-100) if(ret==-100)

View File

@ -3778,7 +3778,7 @@ int pulse_chip(int file_des) {
sprintf(mess,"pulse chip failed\n"); sprintf(mess,"pulse chip failed\n");
n = receiveData(file_des,arg,sizeof(arg),INT32); n = receiveData(file_des,&arg,sizeof(arg),INT32);
if (n < 0) { if (n < 0) {
sprintf(mess,"Error reading from socket\n"); sprintf(mess,"Error reading from socket\n");
ret=FAIL; ret=FAIL;