wip: currentSens

This commit is contained in:
Jakob Gegeniger committed 2026-10-25 01:15:13 +02:00
1 parent 85e2e92991
commit 855ffe5915
3 files changed
+89 -42

No files matched your search

+1 -13
View File
@@ -97,7 +97,7 @@ class MqttChannel {
fmt::println("Input queue flushed, {} Messages discarted", cnt);
}
static void runMasterService(Thread::Context& ctx, MqttChannel& instance, function<void()> resetCall, CurrMon& mon) {
static void runMasterService(Thread::Context& ctx, MqttChannel& instance, function<void()> resetCall) {
while (true) {
auto serMsg = instance.MasterQueue.tryDequeueFor(500ms);
// only resetTopic and cfgTopic arrive here
@@ -152,24 +152,12 @@ class MqttChannel {
break;
}
instance.IoStat.SwordLatch.moveIn();
auto tE = std::chrono::steady_clock::now() + 6s;
while (std::chrono::steady_clock::now() < tE) {
Thread::sleep(100ms);
auto curr = mon.sampleCurrent();
}
auto currE = mon.sampleCurrent();
} break;
case ServiceCommands_e::SetLockClose: {
if (instance.IoStat.GameRunning) {
break;
}
instance.IoStat.SwordLatch.moveOut();
auto tE = std::chrono::steady_clock::now() + 6s;
while (std::chrono::steady_clock::now() < tE) {
Thread::sleep(100ms);
auto curr = mon.sampleCurrent();
}
auto currE = mon.sampleCurrent();
} break;
case ServiceCommands_e::PlaySoundPromo: {
MediaPlayer::playWavFileAsync(instance.Config.SoundPromo);