Ajout détection fausse occupationd du CDV ZT1
This commit is contained in:
parent
9ce41f894f
commit
dbb8472fd0
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
||||
/sources/Modbus/ModbusTKTransport.cpp.autosave
|
||||
/sources/ZTStateMachine.cpp.autosave
|
||||
/interfaces_tmp
|
||||
/ZT.pro.user.Pj2362
|
||||
/Escape.ZT
|
||||
|
||||
Binary file not shown.
@ -148,22 +148,24 @@ unsigned int CSimulationScenario::CreateScenario()
|
||||
InsertNewStep(STEP_ACTION_OCCUPY_ZT1_APPROACH,300);
|
||||
InsertNewStep(STEP_ACTION_OCCUPY_ZT1,300);
|
||||
|
||||
for(int bogie = 1; bogie <= 12; bogie++)
|
||||
InsertNewStep(STEP_ACTION_DEACTIVATE_PGE,0);
|
||||
|
||||
for(int bogie = 1; bogie <= 18; bogie++)
|
||||
{
|
||||
// if(bogie != 5 && bogie != 7)
|
||||
InsertNewStep(STEP_ACTION_ACTIVATE_PGI,0);
|
||||
InsertNewStep(STEP_ACTION_ACTIVATE_PGE,0);
|
||||
// InsertNewStep(STEP_ACTION_ACTIVATE_PGI,0);
|
||||
// InsertNewStep(STEP_ACTION_ACTIVATE_PGE,0);
|
||||
//V00 DETECTION
|
||||
// if(bogie != 9)
|
||||
// {
|
||||
InsertNewStep(STEP_ACTION_ACTIVATE_S1,SENSOR_DELAY);
|
||||
// }
|
||||
InsertNewStep(STEP_ACTION_DEACTIVATE_S1,BOGIE_DELAY);
|
||||
InsertNewStep(STEP_ACTION_DEACTIVATE_PGI,0);
|
||||
InsertNewStep(STEP_ACTION_DEACTIVATE_PGE,0);
|
||||
// InsertNewStep(STEP_ACTION_DEACTIVATE_PGI,0);
|
||||
// InsertNewStep(STEP_ACTION_DEACTIVATE_PGE,0);
|
||||
|
||||
//FN DETECTION
|
||||
if(bogie != 5 && bogie != 8 && bogie != 3)
|
||||
// if(bogie != 5 && bogie != 8 && bogie != 3)
|
||||
InsertNewStep(STEP_ACTION_ACTIVATE_FN,0);
|
||||
|
||||
InsertNewStep(STEP_ACTION_ACTIVATE_S1,SENSOR_DELAY);
|
||||
@ -175,7 +177,7 @@ unsigned int CSimulationScenario::CreateScenario()
|
||||
// InsertNewStep(STEP_ACTION_ACTIVATE_PPI,0);
|
||||
|
||||
//FN DETECTION
|
||||
if(bogie != 5 && bogie != 8 && bogie != 3)
|
||||
// if(bogie != 5 && bogie != 8 && bogie != 3)
|
||||
InsertNewStep(STEP_ACTION_DEACTIVATE_FN,0);
|
||||
|
||||
// InsertNewStep(STEP_ACTION_ACTIVATE_S2,SENSOR_DELAY);
|
||||
@ -186,13 +188,13 @@ unsigned int CSimulationScenario::CreateScenario()
|
||||
// InsertNewStep(STEP_ACTION_DEACTIVATE_PPI,0);
|
||||
|
||||
// if(bogie != 2 && bogie != 11)
|
||||
InsertNewStep(STEP_ACTION_ACTIVATE_PGI,0);
|
||||
// InsertNewStep(STEP_ACTION_ACTIVATE_PGI,0);
|
||||
// if(bogie != 2 && bogie != 11)
|
||||
InsertNewStep(STEP_ACTION_ACTIVATE_PGE,0);
|
||||
// InsertNewStep(STEP_ACTION_ACTIVATE_PGE,0);
|
||||
InsertNewStep(STEP_ACTION_ACTIVATE_S2,SENSOR_DELAY);
|
||||
InsertNewStep(STEP_ACTION_DEACTIVATE_S2,BOGIE_DELAY);
|
||||
InsertNewStep(STEP_ACTION_DEACTIVATE_PGI,0);
|
||||
InsertNewStep(STEP_ACTION_DEACTIVATE_PGE,0);
|
||||
// InsertNewStep(STEP_ACTION_DEACTIVATE_PGI,0);
|
||||
// InsertNewStep(STEP_ACTION_DEACTIVATE_PGE,0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -594,6 +594,31 @@ unsigned int CZTStateMachine::AnalyzeZT1PostDetection()
|
||||
|
||||
if(mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_ZT1].AnalysisActive)
|
||||
{
|
||||
|
||||
if(mZT1PEQType == PEQ1_PG_PREDETECTION_TYPE)
|
||||
{
|
||||
CZTLog::instance()->AddBufferString("Panne équipement ZT1: Pré-détection Pneu de guidage",true);
|
||||
}
|
||||
if(mZT1PEQType == PEQ1_LAZER_SENSOR_INT_PREDETECTION_TYPE)
|
||||
{
|
||||
CZTLog::instance()->AddBufferString("Panne équipement ZT1: Pré-détection Sonde Lazer Intérieure",true);
|
||||
}
|
||||
if(mZT1PEQType == PEQ1_LAZER_SENSOR_EXT_PREDETECTION_TYPE)
|
||||
{
|
||||
CZTLog::instance()->AddBufferString("Panne équipement ZT1: Pré-détection Sonde Lazer Extérieure",true);
|
||||
}
|
||||
if(mZT1PEQType == PEQ1_PINT_PREDETECTION_TYPE)
|
||||
{
|
||||
CZTLog::instance()->AddBufferString("Panne équipement ZT1: Pré-détection Pneu Porteur Intérieur",true);
|
||||
}
|
||||
if(mZT1PEQType == PEQ1_PEXT_PREDETECTION_TYPE)
|
||||
{
|
||||
CZTLog::instance()->AddBufferString("Panne équipement ZT1: Pré-détection Pneu Porteur Extérieur",true);
|
||||
}
|
||||
if(mZT1PEQType == PEQ1_FN_PREDETECTION_TYPE)
|
||||
{
|
||||
CZTLog::instance()->AddBufferString("Panne équipement ZT1: Pré-détection frotteur négatif",true);
|
||||
}
|
||||
if(mZT1PEQType == PEQ1_FN_STUCK_LOW_TYPE)
|
||||
{
|
||||
CZTLog::instance()->AddBufferString("Panne équipement ZT1: SDF <collé> à 1",true);
|
||||
@ -724,16 +749,28 @@ unsigned int CZTStateMachine::AnalyzeZT1PostDetection()
|
||||
|
||||
CEngLog::instance()->AddLogString(QString().sprintf("[Post-Détection]--> Résultat des données brutes: [S1Count = %d], [S2Count = %d], [PGCount = %d], [FNCount = %d], [PPICount = %d], [PPECount = %d]",S1Count,S2Count,PGCount,FNCount,PPICount,PPECount),3);
|
||||
|
||||
//First, try to detect a véhicule travaux. If we have a PG count of 0, it is a véhicule travaux and we
|
||||
//First, try to detect a false occupation of the ZT CDV.
|
||||
//After, try to detect a véhicule travaux. If we have a PG count of 0, it is a véhicule travaux and we
|
||||
//just totally ignore this passage
|
||||
if(PGCalibrationON == false)
|
||||
{
|
||||
if(PGCount == 0)
|
||||
|
||||
if(S1Count == 0 && S2Count == 0)
|
||||
{
|
||||
CZTLog::instance()->AddLogString("[POST DETECTION]--> Fausse occupation détectée. Annulation et fin de l'analyse ZT1",true);
|
||||
ClearZT1DetectionsList();
|
||||
return RET_POST_DETECTION_FALSE_OCCUPATION;
|
||||
}
|
||||
|
||||
if(PGCount == 0 && mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_PG].AnalysisActive == true)
|
||||
{
|
||||
CZTLog::instance()->AddLogString("[POST DETECTION]--> Véhicule travaux détecté. Annulation et fin de l'analyse ZT1",true);
|
||||
ClearZT1DetectionsList();
|
||||
return RET_POST_DETECTION_WORK_VEHICLE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1879,7 +1916,8 @@ void CZTStateMachine::ClearZT1DetectionsList()
|
||||
|
||||
void CZTStateMachine::AddLogStringFromThread(QString logstring)
|
||||
{
|
||||
CZTLog::instance()->AddLogString(logstring,true);
|
||||
//CZTLog::instance()->AddLogString(logstring,true);
|
||||
CZTLog::instance()->AddBufferString(logstring,true);
|
||||
}
|
||||
|
||||
void CZTStateMachine::ModbusCCANUpdate()
|
||||
|
||||
@ -92,6 +92,7 @@ enum ePostDetectionRet
|
||||
{
|
||||
RET_POST_DETECTION_VALID,
|
||||
RET_POST_DETECTION_WORK_VEHICLE,
|
||||
RET_POST_DETECTION_FALSE_OCCUPATION,
|
||||
|
||||
RET_POST_DETECTION_MAX_RET
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user