This commit is contained in:
MichaelDvP
2024-04-22 13:14:24 +02:00
132 changed files with 3840 additions and 3059 deletions

View File

@@ -206,16 +206,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