From 1f4083e6d08eab35e934db7b001221c9721dd5e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20=C3=96hrstr=C3=B6m?= Date: Wed, 11 Nov 2020 21:44:50 +0100 Subject: [PATCH] Start eventloop after first detect of stdin device. --- src/main.cc | 4 ++-- test.sh | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main.cc b/src/main.cc index e85bd13..65cae2e 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1120,14 +1120,14 @@ bool start(Configuration *config) } ); - serial_manager_->startEventLoop(); - // Detect and initialize any devices. // Future changes are triggered through this callback. printed_warning_ = true; detect_and_configure_wmbus_devices(config); + serial_manager_->startEventLoop(); + if (wmbus_devices_.size() == 0) { notice("No wmbus device detected, waiting for a device to be plugged in.\n"); diff --git a/test.sh b/test.sh index fd62d46..276b83a 100755 --- a/test.sh +++ b/test.sh @@ -99,4 +99,11 @@ then if [ "$?" != "0" ]; then RC="1"; fi fi +if [ "$RC" = "0" ] +then + echo "All tests ok!" +else + echo "Some tests failed!" +fi + exit $RC