mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 01:09:51 +03:00
Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev
This commit is contained in:
@@ -752,6 +752,11 @@ void System::system_check() {
|
||||
if (!last_system_check_ || ((uint32_t)(uuid::get_uptime() - last_system_check_) >= SYSTEM_CHECK_FREQUENCY)) {
|
||||
last_system_check_ = uuid::get_uptime();
|
||||
|
||||
#ifdef EMSESP_PINGTEST
|
||||
static uint64_t ping_count = 0;
|
||||
LOG_NOTICE("Ping test, #%d", ping_count++);
|
||||
#endif
|
||||
|
||||
// check if we have a valid network connection
|
||||
if (!ethernet_connected() && (WiFi.status() != WL_CONNECTED)) {
|
||||
healthcheck_ |= HEALTHCHECK_NO_NETWORK;
|
||||
|
||||
@@ -281,7 +281,11 @@ class System {
|
||||
static constexpr uint32_t BUTTON_VLongPressDelay = 9000; // Hold period for a very long press event (in ms)
|
||||
|
||||
// healthcheck
|
||||
static constexpr uint32_t SYSTEM_CHECK_FREQUENCY = 5000; // do a system check every 5 seconds
|
||||
#ifdef EMSESP_PINGTEST
|
||||
static constexpr uint32_t SYSTEM_CHECK_FREQUENCY = 500; // do a system check every 1/2 second
|
||||
#else
|
||||
static constexpr uint32_t SYSTEM_CHECK_FREQUENCY = 5000; // do a system check every 5 seconds
|
||||
#endif
|
||||
static constexpr uint32_t HEALTHCHECK_LED_LONG_DUARATION = 1500;
|
||||
static constexpr uint32_t HEALTHCHECK_LED_FLASH_DUARATION = 150;
|
||||
static constexpr uint8_t HEALTHCHECK_NO_BUS = (1 << 0); // 1
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace emsesp {
|
||||
class WebLogService : public uuid::log::Handler {
|
||||
public:
|
||||
static constexpr size_t MAX_LOG_MESSAGES = 50;
|
||||
static constexpr size_t REFRESH_SYNC = 80;
|
||||
static constexpr size_t REFRESH_SYNC = 30;
|
||||
|
||||
WebLogService(AsyncWebServer * server, SecurityManager * securityManager);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user