From 9ce41f894f30b1e10c09394bfc7e6996f05ae0d9 Mon Sep 17 00:00:00 2001 From: jfmartel Date: Thu, 31 Jan 2019 13:26:23 -0500 Subject: [PATCH] =?UTF-8?q?Corrections=20reli=C3=A9es=20aux=20d=C3=A9tecti?= =?UTF-8?q?ons=20PEQ1=20&=20PEQ2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Configuration/ZT.cfg | 4 +-- sources/GuiElements/EngineeringPage.cpp | 2 +- sources/Simulator/SimulationScenario.cpp | 8 ++--- sources/ZTStateMachine.cpp | 42 ++++++++++++++++-------- sources/ZTVersion.h | 8 ++++- 5 files changed, 42 insertions(+), 22 deletions(-) diff --git a/Configuration/ZT.cfg b/Configuration/ZT.cfg index a6d4926..9410eb6 100644 --- a/Configuration/ZT.cfg +++ b/Configuration/ZT.cfg @@ -80,7 +80,7 @@ ENGLOG=3 #STATION=LONGUEIL #STATION=SAINT_MICHEL #STATION=SNOWDON_L5 -STATION=MONTMORENCY +#STATION=MONTMORENCY #STATION=MONTMORENCY_10_12 #STATION=MONTMORENCY_10_22 -#STATION=DU_COLLEGE +STATION=DU_COLLEGE diff --git a/sources/GuiElements/EngineeringPage.cpp b/sources/GuiElements/EngineeringPage.cpp index 9cd2a69..2e8fbc7 100644 --- a/sources/GuiElements/EngineeringPage.cpp +++ b/sources/GuiElements/EngineeringPage.cpp @@ -125,7 +125,7 @@ CEngineeringPage::CEngineeringPage(QGraphicsWidget *Parent) mExtLazerProbeValue->setPlainText("Sonde Lazer Ext: ?"); mAnalogSDFValue = new QGraphicsTextItem(this); - mAnalogSDFValue->setPos(400,80); + mAnalogSDFValue->setPos(600,20); mAnalogSDFValue->setPlainText("4-20mA SDF: ?"); diff --git a/sources/Simulator/SimulationScenario.cpp b/sources/Simulator/SimulationScenario.cpp index a861138..6908eb6 100644 --- a/sources/Simulator/SimulationScenario.cpp +++ b/sources/Simulator/SimulationScenario.cpp @@ -144,7 +144,7 @@ unsigned int CSimulationScenario::CreateScenario() //// MR - InsertNewStep(STEP_ACTION_REGISTER_ZT1_ITI,300); + // InsertNewStep(STEP_ACTION_REGISTER_ZT1_ITI,300); InsertNewStep(STEP_ACTION_OCCUPY_ZT1_APPROACH,300); InsertNewStep(STEP_ACTION_OCCUPY_ZT1,300); @@ -163,7 +163,7 @@ unsigned int CSimulationScenario::CreateScenario() 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 +175,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); @@ -197,7 +197,7 @@ unsigned int CSimulationScenario::CreateScenario() } - InsertNewStep(STEP_ACTION_DESTROY_ZT1_ITI,800); + // InsertNewStep(STEP_ACTION_DESTROY_ZT1_ITI,800); InsertNewStep(STEP_ACTION_FREE_ZT1,800); diff --git a/sources/ZTStateMachine.cpp b/sources/ZTStateMachine.cpp index 9aaac42..1f48c77 100644 --- a/sources/ZTStateMachine.cpp +++ b/sources/ZTStateMachine.cpp @@ -574,7 +574,18 @@ unsigned int CZTStateMachine::AnalyzeZT1PostDetection() { PostAnalyseData = true; } - else + //If the detection is de-activated, ignore it + else if((mZT1PEQType == PEQ1_FN_PREDETECTION_TYPE && mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_FN].AnalysisActive == false) || + (mZT1PEQType == PEQ1_FN_STUCK_LOW_TYPE && mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_FN].AnalysisActive == false) || + (mZT1PEQType == PEQ1_PEXT_PREDETECTION_TYPE && mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_PP].AnalysisActive == false) || + (mZT1PEQType == PEQ1_PINT_PREDETECTION_TYPE && mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_PP].AnalysisActive == false) || + (mZT1PEQType == PEQ1_LAZER_SENSOR_EXT_PREDETECTION_TYPE && mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_PG].AnalysisActive == false) || + (mZT1PEQType == PEQ1_LAZER_SENSOR_INT_PREDETECTION_TYPE && mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_PG].AnalysisActive == false) || + (mZT1PEQType == PEQ1_PG_PREDETECTION_TYPE && mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_PG].AnalysisActive == false)) + { + PostAnalyseData = true; + } + else //We need to consider PEQ1. Clear all detections and send only PEQ1... { PostAnalyseData = false; @@ -583,7 +594,10 @@ unsigned int CZTStateMachine::AnalyzeZT1PostDetection() if(mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_ZT1].AnalysisActive) { - CZTLog::instance()->AddBufferString("Panne équipement ZT1: SDF à 1",true); + if(mZT1PEQType == PEQ1_FN_STUCK_LOW_TYPE) + { + CZTLog::instance()->AddBufferString("Panne équipement ZT1: SDF à 1",true); + } CZTDetectionData *NewDetection = new CZTDetectionData(); NewDetection->mDetectionID = DETECTION_PEQ1_DETECTION; NewDetection->mTimeStamp = 0; @@ -1274,19 +1288,19 @@ unsigned int CZTStateMachine::AnalyzeZT2PostDetection() } //If we have a PEQ2, we remove all detections an leave only the PEQ2 one - if(PEQ2 == true) - { - for(int i = 0; i < mZT2DetectionsLog.size(); i++) - { - delete mZT2DetectionsLog.at(i); - } - mZT2DetectionsLog.clear(); + if(PEQ2 == true && mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_ZT2].AnalysisActive && mZTDetectionConfig->mZTDetectionConfig[DETECTION_FCT_PP2].AnalysisActive) + { + for(int i = 0; i < mZT2DetectionsLog.size(); i++) + { + delete mZT2DetectionsLog.at(i); + } + mZT2DetectionsLog.clear(); - CZTDetectionData *NewDetection = new CZTDetectionData(); - NewDetection->mDetectionID = DETECTION_PEQ2_DETECTION; - NewDetection->mTimeStamp = PEQ2Timestamp; - NewDetection->mRank = ZT_DEFAULT_DETECTION_RANK; - mZT2DetectionsLog.prepend(NewDetection); + CZTDetectionData *NewDetection = new CZTDetectionData(); + NewDetection->mDetectionID = DETECTION_PEQ2_DETECTION; + NewDetection->mTimeStamp = PEQ2Timestamp; + NewDetection->mRank = ZT_DEFAULT_DETECTION_RANK; + mZT2DetectionsLog.prepend(NewDetection); } else { diff --git a/sources/ZTVersion.h b/sources/ZTVersion.h index 2dcf749..b3a79ea 100644 --- a/sources/ZTVersion.h +++ b/sources/ZTVersion.h @@ -28,9 +28,15 @@ #ifndef ZTVERSION_H #define ZTVERSION_H -#define ZT_SOFT_VERSION "V1.17" +#define ZT_SOFT_VERSION "V1.18" //LOG DES CHANGEMENTS +//Version 1.18 +//-Correction du bug qui loggait une erreur de PEQ1 frotteur négatif collé à 1 +// systématiquement pour n'importe quelle panne. +//-Changement de l'analyse des pannes équipement pour ne pas émettre d'alarme +// lorsque la détection de panne correspond à un équipement désactivé + //Version 1.17 //-Corrections mineures à l'interface graphique //-Possibilité de générer des alarmes en itinéraire secondaire en mode entretien