From bc9765cd9955df11cee0e7b4f8f011a34b357194 Mon Sep 17 00:00:00 2001 From: jfmartel Date: Mon, 9 Sep 2024 10:54:50 -0400 Subject: [PATCH] //Version 1.32 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit //-Ajout des flags d'etat des fonctions de détection dans le fichier log +//-Retrait de la possibilité d'inhiber l'analyse des fonctions +//-Changement de l'heure de reset des données Historien à 3h plutôt qu'à minuit. //Version 1.32 //-Ajout des flags d'etat des fonctions de détection dans le fichier log +//-Retrait de la possibilité d'inhiber l'analyse des fonctions +//-Changement de l'heure de reset des données Historien à 3h plutôt qu'à minuit. --- Configuration/ZTSettings.ztc | Bin 41 -> 41 bytes sources/GuiElements/FunctionSelectionPage.cpp | 8 ++++++++ sources/Modbus/PIHistorianManager.cpp | 3 ++- sources/ZTSettings.cpp | 8 ++++++++ sources/ZTVersion.h | 2 ++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Configuration/ZTSettings.ztc b/Configuration/ZTSettings.ztc index e0a5878a65430f90484f86a5c07310628d5fbf87..d7191e9c232797e572a1119ffeafe29553d8f0fc 100644 GIT binary patch literal 41 fcmdnB_B10hU;u$yAWi{dMn;AMDsIp2CM)8 diff --git a/sources/GuiElements/FunctionSelectionPage.cpp b/sources/GuiElements/FunctionSelectionPage.cpp index d1a0391..2689a33 100644 --- a/sources/GuiElements/FunctionSelectionPage.cpp +++ b/sources/GuiElements/FunctionSelectionPage.cpp @@ -78,6 +78,8 @@ CFunctionSelectionPage::CFunctionSelectionPage(QGraphicsWidget *Parent) QGraphicsTextItem *Label = new QGraphicsTextItem("Analyse",this); Label->setFont(font); Label->setPos(ArrayTopLeft.x() - 10,ArrayTopLeft.y() - YLineSpacing); + Label->hide(); //JFM 2024-09-05 Enlèvement de l'inhibition d'analyse... + Label = new QGraphicsTextItem("TK",this); Label->setFont(font); @@ -90,6 +92,7 @@ CFunctionSelectionPage::CFunctionSelectionPage(QGraphicsWidget *Parent) mFNFuncToggleBtn = new CToggleButtonWidget(ONPixmapFilePath,OFFPixmapFilePath,this); mFNFuncToggleBtn->resize(SlideButtonSize); mFNFuncToggleBtn->setPos(ArrayTopLeft.x(),ArrayTopLeft.y() + (i*YLineSpacing)); + mFNFuncToggleBtn->hide();//JFM 2024-09-05 Enlèvement de l'inhibition d'analyse... mFNTKToggleBtn = new CToggleButtonWidget(ONPixmapFilePath,OFFPixmapFilePath,this); mFNTKToggleBtn->resize(SlideButtonSize); mFNTKToggleBtn->setPos(ArrayTopLeft.x() + XButtonSpacing,ArrayTopLeft.y() + (i*YLineSpacing)); @@ -101,6 +104,7 @@ CFunctionSelectionPage::CFunctionSelectionPage(QGraphicsWidget *Parent) mPGFuncToggleBtn = new CToggleButtonWidget(ONPixmapFilePath,OFFPixmapFilePath,this); mPGFuncToggleBtn->resize(SlideButtonSize); mPGFuncToggleBtn->setPos(ArrayTopLeft.x(),ArrayTopLeft.y() + (i*YLineSpacing)); + mPGFuncToggleBtn->hide();//JFM 2024-09-05 Enlèvement de l'inhibition d'analyse... mPGTKToggleBtn = new CToggleButtonWidget(ONPixmapFilePath,OFFPixmapFilePath,this); mPGTKToggleBtn->resize(SlideButtonSize); mPGTKToggleBtn->setPos(ArrayTopLeft.x() + XButtonSpacing,ArrayTopLeft.y() + (i*YLineSpacing)); @@ -112,6 +116,7 @@ CFunctionSelectionPage::CFunctionSelectionPage(QGraphicsWidget *Parent) mPPFuncToggleBtn = new CToggleButtonWidget(ONPixmapFilePath,OFFPixmapFilePath,this); mPPFuncToggleBtn->resize(SlideButtonSize); mPPFuncToggleBtn->setPos(ArrayTopLeft.x(),ArrayTopLeft.y() + (i*YLineSpacing)); + mPPFuncToggleBtn->hide();//JFM 2024-09-05 Enlèvement de l'inhibition d'analyse... mPPTKToggleBtn = new CToggleButtonWidget(ONPixmapFilePath,OFFPixmapFilePath,this); mPPTKToggleBtn->resize(SlideButtonSize); mPPTKToggleBtn->setPos(ArrayTopLeft.x() + XButtonSpacing,ArrayTopLeft.y() + (i*YLineSpacing)); @@ -123,6 +128,7 @@ CFunctionSelectionPage::CFunctionSelectionPage(QGraphicsWidget *Parent) mPP2FuncToggleBtn = new CToggleButtonWidget(ONPixmapFilePath,OFFPixmapFilePath,this); mPP2FuncToggleBtn->resize(SlideButtonSize); mPP2FuncToggleBtn->setPos(ArrayTopLeft.x(),ArrayTopLeft.y() + (i*YLineSpacing)); + mPP2FuncToggleBtn->hide();//JFM 2024-09-05 Enlèvement de l'inhibition d'analyse... mPP2TKToggleBtn = new CToggleButtonWidget(ONPixmapFilePath,OFFPixmapFilePath,this); mPP2TKToggleBtn->resize(SlideButtonSize); mPP2TKToggleBtn->setPos(ArrayTopLeft.x() + XButtonSpacing,ArrayTopLeft.y() + (i*YLineSpacing)); @@ -134,6 +140,7 @@ CFunctionSelectionPage::CFunctionSelectionPage(QGraphicsWidget *Parent) mZT1FuncToggleBtn = new CToggleButtonWidget(ONPixmapFilePath,OFFPixmapFilePath,this); mZT1FuncToggleBtn->resize(SlideButtonSize); mZT1FuncToggleBtn->setPos(ArrayTopLeft.x(),ArrayTopLeft.y() + (i*YLineSpacing)); + mZT1FuncToggleBtn->hide();//JFM 2024-09-05 Enlèvement de l'inhibition d'analyse... connect(mZT1FuncToggleBtn,SIGNAL(ButtonToggled(CToggleButtonWidget*)),this,SLOT(ToggleButtonToggled(CToggleButtonWidget*))); mZT1TKToggleBtn = new CToggleButtonWidget(ONPixmapFilePath,OFFPixmapFilePath,this); mZT1TKToggleBtn->resize(SlideButtonSize); @@ -147,6 +154,7 @@ CFunctionSelectionPage::CFunctionSelectionPage(QGraphicsWidget *Parent) mZT2FuncToggleBtn = new CToggleButtonWidget(ONPixmapFilePath,OFFPixmapFilePath,this); mZT2FuncToggleBtn->resize(SlideButtonSize); mZT2FuncToggleBtn->setPos(ArrayTopLeft.x(),ArrayTopLeft.y() + (i*YLineSpacing)); + mZT2FuncToggleBtn->hide();//JFM 2024-09-05 Enlèvement de l'inhibition d'analyse... connect(mZT2FuncToggleBtn,SIGNAL(ButtonToggled(CToggleButtonWidget*)),this,SLOT(ToggleButtonToggled(CToggleButtonWidget*))); mZT2TKToggleBtn = new CToggleButtonWidget(ONPixmapFilePath,OFFPixmapFilePath,this); mZT2TKToggleBtn->resize(SlideButtonSize); diff --git a/sources/Modbus/PIHistorianManager.cpp b/sources/Modbus/PIHistorianManager.cpp index a45255a..f28a1c0 100644 --- a/sources/Modbus/PIHistorianManager.cpp +++ b/sources/Modbus/PIHistorianManager.cpp @@ -584,7 +584,8 @@ void CPIHistorianManager::StartHistorianTimer() void CPIHistorianManager::HistorianTimerExpired() { // qDebug(qPrintable(QString("Vérification du changement de date: Today:%1, Current:%2").arg(mTodaysDate.toString("yyyy-MM-dd")).arg(QDate::currentDate().toString("yyyy-MM-dd")))); - if(mTodaysDate != QDate::currentDate()) + if(mTodaysDate != QDate::currentDate() && + QTime::currentTime() >= QTime(3,0,0,0)) { mNbFNToday = 0; mNbPGToday = 0; diff --git a/sources/ZTSettings.cpp b/sources/ZTSettings.cpp index f913577..a28207c 100644 --- a/sources/ZTSettings.cpp +++ b/sources/ZTSettings.cpp @@ -85,6 +85,14 @@ unsigned int CZTSettingsFileMgr::LoadSettings(CZTSettingsData *SettingsData) *InputStream >> SettingsData->mModbusCCHostAddress; *InputStream >> SettingsData->mSEIModbusHostAddress; + //JFM 2024-09-05 Enlèvement de l'inhibition d'analyse... + SettingsData->mDetectionFunctionSettings->mZTDetectionConfig[DETECTION_FCT_FN].AnalysisActive = true; + SettingsData->mDetectionFunctionSettings->mZTDetectionConfig[DETECTION_FCT_PG].AnalysisActive = true; + SettingsData->mDetectionFunctionSettings->mZTDetectionConfig[DETECTION_FCT_PP].AnalysisActive = true; + SettingsData->mDetectionFunctionSettings->mZTDetectionConfig[DETECTION_FCT_PP2].AnalysisActive = true; + SettingsData->mDetectionFunctionSettings->mZTDetectionConfig[DETECTION_FCT_ZT1].AnalysisActive = true; + SettingsData->mDetectionFunctionSettings->mZTDetectionConfig[DETECTION_FCT_ZT2].AnalysisActive = true; + SettingsFile->close(); diff --git a/sources/ZTVersion.h b/sources/ZTVersion.h index fbaadc4..5f206b8 100755 --- a/sources/ZTVersion.h +++ b/sources/ZTVersion.h @@ -34,6 +34,8 @@ //LOG DES CHANGEMENTS //Version 1.32 //-Ajout des flags d'etat des fonctions de détection dans le fichier log +//-Retrait de la possibilité d'inhiber l'analyse des fonctions +//-Changement de l'heure de reset des données Historien à 3h plutôt qu'à minuit. //Version 1.31 //-Finalement finalement pour vrai réglé le problème de reset des stats aujourd'hui.