mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-21 09:08:00 +02:00
added auto comp disable feature
This commit is contained in:
@ -234,7 +234,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
||||
|
||||
|
||||
|
||||
|
||||
/*! \page config Configuration commands
|
||||
Commands to configure the detector. these commands are often left to the configuration file.
|
||||
- \ref configstructure "Data Structure": commands to configure detector data structure
|
||||
@ -461,6 +460,13 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced;
|
||||
++i;
|
||||
|
||||
/*! \page config
|
||||
- <b>auto_comp_disable i </b> this mode disables the on-chip gain switching comparator automatically after 93.75% of exposure time (only for longer than 100us). 1 enables mode, 0 disables mode. By default, mode is disabled (comparator is enabled throughout). (JUNGFRAU only). \c Returns \c (int)
|
||||
*/
|
||||
descrToFuncMap[i].m_pFuncName="auto_comp_disable"; //
|
||||
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced;
|
||||
++i;
|
||||
|
||||
/*! \page config
|
||||
- <b>pulse [n] [x] [y]</b> pulses pixel at coordinates (x,y) n number of times. Used in EIGER only. Only put! \c Returns \c ("successful", "unsuccessful")
|
||||
*/
|
||||
@ -5854,7 +5860,9 @@ string slsDetectorCommand::cmdAdvanced(int narg, char *args[], int action) {
|
||||
}
|
||||
sprintf(ans,"%d",myDet->powerChip());
|
||||
return string(ans);
|
||||
} else if (cmd=="led") {
|
||||
}
|
||||
|
||||
else if (cmd=="led") {
|
||||
char ans[100];
|
||||
int val=0;
|
||||
myDet->setOnline(ONLINE_FLAG);
|
||||
@ -5868,6 +5876,19 @@ string slsDetectorCommand::cmdAdvanced(int narg, char *args[], int action) {
|
||||
sprintf(ans,"%d",~(myDet->readRegister(0x4d))&1);
|
||||
return string(ans);
|
||||
}
|
||||
|
||||
else if (cmd=="auto_comp_disable") {
|
||||
char ans[100];
|
||||
myDet->setOnline(ONLINE_FLAG);
|
||||
if (action==PUT_ACTION){
|
||||
int ival = -1;
|
||||
if (!sscanf(args[1],"%d",&ival))
|
||||
return string("could not scan auto_comp_control parameter " + string(args[1]));
|
||||
myDet->setAutoComparatorDisableMode(ival);
|
||||
}
|
||||
sprintf(ans,"%d",myDet->setAutoComparatorDisableMode());
|
||||
return string(ans);
|
||||
}
|
||||
else
|
||||
return string("unknown command ")+cmd;
|
||||
|
||||
@ -5887,6 +5908,7 @@ string slsDetectorCommand::helpAdvanced(int narg, char *args[], int action) {
|
||||
|
||||
os << "led s \t sets led status (0 off, 1 on)" << std::endl;
|
||||
os << "powerchip i \t powers on or off the chip. i = 1 for on, i = 0 for off" << std::endl;
|
||||
os << "auto_comp_disable i \t this mode disables the on-chip gain switching comparator automatically after 93.75% of exposure time (only for longer than 100us). 1 enables mode, 0 disables mode. By default, mode is disabled (comparator is enabled throughout). (JUNGFRAU only). " << std::endl;
|
||||
}
|
||||
if (action==GET_ACTION || action==HELP_ACTION) {
|
||||
|
||||
@ -5896,6 +5918,7 @@ string slsDetectorCommand::helpAdvanced(int narg, char *args[], int action) {
|
||||
os << "led \t returns led status (0 off, 1 on)" << std::endl;
|
||||
os << "flags \t gets the readout flags. can be none, storeinram, tot, continous, parallel, nonparallel, safe, unknown" << std::endl;
|
||||
os << "powerchip \t gets if the chip has been powered on or off" << std::endl;
|
||||
os << "auto_comp_disable \t gets if the automatic comparator diable mode is enabled/disabled" << std::endl;
|
||||
|
||||
}
|
||||
return os.str();
|
||||
|
Reference in New Issue
Block a user