bug fix on saving file condition
This commit is contained in:
parent
05cf434d6e
commit
602f778aef
|
@ -943,8 +943,9 @@ unsigned int Digitizer::ReadSettingFromFile(Reg registerAddress, unsigned short
|
||||||
}
|
}
|
||||||
|
|
||||||
void Digitizer::SaveSettingToFile(Reg registerAddress, unsigned int value, unsigned short ch){
|
void Digitizer::SaveSettingToFile(Reg registerAddress, unsigned int value, unsigned short ch){
|
||||||
|
|
||||||
if ( !settingFileExist ) return ;
|
if ( !settingFileExist ) return ;
|
||||||
|
|
||||||
unsigned short index = registerAddress.Index(ch);
|
unsigned short index = registerAddress.Index(ch);
|
||||||
setting[index] = value;
|
setting[index] = value;
|
||||||
|
|
||||||
|
@ -971,6 +972,10 @@ void Digitizer::SaveAllSettingsAsBin(std::string fileName){
|
||||||
unsigned int inFileSize = ftell(binFile);
|
unsigned int inFileSize = ftell(binFile);
|
||||||
printf("Created file : %s. file size : %d Byte\n", fileName.c_str(), inFileSize);
|
printf("Created file : %s. file size : %d Byte\n", fileName.c_str(), inFileSize);
|
||||||
fclose (binFile);
|
fclose (binFile);
|
||||||
|
|
||||||
|
settingFileName = fileName;
|
||||||
|
settingFileExist = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Digitizer::SaveAllSettingsAsText(std::string fileName){
|
void Digitizer::SaveAllSettingsAsText(std::string fileName){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user