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));
QString triggerValue("NOT CHECKED YET");
for (int repeat = 1; repeat <= 100; ++repeat) {
static constexpr int const repeats = 15;
for (int repeat = 1; repeat <= repeats; ++repeat) {
if (repeat > 1) {
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);
CONSOLE(QStringList(func) << s) << UPDATE_STEP::DEBUG;
} 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;
Command c("systemctl restart apism");
if (c.execute("/tmp")) {