If the update process is activated without a valid ISMAS trigger, then

wait for a valid trigger value 15x (=90s) instaed of 100x.
This commit is contained in:
Gerhard Hoffmann 2023-12-13 13:44:55 +01:00
parent 6f5c8103e4
commit 19250a0a2f

View File

@ -464,8 +464,8 @@ bool Worker::updateTriggerSet() {
GUI() << (ISMAS() << (CONSOLE() << UPDATE_STEP::CHECK_ISMAS_TRIGGER)); GUI() << (ISMAS() << (CONSOLE() << UPDATE_STEP::CHECK_ISMAS_TRIGGER));
QString triggerValue("NOT CHECKED YET"); QString triggerValue("NOT CHECKED YET");
static constexpr int const repeats = 15;
for (int repeat = 1; repeat <= 100; ++repeat) { for (int repeat = 1; repeat <= repeats; ++repeat) {
if (repeat > 1) { if (repeat > 1) {
int const startMs = QTime::currentTime().msecsSinceStartOfDay(); int const startMs = QTime::currentTime().msecsSinceStartOfDay();
@ -473,10 +473,12 @@ bool Worker::updateTriggerSet() {
QString const &s = QString("elapsed: %1.%2s").arg(durationMs / 1000).arg(durationMs % 1000); QString const &s = QString("elapsed: %1.%2s").arg(durationMs / 1000).arg(durationMs % 1000);
CONSOLE(QStringList(func) << s) << UPDATE_STEP::DEBUG; CONSOLE(QStringList(func) << s) << UPDATE_STEP::DEBUG;
} else { } else {
CONSOLE(QStringList(func) << QString("-> REPEAT=%1").arg(repeat)) << UPDATE_STEP::DEBUG; QStringList lst = (QStringList(func) << QString("-> REPEAT=%1 (%2)").arg(repeat).arg(repeats-repeat));
// GUI(lst) << UPDATE_STEP::CHECK_ISMAS_TRIGGER;
CONSOLE(lst) << UPDATE_STEP::DEBUG;
} }
if ((repeat % 10) == 0) { if ((repeat % 8) == 0) {
CONSOLE(QStringList(func) << "RESTART APISM") << UPDATE_STEP::DEBUG; CONSOLE(QStringList(func) << "RESTART APISM") << UPDATE_STEP::DEBUG;
Command c("systemctl restart apism"); Command c("systemctl restart apism");
if (c.execute("/tmp")) { if (c.execute("/tmp")) {