step: Consistent abort msg, live signal and last Will

This commit is contained in:
Jakob Gegeniger committed 2026-10-22 22:14:48 +02:00
1 parent dbe482655c
commit 27a791c4c0
5 files changed
+54 -27

No files matched your search

+4 -1
View File
@@ -41,10 +41,12 @@ class MqttChannel {
{"stayLocked", GameModeCommands_e::GameNextTryLocked},
{"releaseLock", GameModeCommands_e::GameNextTryRelease},
{"abortTry", GameModeCommands_e::GameAbortTry},
{"forceAbort", GameModeCommands_e::GameAbortTry},
}),
subTopics{{setTopic, cfgTopic, resetTopic}},
client(name, cfg.BrockerUrl, subTopics,
{cfg.MqttUser, cfg.MqttPassword}) {
{cfg.MqttUser, cfg.MqttPassword},
MqttClient::LastWill{eventTopic, "offline", 1, false}) {
fmt::println("MQTT: Starting task:");
mqttCall = [this](string topic, string payload) {
fmt::print("MQTT: Got T:'{}' M:'{}'\n", topic, payload);
@@ -64,6 +66,7 @@ class MqttChannel {
client.registerCallback(mqttCall);
client.send(verTopic, fmt::format("{}", version));
client.send(eventTopic, "online");
}
std::unique_ptr<MqttQe> tryDeque() {