mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-08 22:00:03 +02:00
doesnt crash at frame number 0
This commit is contained in:
parent
30b83861a4
commit
8aed690113
@ -2166,7 +2166,7 @@ int UDPStandardImplementation::startWriting(){
|
|||||||
//anything that is not a data packet of right size
|
//anything that is not a data packet of right size
|
||||||
if(numpackets[i] != onePacketSize){
|
if(numpackets[i] != onePacketSize){
|
||||||
//header packet
|
//header packet
|
||||||
if(numpackets[i] == EIGER_HEADER_LENGTH) {cprintf(BG_RED,"weird, frame packet recieved\n"); exit(-1);}
|
if(numpackets[i] == EIGER_HEADER_LENGTH) {cprintf(BG_RED,"weird, header frame packet recieved. shouldnt\n"); exit(-1);}
|
||||||
//dummy packet
|
//dummy packet
|
||||||
else if(!numpackets[i]){
|
else if(!numpackets[i]){
|
||||||
#ifdef EIGER_DEBUG3
|
#ifdef EIGER_DEBUG3
|
||||||
@ -2225,11 +2225,11 @@ int UDPStandardImplementation::startWriting(){
|
|||||||
cprintf(GREEN,"**pnum of %d: %d\n",i,(*( (uint16_t*) wbuf_footer->packetnum)));
|
cprintf(GREEN,"**pnum of %d: %d\n",i,(*( (uint16_t*) wbuf_footer->packetnum)));
|
||||||
#endif
|
#endif
|
||||||
//update frame number
|
//update frame number
|
||||||
|
if(!((uint32_t)(*( (uint64_t*) wbuf_footer)))){
|
||||||
|
cprintf(BG_RED,"**VERY WEIRD frame numbers for fifo %d: %d\n",i,(uint32_t)(*( (uint64_t*) wbuf_footer)));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
tempframenum[i] =(uint32_t)(*( (uint64_t*) wbuf_footer));
|
tempframenum[i] =(uint32_t)(*( (uint64_t*) wbuf_footer));
|
||||||
|
|
||||||
|
|
||||||
if(!tempframenum[i])
|
|
||||||
cprintf(RED,"**VERY WEIRD frame numbers for fifo %d: %d\n",i,tempframenum[i]);
|
|
||||||
tempframenum[i] += (startFrameIndex-1);
|
tempframenum[i] += (startFrameIndex-1);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user