- Many fixes to tas code

- fixes to amor writing and status code
- edited ecbcounter to stop at no beam
- updated documentation
- fixed a bug in project code affecting SANS
This commit is contained in:
cvs
2003-05-05 07:49:26 +00:00
parent 4ca2fcff60
commit 4ebf207325
25 changed files with 271 additions and 102 deletions

View File

@@ -1005,7 +1005,10 @@
if(middl >= Tof_edges[0]->n_bins){
middl = Tof_edges[0]->n_bins-1;
printf("WARNING: Fixed bad time bin for single detector!\n");
if(Dbg_lev1){
printf("WARNING: Fixed bad time bin for single detector!\n");
}
continue;
}
/*

View File

@@ -2218,6 +2218,7 @@ static int project_frame(int rw_skt, int pkt_size, int nx){
usint *i2;
uint *i4;
} hm_pntr;
long sum;
printf("PROJECT: Trying to retrieve time frame: %d\n", nx);
@@ -2248,10 +2249,12 @@ static int project_frame(int rw_skt, int pkt_size, int nx){
FIX: This works only OK with 4 byte HM data.
*/
hm_pntr.i4 = Hist_base_addr;
for(i = 0; i < N_hists;i++){
for(i = 0, sum = 0; i < N_hists;i++){
buffer[i] = htonl(*(hm_pntr.i4 + (i*N_bins) + nx));
sum += *(hm_pntr.i4+(i*N_bins) +nx);
}
printf("Frame %d contained %d counts \n",nx,sum);
/*
build reply and send data
*/
@@ -2320,6 +2323,12 @@ static int project_frame(int rw_skt, int pkt_size, int nx){
** The SQHM_PROJECT command is histogram mode dependent. Switch
** accordingly.
*/
/*
printf("\nProject with hm-mode : %d, subcode = %d\n", Hm_mode, sub_code);
*/
switch (Hm_mode) {
/*-----------------------------------------------------------*/
case SQHM__HM_DIG: /* SQHM__HM_DIG and SQHM__HRPT are handled the same. */
@@ -2396,7 +2405,7 @@ static int project_frame(int rw_skt, int pkt_size, int nx){
break;
/*-----------------------------------------------------------*/
case SQHM__TOF: /* Time-of-Flight Mode */
if( (sub_code & PROJECT__FRAME) == 0){
if(sub_code == PROJECT__FRAME){
return project_frame(rw_skt,pkt_size,nx);
}