If the update-trigger (aka WAIT-button) is empty and we have an automatic
update (i.e. time is 0:00 - 4:00 am), then do not inform ISMAS with an U0003 error signal, but send an U0002 (setting the trigger-value to "OK").
This commit is contained in:
parent
a57fa6c31e
commit
175b8fd3a1
@ -518,6 +518,8 @@ bool Worker::updateTriggerSet() {
|
|||||||
|
|
||||||
GUI() << (CONSOLE() << UPDATE_STEP::CHECK_ISMAS_TRIGGER);
|
GUI() << (CONSOLE() << UPDATE_STEP::CHECK_ISMAS_TRIGGER);
|
||||||
|
|
||||||
|
bool const automaticUpdate = (QDateTime::currentDateTime().time().hour() < 4);
|
||||||
|
|
||||||
QString triggerValue("NOT CHECKED YET");
|
QString triggerValue("NOT CHECKED YET");
|
||||||
static constexpr int const repeats = 15;
|
static constexpr int const repeats = 15;
|
||||||
for (int repeat = 1; repeat <= repeats; ++repeat) {
|
for (int repeat = 1; repeat <= repeats; ++repeat) {
|
||||||
@ -639,9 +641,17 @@ bool Worker::updateTriggerSet() {
|
|||||||
ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::CHECK_ISMAS_TRIGGER_WRONG_VALUE)));
|
ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::CHECK_ISMAS_TRIGGER_WRONG_VALUE)));
|
||||||
// if the customer repository has just been cloned
|
// if the customer repository has just been cloned
|
||||||
return false; // it is OK the ISMAS trigger might not be 'WAIT'
|
return false; // it is OK the ISMAS trigger might not be 'WAIT'
|
||||||
} else {
|
|
||||||
CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::CHECK_ISMAS_TRIGGER_FAILURE);
|
|
||||||
}
|
}
|
||||||
|
// not a clone and empty update-trigger
|
||||||
|
if (automaticUpdate) {
|
||||||
|
// do not inform ISMAS in case of automatic update, because the
|
||||||
|
// update is not necessary as the trigger-button is not set to WAIT.
|
||||||
|
GUI(lst) << (CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::CHECK_ISMAS_TRIGGER_WRONG_VALUE));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::CHECK_ISMAS_TRIGGER_FAILURE);
|
||||||
|
|
||||||
QThread::sleep(6);
|
QThread::sleep(6);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
@ -649,11 +659,21 @@ bool Worker::updateTriggerSet() {
|
|||||||
if (m_clone) {
|
if (m_clone) {
|
||||||
m_ismasTriggerStatusMessage = QStringList(QString("TRIGGER-VALUE='%1' != 'WAIT'").arg(triggerValue));
|
m_ismasTriggerStatusMessage = QStringList(QString("TRIGGER-VALUE='%1' != 'WAIT'").arg(triggerValue));
|
||||||
QStringList lst = m_ismasTriggerStatusMessage;
|
QStringList lst = m_ismasTriggerStatusMessage;
|
||||||
ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::CHECK_ISMAS_TRIGGER_WRONG_VALUE)));
|
if (automaticUpdate) {
|
||||||
|
// do not inform ISMAS in case of automatic update
|
||||||
|
GUI(lst) << (CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::CHECK_ISMAS_TRIGGER_WRONG_VALUE));
|
||||||
|
} else {
|
||||||
|
ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::CHECK_ISMAS_TRIGGER_WRONG_VALUE)));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
m_ismasTriggerStatusMessage = QStringList(QString("TRIGGER-VALUE='%1' != 'WAIT'").arg(triggerValue));
|
m_ismasTriggerStatusMessage = QStringList(QString("TRIGGER-VALUE='%1' != 'WAIT'").arg(triggerValue));
|
||||||
QStringList lst = m_ismasTriggerStatusMessage;
|
QStringList lst = m_ismasTriggerStatusMessage;
|
||||||
ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::CHECK_ISMAS_TRIGGER_FAILURE)));
|
if (automaticUpdate) {
|
||||||
|
// do not inform ISMAS in case of automatic update
|
||||||
|
GUI(lst) << (CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::CHECK_ISMAS_TRIGGER_WRONG_VALUE));
|
||||||
|
} else {
|
||||||
|
ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << (m_lastFailedUpdateStep = UPDATE_STEP::CHECK_ISMAS_TRIGGER_FAILURE)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user