From 8ce3b4f2745c38e49e067c16701e2d3a3d76850d Mon Sep 17 00:00:00 2001 From: "Ryan@Home" Date: Wed, 23 Oct 2024 00:19:23 -0400 Subject: [PATCH] fix bugs on BinReader.h --- BinReader.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/BinReader.h b/BinReader.h index 57ea352..6c8f72d 100644 --- a/BinReader.h +++ b/BinReader.h @@ -45,9 +45,9 @@ struct Data{ printf("header : 0x%X \n", Header); printf(" Board : %u , Channel : %u\n", BoardID, Channel); if( Header & 4 ) { - printf("Energy : %5u, Energy2 : %5u, TimeStamp : %16llu ps\n", Energy, Energy_short, TimeStamp); + printf("Energy : %5u, Energy2 : %5u, TimeStamp : %16lu ps\n", Energy, Energy_short, TimeStamp); }else{ - printf("Energy : %5u, TimeStamp : %16llu ps\n", Energy, TimeStamp); + printf("Energy : %5u, TimeStamp : %16lu ps\n", Energy, TimeStamp); } printf(" Flag : 0x%08X\n", Flags); if( (Header & 0x8 ) >= 1 ){ /// is waevform exist @@ -282,14 +282,14 @@ int BinReader::ReadBlock(int skipTrace){ FillData(&data.TimeStamp); if( timeOffset != 0 ) data.TimeStamp += timeOffset; - if( (data.Header & 0x3) != 0 ) FillData(&data.Energy); + if( (data.Header & 0x3) ) FillData(&data.Energy); - if( (data.Header & 0x2) == 1 ) { + if( (data.Header & 0x2) ) { uint64_t dummy = 0; FillData(&dummy); } - if( (data.Header & 0x4 ) != 0 ) FillData(&data.Energy_short); + if( (data.Header & 0x4 ) ) FillData(&data.Energy_short); FillData(&data.Flags); @@ -299,7 +299,7 @@ int BinReader::ReadBlock(int skipTrace){ } /// check is wave form exist - if( (data.Header & 0x8) == 1){ + if( (data.Header & 0x8) ){ FillData(&data.WaveformCode); FillData(&data.NSample); if( skipTrace == 0 ){