mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 07:20:01 +02:00
implemented the read write reg for debugging
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@106 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
3265f8b483
commit
3e8f916561
@ -502,8 +502,5 @@ typedef struct {
|
|||||||
} angleConversionConstant;
|
} angleConversionConstant;
|
||||||
|
|
||||||
|
|
||||||
enum reg{
|
|
||||||
ADC_WRITE
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1902,7 +1902,7 @@ int slsDetector::writeRegister(int addr, int val){
|
|||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout<< std::endl;
|
std::cout<< std::endl;
|
||||||
std::cout<< "Writing to register "<< addr << " data " << val << std::endl;
|
std::cout<< "Writing to register "<< hex<<addr << " data " << hex<<val << std::endl;
|
||||||
#endif
|
#endif
|
||||||
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||||
if (controlSocket) {
|
if (controlSocket) {
|
||||||
@ -1950,7 +1950,7 @@ int slsDetector::readRegister(int addr){
|
|||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout<< std::endl;
|
std::cout<< std::endl;
|
||||||
std::cout<< "Reding register "<< addr << std::endl;
|
std::cout<< "Reading register "<< hex<<addr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
if (thisDetector->onlineFlag==ONLINE_FLAG) {
|
||||||
if (controlSocket) {
|
if (controlSocket) {
|
||||||
@ -5287,6 +5287,7 @@ string slsDetector::executeLine(int narg, char *args[], int action) {
|
|||||||
float fval;
|
float fval;
|
||||||
string sval;
|
string sval;
|
||||||
int ival;
|
int ival;
|
||||||
|
int ival2; //for debugging
|
||||||
if (var=="free") {
|
if (var=="free") {
|
||||||
freeSharedMemory();
|
freeSharedMemory();
|
||||||
return("freed");
|
return("freed");
|
||||||
@ -6189,15 +6190,15 @@ string slsDetector::executeLine(int narg, char *args[], int action) {
|
|||||||
sprintf(answer,"%f",setDAC(-1,TEMPERATURE_FPGA));
|
sprintf(answer,"%f",setDAC(-1,TEMPERATURE_FPGA));
|
||||||
return string(answer);
|
return string(answer);
|
||||||
}
|
}
|
||||||
/* GOTTHARD ADC_WRITE_REG */
|
/* DEBUGGING FUNCTIONS */
|
||||||
else if (var=="adc_write") {
|
else if (var=="reg_rw") {
|
||||||
if (action==PUT_ACTION) {
|
sscanf(args[1],"%x",&ival);
|
||||||
sscanf(args[1],"%x",&ival);
|
if (action==PUT_ACTION) {
|
||||||
writeRegister(ADC_WRITE,ival);
|
sscanf(args[2],"%x",&ival2);
|
||||||
// setDAC(fval,G_ADC_WRITE);
|
sprintf(answer,"%x",writeRegister(ival,ival2));
|
||||||
}
|
}
|
||||||
sprintf(answer,"%x",readRegister(ADC_WRITE));
|
sprintf(answer,"%x",readRegister(ival));
|
||||||
return string(answer);
|
return string(answer);
|
||||||
}
|
}
|
||||||
|
|
||||||
//timers
|
//timers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user