From 1966a68638dccc11796687839386cf75117413c2 Mon Sep 17 00:00:00 2001 From: proddy Date: Mon, 15 Apr 2024 22:02:55 +0200 Subject: [PATCH] always show devices even in test --- src/telegram.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/telegram.h b/src/telegram.h index aba93af64..9ae8dca01 100644 --- a/src/telegram.h +++ b/src/telegram.h @@ -204,16 +204,17 @@ class EMSbus { // checks every 30 seconds if the EMS bus is still alive static bool bus_connected() { -#ifndef EMSESP_STANDALONE +#if defined(EMSESP_STANDALONE) || defined(EMSESP_TEST) + return true; +#else if ((uuid::get_uptime() - last_bus_activity_) > EMS_BUS_TIMEOUT) { bus_connected_ = false; } return bus_connected_; -#else - return true; #endif } + // sets the flag for EMS bus connected static void last_bus_activity(uint32_t timestamp) { // record the first time we connected to the BUS, as this will be our uptime