diff --git a/ClassData.h b/ClassData.h index 2002cf1..0fdbe66 100644 --- a/ClassData.h +++ b/ClassData.h @@ -566,7 +566,7 @@ inline void Data::PrintChData(unsigned short ch, unsigned int maxRowDisplay) con inline void Data::PrintBuffer(){ if( buffer == NULL || nByte == 0 ) return; printf("============== Received nByte : %u\n", nByte); - for( int i = 0; i < nByte/4; i++ ) { + for( unsigned int i = 0; i < nByte/4; i++ ) { ReadBuffer(i, 2); printf("\n"); } diff --git a/ClassDigitizer.cpp b/ClassDigitizer.cpp index e7dede4..bae427c 100644 --- a/ClassDigitizer.cpp +++ b/ClassDigitizer.cpp @@ -439,7 +439,7 @@ int Digitizer::ProgramBoard_PSD(){ ret |= CAEN_DGTZ_SetChannelDCOffset(handle, 0xF, 0xAAAA); } - // ret |= CAEN_DGTZ_WriteRegister(handle, (uint32_t)(DPP::DPPAlgorithmControl) + 0x7000 , 0x001 ); // baseline 16 sample + ret |= CAEN_DGTZ_WriteRegister(handle, (uint32_t)(DPP::DPPAlgorithmControl) + 0x7000 , 0x00100000 ); // baseline 16 sample ret |= CAEN_DGTZ_WriteRegister(handle, (uint32_t)(DPP::PSD::TriggerThreshold) + 0x7000 , 100 );