fixed jungfrau image after programfpga, fixed resetfpga

This commit is contained in:
Dhanya Maliakal
2017-09-14 15:55:55 +02:00
parent 49378e6d09
commit c635b19941
7 changed files with 31 additions and 16 deletions

View File

@ -7249,6 +7249,15 @@ int slsDetector::programFPGA(string fname){
if (ret==FORCE_UPDATE)
updateDetector();
}
//remapping stop server
fnum=F_RESET_FPGA;
int stopret;
if (connectStop() == OK){
stopSocket->SendDataOnly(&fnum,sizeof(fnum));
stopSocket->ReceiveDataOnly(&stopret,sizeof(stopret));
disconnectControl();
}
}
//free resources
@ -7272,17 +7281,15 @@ int slsDetector::resetFPGA(){
std::cout<< "Sending reset to FPGA " << endl;
#endif
if (thisDetector->onlineFlag==ONLINE_FLAG) {
// control server
if (connectControl() == OK){
controlSocket->SendDataOnly(&fnum,sizeof(fnum));
//check opening error
controlSocket->ReceiveDataOnly(&ret,sizeof(ret));
if (ret==FAIL) {
controlSocket->ReceiveDataOnly(mess,sizeof(mess));
std::cout<< "Detector returned error: " << mess << std::endl;
setErrorMask((getErrorMask())|(RESET_ERROR));
}
disconnectControl();
if (ret==FORCE_UPDATE)
updateDetector();