small change
This commit is contained in:
parent
a209b01e3a
commit
8fa455925b
|
@ -191,6 +191,8 @@ int Digitizer::OpenDigitizer(int boardID, int portID, bool program, bool verbose
|
|||
ProgramBoard();
|
||||
}
|
||||
|
||||
if( isConnected ) FillAllSettings();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
30
test.cpp
30
test.cpp
|
@ -81,7 +81,7 @@ long get_time(){
|
|||
|
||||
int main(int argc, char* argv[]){
|
||||
|
||||
const int nBoard = 1;
|
||||
const int nBoard = 2;
|
||||
Digitizer **dig = new Digitizer *[nBoard];
|
||||
|
||||
for( int i = 0 ; i < nBoard; i++){
|
||||
|
@ -89,7 +89,7 @@ int main(int argc, char* argv[]){
|
|||
int port = i/3;
|
||||
dig[i] = new Digitizer(board, port, false, true);
|
||||
//dig[i]->CreateAndSaveSettingBinary("setting_" + to_string(dig[i]->GetSerialNumber()) + ".bin");
|
||||
dig[i]->OpenSettingBinary("setting_" + to_string(dig[i]->GetSerialNumber()) + ".bin");
|
||||
//dig[i]->OpenSettingBinary("setting_" + to_string(dig[i]->GetSerialNumber()) + ".bin");
|
||||
}
|
||||
|
||||
dig[0]->Reset();
|
||||
|
@ -106,13 +106,13 @@ int main(int argc, char* argv[]){
|
|||
//dig[0]->WriteRegister(Register::DPP::TriggerValidationMask_G, 0x600, 3);
|
||||
//dig[0]->WriteRegister(Register::DPP::Scratch, 0x12345678);
|
||||
|
||||
dig[0]->ReadRegister(Register::DPP::RecordLength_G, 0, "A0");
|
||||
dig[0]->ReadRegister(Register::DPP::RecordLength_G, 3, "A0");
|
||||
dig[0]->ReadRegister(Register::DPP::DPPAlgorithmControl, 0, "A1");
|
||||
dig[0]->ReadRegister(Register::DPP::DPPAlgorithmControl, -1, "A1");
|
||||
dig[0]->ReadRegister(Register::DPP::TriggerValidationMask_G, 1, "A3");
|
||||
dig[0]->ReadRegister(Register::DPP::TriggerValidationMask_G, 3, "A3");
|
||||
dig[0]->ReadRegister(Register::DPP::Scratch);
|
||||
//dig[0]->ReadRegister(Register::DPP::RecordLength_G, 0, "A0");
|
||||
//dig[0]->ReadRegister(Register::DPP::RecordLength_G, 3, "A0");
|
||||
//dig[0]->ReadRegister(Register::DPP::DPPAlgorithmControl, 0, "A1");
|
||||
//dig[0]->ReadRegister(Register::DPP::DPPAlgorithmControl, -1, "A1");
|
||||
//dig[0]->ReadRegister(Register::DPP::TriggerValidationMask_G, 1, "A3");
|
||||
//dig[0]->ReadRegister(Register::DPP::TriggerValidationMask_G, 3, "A3");
|
||||
//dig[0]->ReadRegister(Register::DPP::Scratch);
|
||||
|
||||
printf(" ======== %u \n", dig[0]->GetSettingFromMemory(Register::DPP::RecordLength_G, 0));
|
||||
printf(" ======== %u \n", dig[0]->GetSettingFromMemory(Register::DPP::RecordLength_G, 3));
|
||||
|
@ -122,8 +122,8 @@ int main(int argc, char* argv[]){
|
|||
//printf(" ======== %u \n", dig[0]->GetSettingFromMemory(Register::DPP::TriggerValidationMask_G, 3));
|
||||
//printf(" ======== %u \n", dig[0]->GetSettingFromMemory(Register::DPP::Scratch));
|
||||
|
||||
dig[0]->ReadSettingFromFile(Register::DPP::RecordLength_G, 0);
|
||||
dig[0]->ReadSettingFromFile(Register::DPP::RecordLength_G, 3);
|
||||
printf("////// %u \n", dig[0]->ReadSettingFromFile(Register::DPP::RecordLength_G, 0));
|
||||
printf("////// %u \n", dig[0]->ReadSettingFromFile(Register::DPP::RecordLength_G, 3));
|
||||
//dig[0]->ReadSettingFromFile(Register::DPP::DPPAlgorithmControl, 0);
|
||||
//dig[0]->ReadSettingFromFile(Register::DPP::TriggerValidationMask_G, 1);
|
||||
//dig[0]->ReadSettingFromFile(Register::DPP::TriggerValidationMask_G, 2);
|
||||
|
@ -132,6 +132,14 @@ int main(int argc, char* argv[]){
|
|||
|
||||
//dig[0]->PrintSettingFromMemory();
|
||||
|
||||
|
||||
dig[1]->LoadSettingBinary("setting_323.bin");
|
||||
|
||||
printf(" ======== %u \n", dig[1]->GetSettingFromMemory(Register::DPP::RecordLength_G, 0));
|
||||
printf(" ======== %u \n", dig[1]->GetSettingFromMemory(Register::DPP::RecordLength_G, 3));
|
||||
|
||||
printf("////// %u \n", dig[1]->ReadSettingFromFile(Register::DPP::RecordLength_G, 0));
|
||||
printf("////// %u \n", dig[1]->ReadSettingFromFile(Register::DPP::RecordLength_G, 3));
|
||||
/**
|
||||
///============================ Get Data
|
||||
TApplication * app = new TApplication("app", &argc, argv);
|
||||
|
|
Loading…
Reference in New Issue
Block a user