Compare commits
No commits in common. "master" and "pu/integrationsTS" have entirely different histories.
master
...
pu/integra
@ -114,7 +114,7 @@ void CArun::chainControl(void)
|
|||||||
case SETUP_STEP::OPEN_SERIAL_PORT:
|
case SETUP_STEP::OPEN_SERIAL_PORT:
|
||||||
qCritical() << "CArun: SETUP_STEP::OPEN_SERIAL_PORT";
|
qCritical() << "CArun: SETUP_STEP::OPEN_SERIAL_PORT";
|
||||||
this->openSerialPort();
|
this->openSerialPort();
|
||||||
this->setupStep = SETUP_STEP::TEST_OPEN_PORT;
|
this->setupStep = SETUP_STEP::CHECK_VALID_DATA;
|
||||||
this->timerChainCtrl->start();
|
this->timerChainCtrl->start();
|
||||||
break;
|
break;
|
||||||
case SETUP_STEP::TEST_OPEN_PORT:
|
case SETUP_STEP::TEST_OPEN_PORT:
|
||||||
@ -151,7 +151,7 @@ void CArun::chainControl(void)
|
|||||||
|
|
||||||
this->HWaccess->dc_autoRequest(1);
|
this->HWaccess->dc_autoRequest(1);
|
||||||
this->setupStep = SETUP_STEP::CHECK_VALID_DATA;
|
this->setupStep = SETUP_STEP::CHECK_VALID_DATA;
|
||||||
this->timerChainCtrl->start(2000);
|
this->timerChainCtrl->start();
|
||||||
break;
|
break;
|
||||||
case SETUP_STEP::CHECK_VALID_DATA:
|
case SETUP_STEP::CHECK_VALID_DATA:
|
||||||
qCritical() << "CArun: SETUP_STEP::CHECK_VALID_DATA";
|
qCritical() << "CArun: SETUP_STEP::CHECK_VALID_DATA";
|
||||||
|
@ -161,8 +161,6 @@ class T_datif : public QObject
|
|||||||
// blockNr=transmitted in WRITEADDRESS low byte
|
// blockNr=transmitted in WRITEADDRESS low byte
|
||||||
|
|
||||||
int datif_noResponseCtr;
|
int datif_noResponseCtr;
|
||||||
int datif_nowNewDyns;
|
|
||||||
int datif_nowNewStats;
|
|
||||||
|
|
||||||
T_prot *myDCIF;
|
T_prot *myDCIF;
|
||||||
QTimer *datif_trigger;
|
QTimer *datif_trigger;
|
||||||
|
@ -91,8 +91,6 @@ T_datif::T_datif(QObject *parent) : QObject(parent)
|
|||||||
epi_resetDcDataValid(1); // data are not yet valid, no response from DC by now
|
epi_resetDcDataValid(1); // data are not yet valid, no response from DC by now
|
||||||
|
|
||||||
datif_noResponseCtr=0;
|
datif_noResponseCtr=0;
|
||||||
datif_nowNewDyns=0;
|
|
||||||
datif_nowNewStats=0;
|
|
||||||
|
|
||||||
datif_repeatCtr=0;
|
datif_repeatCtr=0;
|
||||||
datif_cmdWasPerformed=0; // 0: no response by now
|
datif_cmdWasPerformed=0; // 0: no response by now
|
||||||
@ -153,24 +151,13 @@ char T_datif::datif_cycleSend()
|
|||||||
{
|
{
|
||||||
//qDebug() << "com port not available"; // wird ununterbrochen ausgegeben
|
//qDebug() << "com port not available"; // wird ununterbrochen ausgegeben
|
||||||
epi_resetDcDataValid(2); // DC data not valid
|
epi_resetDcDataValid(2); // DC data not valid
|
||||||
datif_nowNewDyns=0;
|
|
||||||
datif_nowNewStats=0;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// supervise if DC data are valid
|
// supervise if DC data are valid
|
||||||
datif_noResponseCtr++; // inc every 20ms
|
datif_noResponseCtr++; // inc every 20ms
|
||||||
if (datif_noResponseCtr>50) // no life sign from device controller (DC) for about a sec
|
if (datif_noResponseCtr>250) // no life sign from device controller (DC) for about 3s
|
||||||
{
|
|
||||||
epi_resetDcDataValid(3); // DC data has not updated for >=5s -> no longer valid!
|
epi_resetDcDataValid(3); // DC data has not updated for >=5s -> no longer valid!
|
||||||
datif_nowNewDyns=0;
|
|
||||||
datif_nowNewStats=0;
|
|
||||||
|
|
||||||
}
|
|
||||||
// 24.7.24 new, data are valid if dynamic machine conditions AND dyn machine states came in
|
|
||||||
if (datif_nowNewDyns && datif_nowNewStats && !epi_areDcDataValid() )
|
|
||||||
epi_setDcDataValid();
|
|
||||||
|
|
||||||
// Ueberwachung ob ein oder mehrere Commands am Stueck erfolgreich waren
|
// Ueberwachung ob ein oder mehrere Commands am Stueck erfolgreich waren
|
||||||
if (gpi_wantToResetSupervision())
|
if (gpi_wantToResetSupervision())
|
||||||
@ -373,9 +360,6 @@ char T_datif::datif_cycleSend()
|
|||||||
{
|
{
|
||||||
dif_scanStep=0; // always start from beginning
|
dif_scanStep=0; // always start from beginning
|
||||||
epi_resetDcDataValid(4);
|
epi_resetDcDataValid(4);
|
||||||
datif_nowNewDyns=0;
|
|
||||||
datif_nowNewStats=0;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
datif_cmdWasPerformed=0; // 0: no response by now
|
datif_cmdWasPerformed=0; // 0: no response by now
|
||||||
@ -1051,7 +1035,6 @@ char T_datif::loadRecDataFromFrame()
|
|||||||
if (RdDleng>28)
|
if (RdDleng>28)
|
||||||
{
|
{
|
||||||
gpi_storeDeviceConditions(RdDleng, receivedData);
|
gpi_storeDeviceConditions(RdDleng, receivedData);
|
||||||
datif_nowNewStats=1; // 24.7.24 new
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1060,9 +1043,9 @@ char T_datif::loadRecDataFromFrame()
|
|||||||
|
|
||||||
if (RdDleng>60)
|
if (RdDleng>60)
|
||||||
{
|
{
|
||||||
//epi_setDcDataValid(); // 24.7.24 remove here
|
epi_setDcDataValid(); // DC-Data are valid as DC responded.
|
||||||
datif_nowNewDyns=1; // 24.7.24 new
|
// Could be set to every response but this (31)
|
||||||
|
// is a very common and very important request
|
||||||
gpi_storeDynMachineConditions(RdDleng, receivedData);
|
gpi_storeDynMachineConditions(RdDleng, receivedData);
|
||||||
|
|
||||||
gpi_storeDI_CoinAttach(receivedData[6]); // new, 14.2.24 needed for direct coin insertion
|
gpi_storeDI_CoinAttach(receivedData[6]); // new, 14.2.24 needed for direct coin insertion
|
||||||
|
Loading…
Reference in New Issue
Block a user