mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 03:10:02 +02:00
fixed the 8 byte iodelay trimfile bug, now writes as 4 bytes
This commit is contained in:
parent
b9e2a11adf
commit
7b7d42f253
@ -32,6 +32,11 @@ typedef char mystring[MAX_STR_LENGTH];
|
|||||||
typedef double mysteps[MAX_SCAN_STEPS];
|
typedef double mysteps[MAX_SCAN_STEPS];
|
||||||
|
|
||||||
|
|
||||||
|
typedef double double32_t;
|
||||||
|
typedef float float32_t;
|
||||||
|
typedef int int32_t;
|
||||||
|
|
||||||
|
|
||||||
#ifndef DACS_FLOAT
|
#ifndef DACS_FLOAT
|
||||||
typedef int dacs_t;
|
typedef int dacs_t;
|
||||||
#else
|
#else
|
||||||
|
@ -3132,6 +3132,7 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise
|
|||||||
if(thisDetector->myDetectorType == EIGER)
|
if(thisDetector->myDetectorType == EIGER)
|
||||||
iodelay = new int;
|
iodelay = new int;
|
||||||
|
|
||||||
|
|
||||||
int ret=0;
|
int ret=0;
|
||||||
|
|
||||||
|
|
||||||
|
@ -353,7 +353,7 @@ slsDetectorDefs::sls_detector_module* energyConversion::readSettingsFile(string
|
|||||||
infile.open(myfname.c_str(),ifstream::binary);
|
infile.open(myfname.c_str(),ifstream::binary);
|
||||||
if (infile.is_open()) {
|
if (infile.is_open()) {
|
||||||
infile.read((char*) myMod->dacs,sizeof(dacs_t)*(myMod->ndac));
|
infile.read((char*) myMod->dacs,sizeof(dacs_t)*(myMod->ndac));
|
||||||
infile.read((char*) iodelay,sizeof(iodelay));
|
infile.read((char*) iodelay,sizeof(*iodelay));
|
||||||
infile.read((char*) myMod->chanregs,sizeof(int)*(myMod->nchan));
|
infile.read((char*) myMod->chanregs,sizeof(int)*(myMod->nchan));
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
for(int i=0;i<myMod->ndac;i++)
|
for(int i=0;i<myMod->ndac;i++)
|
||||||
@ -517,7 +517,7 @@ int energyConversion::writeSettingsFile(string fname, detectorType myDetectorTyp
|
|||||||
std::cout << "iodelay: " << *iodelay << std::endl;
|
std::cout << "iodelay: " << *iodelay << std::endl;
|
||||||
#endif
|
#endif
|
||||||
outfile.write((char*)mod.dacs, sizeof(dacs_t)*(mod.ndac));
|
outfile.write((char*)mod.dacs, sizeof(dacs_t)*(mod.ndac));
|
||||||
outfile.write((char*)iodelay, sizeof(iodelay));
|
outfile.write((char*)iodelay, sizeof(*iodelay));
|
||||||
outfile.write((char*)mod.chanregs, sizeof(int)*(mod.nchan));
|
outfile.write((char*)mod.chanregs, sizeof(int)*(mod.nchan));
|
||||||
|
|
||||||
outfile.close();
|
outfile.close();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user