client: update roi on updatedetector, (ctb, moench)moved nchans and databyte calculated to updatenumberofchannels and called for any update in roi, readoutflag or #samples changed (get should not update). ctb,moench server: roi fixed, . gotthard server: bug fix waiting to finish, ad9252 spi call fix. receiver: updated for moench and 10g

This commit is contained in:
2019-03-06 17:25:18 +01:00
parent 0765b330f1
commit ca817c6ae9
14 changed files with 193 additions and 100 deletions

View File

@ -2193,11 +2193,29 @@ int send_update(int file_des) {
if (n < 0) return printSocketReadError();
#endif
// #samples
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
// #samples, roi
#if defined(CHIPTESTBOARDD) || defined(MOENCHD) || defined(GOTTHARDD)
i64 = setTimer(SAMPLES,GET_FLAG);
n = sendData(file_des,&i64,sizeof(i64),INT64);
if (n < 0) return printSocketReadError();
// roi
ROI* retval = NULL;
ROI arg[1];
int ret = OK, nretval = 0;
retval = setROI(-1, arg, &nretval, &ret);
//retvalsize could be swapped during sendData
int nretval1 = nretval;
sendData(file_des, &nretval1, sizeof(nretval1), INT32);
int iloop = 0;
for(iloop = 0; iloop < nretval; ++iloop) {
sendData(file_des, &retval[iloop].xmin, sizeof(int), INT32);
sendData(file_des, &retval[iloop].xmax, sizeof(int), INT32);
sendData(file_des, &retval[iloop].ymin, sizeof(int), INT32);
sendData(file_des, &retval[iloop].ymax, sizeof(int), INT32);
}
#endif
if (lockStatus == 0) {