panels enabled bug fix

This commit is contained in:
Ryan Tang 2023-04-04 11:46:02 -04:00
parent f6bbf0bf79
commit e56cddaf06
3 changed files with 6 additions and 3 deletions

View File

@ -561,7 +561,7 @@ void Digitizer2Gen::SaveDataToFile(){
CloseOutFile(); CloseOutFile();
outFileIndex ++; outFileIndex ++;
sprintf(outFileName, "%s_%03d.sol", outFileNameBase.c_str(), outFileIndex); sprintf(outFileName, "%s_%03d.sol", outFileNameBase.c_str(), outFileIndex);
outFile = fopen(outFileName, "a+b"); outFile = fopen(outFileName, "wb"); //overwrite binary
} }
if( evt->dataType == 0){ if( evt->dataType == 0){

View File

@ -121,7 +121,7 @@ class Digitizer2Gen {
uint64_t GetHandle() const {return handle;} uint64_t GetHandle() const {return handle;}
Event *evt; // should be evt[MaxNumber], when full or stopACQ, save into file Event *evt; // should be evt[MaxNumber], when full or stopACQ, save into file
void OpenOutFile(std::string fileName, const char * mode = "w"); void OpenOutFile(std::string fileName, const char * mode = "wb"); //overwrite binary
void CloseOutFile(); void CloseOutFile();
void SaveDataToFile(); void SaveDataToFile();
unsigned int GetFileSize() const {return outFileSize;} unsigned int GetFileSize() const {return outFileSize;}

View File

@ -199,7 +199,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent){
bnOpenScope->setEnabled(true); bnOpenScope->setEnabled(true);
chkSaveRun->setEnabled(true); chkSaveRun->setEnabled(true);
if(chkSaveRun->isChecked() ) cbAutoRun->setEnabled(true); if(chkSaveRun->isChecked() ) cbAutoRun->setEnabled(true);
if( digiSetting ) digiSetting->EnableControl(); if( digiSetting ) digiSetting->EnableControl();
}); });
@ -563,6 +562,10 @@ void MainWindow::AutoRun(){
bnStartACQ->setEnabled(true); bnStartACQ->setEnabled(true);
bnStopACQ->setEnabled(false); bnStopACQ->setEnabled(false);
bnComment->setEnabled(false); bnComment->setEnabled(false);
bnOpenScope->setEnabled(true);
chkSaveRun->setEnabled(true);
cbAutoRun->setEnabled(true);
if( digiSetting ) digiSetting->EnableControl();
}else{ }else{
LogMsg("Wait for 10 sec for next Run...."); LogMsg("Wait for 10 sec for next Run....");