changes on Cufluo_expose_script,filename_creator and bugfix in receiver (was crashing in

case of two gettimeofday() call returning the same value
This commit is contained in:
mozzanica
2021-03-24 14:12:34 +01:00
parent 0641de6e13
commit 9b07df6841
10 changed files with 169 additions and 78 deletions

View File

@ -9,6 +9,18 @@
# - waveform generator is on
# - amplifier board is powered and unconnected.
# connect to pc8830 (or any RH7 machine connected to the pulser and, after klog, run the command
# nc -k -n -v -l -p 5555 -e /bin/bash
KILLRCV="killall ju_udp_receiver_3threads_2_0"
$KILLRCV
sls_detector_put stop #just in case
sls_detector_put powerchip 1
@ -17,7 +29,7 @@ sls_detector_put cycles 1
sls_detector_put frames 100
sls_detector_put period 0.005
sls_detector_put exptime 0.000040
sls_detector_put vhighvoltage 0
sls_detector_put highvoltage 0
# configure for receiver on mpc2012
@ -30,49 +42,54 @@ sls_detector_put detectormac 00:ab:be:cc:dd:e2
sls_detector_put speed 1
CLI=/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay
# prepare the AGILENT 33250A
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay OUTP OFF
echo $CLI" OUTP OFF " | nc pc8830 5555
sleep 0.2
# pulse
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay FUNC PULS
echo $CLI" FUNC PULS" | nc pc8830 5555
sleep 0.2
# frequency 1kHz
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay FREQ 1000
echo $CLI" FREQ 1000" | nc pc8830 5555
sleep 0.2
# width 40 us
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay PULS:WIDT 0.000040
echo $CLI" PULS:WIDT 0.000040" | nc pc8830 5555
sleep 0.2
# amplitude 0.1 V
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay VOLT 0.1
# amplitude 0.1 V" | nc pc8830 5555
echo $CLI" VOLT 0.1" | nc pc8830 5555
sleep 0.2
# offset 0 V
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay VOLT:OFFS 0
echo $CLI" VOLT:OFFS 0" | nc pc8830 5555
sleep 0.2
# edge 50 ns
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay PULS:TRAN 0.000000050
echo $CLI" PULS:TRAN 0.000000050" | nc pc8830 5555
sleep 0.2
# triggered burst
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay BURS:MODE TRIG
echo $CLI" BURS:MODE TRIG" | nc pc8830 5555
sleep 0.2
# cycles 1
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay BURS:NCYC 1
echo $CLI" BURS:NCYC 1" | nc pc8830 5555
sleep 0.2
# external trigger source
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay TRIG:SOUR EXT
echo $CLI" TRIG:SOUR EXT" | nc pc8830 5555
sleep 0.2
# delay 1 us
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay TRIG:DEL 0.000001
echo $CLI" TRIG:DEL 0.000001" | nc pc8830 5555
sleep 0.2
# slope positive
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay TRIG:SLOP POS
echo $CLI" TRIG:SLOP POS" | nc pc8830 5555
sleep 0.2
# turn on burst mode
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay BURS:STAT ON
echo $CLI" BURS:STAT ON" | nc pc8830 5555
sleep 0.2
if [ "$1" == 'Y' ]; then
echo "started with Y argument, skipping manual checks"
else
echo "It is now safe to connect the cable between the amplifier board and the readout board"
echo "Please do so and press any key to continue, or press q to exit this script"
read -n 1 -s input
@ -80,13 +97,20 @@ if [[ $input = "q" ]]; then
echo "Exiting script"
exit 1
fi
fi
# high voltage
sls_detector_put vhighvoltage 200
sls_detector_put highvoltage 200
# output on
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay OUTP ON
echo $CLI" OUTP ON" | nc pc8830 5555
sleep 0.2
if [ "$1" == 'Y' ]; then
echo "started with Y argument, skipping manual checks"
else
echo "The current on the amplifier board should be ~0.035 A"
echo "Please check and press any key to continue, or press q to exit this script"
read -n 1 -s input
@ -94,22 +118,19 @@ if [[ $input = "q" ]]; then
echo "Exiting script"
exit 1
fi
echo "The receiver should be waiting for data"
echo "Please check and press any key to continue, or press q to exit this script"
read -n 1 -s input
if [[ $input = "q" ]]; then
echo "Exiting script"
exit 1
fi
$TKBPG0 &
# the scan
for ivpulse in {10..1000..10}
do
vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l))
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay VOLT $vpulse
echo $CLI" VOLT "$vpulse | nc pc8830 5555
sleep 1
sls_detector_put start
sleep 1
@ -118,7 +139,7 @@ done
for ivpulse in {1050..7000..50}
do
vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l))
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay VOLT $vpulse
echo $CLI" VOLT "$vpulse | nc pc8830 5555
sleep 1
sls_detector_put start
sleep 1
@ -126,9 +147,11 @@ done
# high voltage
sls_detector_put vhighvoltage 0
sls_detector_put highvoltage 0
# output off
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay OUTP OFF
echo $CLI" OUTP OFF " | nc pc8830 5555
$KILLRCV
echo "Finished scan, please wait for capacitor to discharge"
sleep 20

View File

@ -10,6 +10,13 @@
# - waveform generator is on
# - amplifier board is powered and unconnected.
# connect to pc8830 (or any RH7 machine connected to the pulser and, after klog, run the command
# nc -k -n -v -l -p 5555 -e /bin/bash
if [ "$1" == "" ] || [ $# -gt 1 ]; then
echo "Parameter 1 is empty specify G0 for normal, HG0 for HG0G1G2"
return 0
@ -21,7 +28,7 @@ sleep 3
sls_detector_put setbit 0x5d 7
sls_detector_put powerchip 1
CLI=/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay
#sls_detector_put setbit 0x5d 0
@ -36,13 +43,16 @@ sls_detector_put highvoltage 0
sls_detector_put rx_udpport 32410
sls_detector_put rx_udpip 10.1.4.105
sls_detector_put rx_udpmac 3C:FD:FE:A2:14:D8
sls_detector_put detectorip 10.1.4.9
sls_detector_put detectorip 10.1.5.9 #wrong on purpose, so we send some packets to nowhere
sls_detector_put detectormac 00:ab:be:cc:dd:e2
#sls_detector_put configuremac 0
sls_detector_put speed 1
sls_detector_put start # this puts the chip in a known state.
sls_detector_put start # this puts the chip in a known state. packets to nowhere
sls_detector_put stop
sls_detector_put detectorip 10.1.4.9 #now the right one.
sleep 3
if [ "$1" == 'HG0' ]; then
@ -79,44 +89,45 @@ sleep 1
# prepare the AGILENT 33250A
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay OUTP OFF
echo $CLI" OUTP OFF " | nc pc8830 5555
sleep 0.2
# pulse
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay FUNC PULS
echo $CLI" FUNC PULS" | nc pc8830 5555
sleep 0.2
# frequency 1kHz
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay FREQ 1000
echo $CLI" FREQ 1000" | nc pc8830 5555
sleep 0.2
# width 40 us
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay PULS:WIDT 0.000040
echo $CLI" PULS:WIDT 0.000040" | nc pc8830 5555
sleep 0.2
# amplitude 0.1 V
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay VOLT 0.1
# amplitude 0.1 V" | nc pc8830 5555
echo $CLI" VOLT 0.1" | nc pc8830 5555
sleep 0.2
# offset 0 V
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay VOLT:OFFS 0
echo $CLI" VOLT:OFFS 0" | nc pc8830 5555
sleep 0.2
# edge 50 ns
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay PULS:TRAN 0.000000050
echo $CLI" PULS:TRAN 0.000000050" | nc pc8830 5555
sleep 0.2
# triggered burst
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay BURS:MODE TRIG
echo $CLI" BURS:MODE TRIG" | nc pc8830 5555
sleep 0.2
# cycles 1
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay BURS:NCYC 1
echo $CLI" BURS:NCYC 1" | nc pc8830 5555
sleep 0.2
# external trigger source
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay TRIG:SOUR EXT
echo $CLI" TRIG:SOUR EXT" | nc pc8830 5555
sleep 0.2
# delay 1 us
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay TRIG:DEL 0.000001
echo $CLI" TRIG:DEL 0.000001" | nc pc8830 5555
sleep 0.2
# slope positive
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay TRIG:SLOP POS
echo $CLI" TRIG:SLOP POS" | nc pc8830 5555
sleep 0.2
# turn on burst mode
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay BURS:STAT ON
echo $CLI" BURS:STAT ON" | nc pc8830 5555
sleep 0.2
@ -131,7 +142,7 @@ fi
# high voltage
sls_detector_put vhighvoltage 200
# output on
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay OUTP ON
echo $CLI" OUTP ON" | nc pc8830 5555
sleep 0.2
echo "The current on the amplifier board should be ~0.035 A"
@ -160,7 +171,7 @@ for ivpulse in {10..1000..10}
do
vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l))
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay VOLT $vpulse
echo $CLI" VOLT "$vpulse | nc pc8830 5555
sleep 1
sls_detector_put start
sleep 1
@ -169,7 +180,7 @@ done
for ivpulse in {1050..7000..50}
do
vpulse=$(printf %.3f $(echo "$ivpulse/1000" | bc -l))
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay VOLT $vpulse
echo $CLI" VOLT "$vpulse | nc pc8830 5555
sleep 1
sls_detector_put start
sleep 1
@ -179,7 +190,7 @@ done
# high voltage
sls_detector_put vhighvoltage 0
# output off
/afs/psi.ch/project/sls_det_software/serial_control_software/minidelay/minidelay OUTP OFF
echo $CLI" OUTP OFF " | nc pc8830 5555
echo "Finished scan, please wait for capacitor to discharge"
sleep 20

View File

@ -6,6 +6,13 @@
# - setup_env.sh souced
# - the hostname is set
# - detector is on
# fileneame script has been sourced
KILLRCV="killall ju_udp_receiver_3threads_2_0"
$KILLRCV
sls_detector_put powerchip 1
@ -14,7 +21,7 @@ sls_detector_put powerchip 1
sls_detector_put frames 640
sls_detector_put period 0.005
sls_detector_put exptime 0.000010
sls_detector_put vhighvoltage 200
sls_detector_put highvoltage 200
# configure for receiver on mpc2012
sls_detector_put rx_udpport 32410
@ -23,16 +30,10 @@ sls_detector_put rx_udpmac 3C:FD:FE:A2:14:D8
sls_detector_put detectorip 10.1.4.9
sls_detector_put detectormac 00:ab:be:cc:dd:e2
sleep 3
$TKCSG0 &
echo "The receiver should be waiting for data"
echo "Please check and press any key to continue, or press q to exit this script"
read -n 1 -s input
if [[ $input = "q" ]]; then
echo "Exiting script"
exit 1
fi
sleep 3
echo "recording G0 pede"
sls_detector_put start
@ -167,3 +168,5 @@ sls_detector_put period 0.002
sls_detector_put frames 1000000
sls_detector_put clearbit 0x5d 16
echo "Script finished"
$KILLRCV

View File

@ -6,6 +6,8 @@
# - setup_env.sh souced
# - the hostname is set
# - detector is on
# fileneame script has been sourced
if [ "$1" == "" ] || [ $# -gt 1 ]; then
echo "Parameter 1 is empty specify G0 for normal, HG0 for HG0G1G2"
exit 0

View File

@ -36,9 +36,9 @@ $CLI HV on
$CLI shutter 1 off
echo "warmin up the board"
#sls_detector_put frames 100000
#sls_detector_put start
#sleep 210
sls_detector_put frames 40000
sls_detector_put start
sleep 81
echo "end of board warm up"

View File

@ -59,9 +59,9 @@ $CLI HV on
$CLI shutter 1 off
echo "warmin up the board"
sls_detector_put frames 10000
sls_detector_put frames 40000
sls_detector_put start
sleep 21
sleep 81
echo "end of board warm up"
##if false; then ##### temporary

View File

@ -13,11 +13,9 @@ datafolder="/mnt/pcmoench_jungfrau_calib/data/Module_"$1"_Calib/"
datestring=$(date +%F)
echo "mkdir "$datafolder
echo "./ju_udp_receiver_3threads_2_0 S "$datafolder"BP_M"$1"_"$datestring"_ 10.1.4.105"
export TKBPG0="ju_udp_receiver_3threads_2_0 S "$datafolder"BP_M"$1"_"$datestring"_ 10.1.4.105"
echo "additional lines for JF11"
echo "./ju_udp_receiver_3threads_2_0 S "$datafolder"BP_M"$1"_"$datestring"_HGOG1G2_ 10.1.4.105"
export TKBPHG0="ju_udp_receiver_3threads_2_0 S "$datafolder"BP_M"$1"_"$datestring"_HGOG1G2_ 10.1.4.105"
export TKCSHG0="ju_udp_receiver_3threads_2_0 S "$datafolder"CS_M"$1"_"$datestring"_HGOG1G2_ 10.1.4.105"
@ -25,6 +23,7 @@ export TKCSG0="ju_udp_receiver_3threads_2_0 S "$datafolder"CS_M"$1"_"$datestring
echo "exporting the fluorescence receiver commands "
export TKFG0="ju_udp_receiver_3threads_2_0 S "$datafolder"CuFluoG0_M"$1"_"$datestring"_ 10.1.4.105"
export TKFHG0="ju_udp_receiver_3threads_2_0 S "$datafolder"CuFluoHG0_M"$1"_"$datestring"_ 10.1.4.105"
@ -75,10 +74,11 @@ done
echo "----------------------------------------------------------------------"
echo "---------------------START OF ANALYSIS CLI commands --------------------"
echo "----------------------------------------------------------------------"
echo "./CuFluo_analysis "$1" G0 "$datafolder $pgofile $cgofile
echo "./CuFluo_analysis "$1" HG0 "$datafolder $phgofile $chgofile
echo "M"$1
echo "./BP_analysis "$1" "$datafolder$bpfile
echo "./CS_analysis "$1" "$datafolder $csfile
echo "./CuFluo_analysis "$1" G0 "$datafolder $pgofile $cgofile
echo "./CuFluo_analysis "$1" HG0 "$datafolder $phgofile $chgofile
echo "./JFMC_CalibWriter_wBP" "$1"
echo "----------------------------------------------------------------------"
echo "---------------------END OF ANALYSIS CLI commands --------------------"

View File

@ -1585,3 +1585,47 @@ M342
./BP_analysis 342 /mnt/pcmoench_jungfrau_calib/data/Module_342_Calib//BP_M342_2021-01-18
./CS_analysis 342 /mnt/pcmoench_jungfrau_calib/data/Module_342_Calib/ CS_M342_2021-01-18
./JFMC_CalibWriter_wBP 342
M243
./BP_analysis 243 /mnt/pcmoench_jungfrau_calib/data/Module_243_Calib/BP_M243_2021-03-22
./CS_analysis 243 /mnt/pcmoench_jungfrau_calib/data/Module_243_Calib/ CS_M243_2021-03-22
./CuFluo_analysis 243 G0 /mnt/pcmoench_jungfrau_calib/data/Module_243_Calib/ pedeG0_M243_2021-03-24 CuFluoG0_M243_2021-03-24
./CuFluo_analysis 243 HG0 /mnt/pcmoench_jungfrau_calib/data/Module_243_Calib/ pedeHG0_M243_2021-03-24 CuFluoHG0_M243_2021-03-24
./JFMC_CalibWriter_wBP 243
M339
./BP_analysis 339 /mnt/pcmoench_jungfrau_calib/data/Module_339_Calib/BP_M339_2021-03-22
./CS_analysis 339 /mnt/pcmoench_jungfrau_calib/data/Module_339_Calib/ CS_M339_2021-03-22
./CuFluo_analysis 339 G0 /mnt/pcmoench_jungfrau_calib/data/Module_339_Calib/ pedeG0_M339_2021-03-24 CuFluoG0_M339_2021-03-24
./CuFluo_analysis 339 HG0 /mnt/pcmoench_jungfrau_calib/data/Module_339_Calib/ pedeHG0_M339_2021-03-24 CuFluoHG0_M339_2021-03-24
./JFMC_CalibWriter_wBP 339
M341
./BP_analysis 341 /mnt/pcmoench_jungfrau_calib/data/Module_341_Calib/BP_M341_2021-03-22
./CS_analysis 341 /mnt/pcmoench_jungfrau_calib/data/Module_341_Calib/ CS_M341_2021-03-22
./CuFluo_analysis 341 G0 /mnt/pcmoench_jungfrau_calib/data/Module_341_Calib/ pedeG0_M341_2021-03-24 CuFluoG0_M341_2021-03-24
./CuFluo_analysis 341 HG0 /mnt/pcmoench_jungfrau_calib/data/Module_341_Calib/ pedeHG0_M341_2021-03-24 CuFluoHG0_M341_2021-03-24
./JFMC_CalibWriter_wBP 341
M368
./BP_analysis 368 /mnt/pcmoench_jungfrau_calib/data/Module_368_Calib/BP_M368_2021-03-22
./CS_analysis 368 /mnt/pcmoench_jungfrau_calib/data/Module_368_Calib/ CS_M368_2021-03-22
./CuFluo_analysis 368 G0 /mnt/pcmoench_jungfrau_calib/data/Module_368_Calib/ pedeG0_M368_2021-03-24 CuFluoG0_M368_2021-03-24
./CuFluo_analysis 368 HG0 /mnt/pcmoench_jungfrau_calib/data/Module_368_Calib/ pedeHG0_M368_2021-03-24 CuFluoHG0_M368_2021-03-24
./JFMC_CalibWriter_wBP 368
M376
./BP_analysis 376 /mnt/pcmoench_jungfrau_calib/data/Module_376_Calib/BP_M376_2021-03-23
./CS_analysis 376 /mnt/pcmoench_jungfrau_calib/data/Module_376_Calib/ CS_M376_2021-03-23
./CuFluo_analysis 376 G0 /mnt/pcmoench_jungfrau_calib/data/Module_376_Calib/ pedeG0_M376_2021-03-24 CuFluoG0_M376_2021-03-24
./CuFluo_analysis 376 HG0 /mnt/pcmoench_jungfrau_calib/data/Module_376_Calib/ pedeHG0_M376_2021-03-24 CuFluoHG0_M376_2021-03-24
./JFMC_CalibWriter_wBP 376
M379
./BP_analysis 379 /mnt/pcmoench_jungfrau_calib/data/Module_379_Calib/BP_M379_2021-03-23
./CS_analysis 379 /mnt/pcmoench_jungfrau_calib/data/Module_379_Calib/ CS_M379_2021-03-23
./CuFluo_analysis 379 G0 /mnt/pcmoench_jungfrau_calib/data/Module_379_Calib/ pedeG0_M379_2021-03-24 CuFluoG0_M379_2021-03-24
./CuFluo_analysis 379 HG0 /mnt/pcmoench_jungfrau_calib/data/Module_379_Calib/ pedeHG0_M379_2021-03-24 CuFluoHG0_M379_2021-03-24
./JFMC_CalibWriter_wBP 379

View File

@ -0,0 +1 @@
ju_udp_receiver_3threads_new_header

View File

@ -167,7 +167,7 @@ int main(int argc,char *argv[])
if ((argc>2)&&(strcmp(argv[1],"C6")==0)) { top=0;bot=0;chid=6;}
if ((argc>2)&&(strcmp(argv[1],"C7")==0)) { top=0;bot=0;chid=7;}
int kkk=0;
chidy=(int)(chid/4);
chidx=(chid%4);
ipxoffs=chidy*1024*256; //offset: zero if in the bottom part, half image otherwise
@ -326,17 +326,26 @@ int main(int argc,char *argv[])
gettimeofday(&tsss,NULL);
tdif=(1e6*(tsss.tv_sec - tss.tv_sec)+(long)(tsss.tv_usec)-(long)(tss.tv_usec));
rpratio=(totalnpacket/(float)128)/(float)(packetframenumcurr-packetframenumold);
aimageration=ncompleteframes/(float)(packetframenumcurr-packetframenumfirst);
npri=(int) ((float)(500000)/(((float)(tdif)/(float)(packetframenumcurr-packetframenumold)))/50.0 + 1) * 50;
aimageration=ncompleteframes/(float)(packetframenumcurr-packetframenumfirst+1);
// printf(" \n %ld %ld %ld %ld \n",(long)tsss.tv_sec,(long)tss.tv_sec,(long)tsss.tv_usec,(long)tss.tv_usec);
if (tdif>0) {
npri=(int) ((float)(500000)/(((float)(tdif)/(float)(packetframenumcurr-packetframenumold)))/50.0 + 1) * 50;
}
//printf("npri = %d %f \n " ,npri,(float)(tdif)/(float)(packetframenumcurr-packetframenumold) );
if ((rpratio!=1)&&(printeach!=npri-1)) {
printf(A_C_RED "Average hardware rate = %4d Hz, Average Rcv. image ratio= %1.7f Rcv. pck. ratio %1.5f , ringbuf max =%4d/%4d Fr#: %ld \n" A_C_RESET, (int)( 1e6/(tdif/(packetframenumcurr-packetframenumold))), aimageration, rpratio ,maxringsize,RINGSIZE,packetframenumcurr-packetframenumfirst);
}
else {
printf("Average hardware rate = %4d Hz, Average Rcv. image ratio= %1.7f Rcv. pck. ratio %1.5f , ringbuf max =%4d/%4d Fr#: %ld \n", (int)( 1e6/(tdif/(packetframenumcurr-packetframenumold))), aimageration, rpratio ,maxringsize,RINGSIZE,packetframenumcurr-packetframenumfirst);
// printf("%f %lu %d \n",tdif,packetframenumcurr,packetframenumold);
printf("timestamp: %lds.%ldns SC= 0x%x 0x%x", (packet.timestamp)/10000000,((packet.timestamp)%10000000)/10, (((packet.debug)>>8)&0xf), packet.headerVersion);
printf("timestamp: %4lds.%6ldns SC= 0x%x ", (packet.timestamp)/10000000,((packet.timestamp)%10000000)/10, (((packet.debug)>>8)&0xf));
// printf("SC= 0x%x ", (((packet.debug)>>8)&0xf));
@ -444,8 +453,7 @@ int main(int argc,char *argv[])
if (strcmp(request,"give\n")==0) {
// sc_tolook_for=15-(kkk%3);
// kkk++;
sc_tolook_for=13;
while (frametosend<=frametosendold){
usleep(20000); //TBC
@ -455,7 +463,7 @@ int main(int argc,char *argv[])
//if ((((ringbuffer[localpt].bunchid)>>8)&0xf)==2){ frametosend=(*putpt)-ib; break;}
// replaced with 'timeout'
if ((count_since_scfound > 100 )) { // tunable
printf("Receiver to online disp: going to look for sc15 any SC instead of SCX\n");
// printf("Receiver to online disp: going to look for sc15 any SC instead of SCX\n");
intimeout=1;
}