a lot of thread housekeeping. Switch them off when not needed / disabled.

This commit is contained in:
Thomas Göttgens
2022-12-29 15:45:49 +01:00
parent 1a949b7ca6
commit 41a1dfec79
15 changed files with 102 additions and 59 deletions

View File

@@ -55,10 +55,18 @@ CannedMessageModule::CannedMessageModule()
if ((this->splitConfiguredMessages() <= 0) && (cardkb_found != CARDKB_ADDR)) {
DEBUG_MSG("CannedMessageModule: No messages are configured. Module is disabled\n");
this->runState = CANNED_MESSAGE_RUN_STATE_DISABLED;
setInterval(INT32_MAX);
enabled = false;
} else {
DEBUG_MSG("CannedMessageModule is enabled\n");
this->inputObserver.observe(inputBroker);
}
setInterval(INT32_MAX);
enabled = false;
} else {
this->runState = CANNED_MESSAGE_RUN_STATE_DISABLED;
setInterval(INT32_MAX);
enabled = false;
}
}