change enum::DataFormat::RAW to Raw, coz stupid apple use RAW as a global varible
This commit is contained in:
parent
b41c1d1462
commit
12f44e0f74
14
armory/Hit.h
14
armory/Hit.h
|
@ -10,11 +10,11 @@
|
||||||
|
|
||||||
enum DataFormat{
|
enum DataFormat{
|
||||||
|
|
||||||
ALL = 0,
|
ALL = 0x00,
|
||||||
OneTrace = 1,
|
OneTrace = 0x01,
|
||||||
NoTrace = 2,
|
NoTrace = 0x02,
|
||||||
Minimum = 3,
|
Minimum = 0x03,
|
||||||
RAW = 0x0A,
|
Raw = 0x0A,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ class Hit {
|
||||||
DPPType = dppType;
|
DPPType = dppType;
|
||||||
ClearMemory();
|
ClearMemory();
|
||||||
|
|
||||||
if( dataType == DataFormat::RAW){
|
if( dataType == DataFormat::Raw){
|
||||||
data = new uint8_t[20*1024*1024];
|
data = new uint8_t[20*1024*1024];
|
||||||
}else{
|
}else{
|
||||||
analog_probes[0] = new int32_t[MaxTraceLenght];
|
analog_probes[0] = new int32_t[MaxTraceLenght];
|
||||||
|
@ -241,7 +241,7 @@ class Hit {
|
||||||
case DataFormat::OneTrace : printf("============= Type : OneTrace\n"); break;
|
case DataFormat::OneTrace : printf("============= Type : OneTrace\n"); break;
|
||||||
case DataFormat::NoTrace : printf("============= Type : NoTrace\n"); break;
|
case DataFormat::NoTrace : printf("============= Type : NoTrace\n"); break;
|
||||||
case DataFormat::Minimum : printf("============= Type : Minimum\n"); break;
|
case DataFormat::Minimum : printf("============= Type : Minimum\n"); break;
|
||||||
case DataFormat::RAW : printf("============= Type : RAW\n"); return; break;
|
case DataFormat::Raw : printf("============= Type : Raw\n"); return; break;
|
||||||
default : return;
|
default : return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,8 +118,8 @@ inline int SolReader::ReadNextBlock(int isSkip){
|
||||||
return -2 ;
|
return -2 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ( blockStartIdentifier & 0xF ) == DataFormat::RAW ){
|
if( ( blockStartIdentifier & 0xF ) == DataFormat::Raw ){
|
||||||
hit->SetDataType(DataFormat::RAW, ((blockStartIdentifier >> 1) & 0xF) == 0 ? DPPType::PHA : DPPType::PSD);
|
hit->SetDataType(DataFormat::Raw, ((blockStartIdentifier >> 1) & 0xF) == 0 ? DPPType::PHA : DPPType::PSD);
|
||||||
}
|
}
|
||||||
hit->dataType = blockStartIdentifier & 0xF;
|
hit->dataType = blockStartIdentifier & 0xF;
|
||||||
hit->DPPType = ((blockStartIdentifier >> 4) & 0xF) == 0 ? DPPType::PHA : DPPType::PSD;
|
hit->DPPType = ((blockStartIdentifier >> 4) & 0xF) == 0 ? DPPType::PHA : DPPType::PSD;
|
||||||
|
@ -195,7 +195,7 @@ inline int SolReader::ReadNextBlock(int isSkip){
|
||||||
}else{
|
}else{
|
||||||
fseek(inFile, hit->DPPType == DPPType::PHA ? 9 : 11, SEEK_CUR);
|
fseek(inFile, hit->DPPType == DPPType::PHA ? 9 : 11, SEEK_CUR);
|
||||||
}
|
}
|
||||||
}else if( hit->dataType == DataFormat::RAW){
|
}else if( hit->dataType == DataFormat::Raw){
|
||||||
fread(&hit->dataSize, 8, 1, inFile);
|
fread(&hit->dataSize, 8, 1, inFile);
|
||||||
if( isSkip == 0){
|
if( isSkip == 0){
|
||||||
fread(hit->data, hit->dataSize, 1, inFile);
|
fread(hit->data, hit->dataSize, 1, inFile);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user