From a1889e5bd62f0a5ac1879898e3ffedd44f5671dd Mon Sep 17 00:00:00 2001 From: RavenSystem Date: Thu, 11 May 2023 19:24:12 +0200 Subject: [PATCH] Home Accessory Architect v12.2.3 Merlin --- HAA/HAA_Main/main/header.h | 2 +- HAA/HAA_Main/main/main.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/HAA/HAA_Main/main/header.h b/HAA/HAA_Main/main/header.h index da7872a6..49c94d75 100644 --- a/HAA/HAA_Main/main/header.h +++ b/HAA/HAA_Main/main/header.h @@ -11,7 +11,7 @@ #include "../../common/common_headers.h" // Version -#define HAA_FIRMWARE_VERSION "12.2.2" +#define HAA_FIRMWARE_VERSION "12.2.3" #define HAA_FIRMWARE_BETA_REVISION "" #define HAA_FIRMWARE_CODENAME "Merlin" diff --git a/HAA/HAA_Main/main/main.c b/HAA/HAA_Main/main/main.c index f51f59e3..9de5034a 100644 --- a/HAA/HAA_Main/main/main.c +++ b/HAA/HAA_Main/main/main.c @@ -6902,10 +6902,14 @@ void do_actions(ch_group_t* ch_group, uint8_t action) { case SERV_TYPE_FREE_MONITOR: case SERV_TYPE_FREE_MONITOR_ACCUMULATVE: if (ch_group->main_enabled) { - FM_OVERRIDE_VALUE = action_serv_manager->value; - if (xTaskCreate(free_monitor_task, "FM", FREE_MONITOR_TASK_SIZE, (void*) ch_group, FREE_MONITOR_TASK_PRIORITY, NULL) != pdPASS) { - ERROR("New FM"); - homekit_remove_oldest_client(); + if (!ch_group->is_working) { + FM_OVERRIDE_VALUE = action_serv_manager->value; + if (xTaskCreate(free_monitor_task, "FM", FREE_MONITOR_TASK_SIZE, (void*) ch_group, FREE_MONITOR_TASK_PRIORITY, NULL) == pdPASS) { + ch_group->is_working = true; + } else { + ERROR("New FM"); + homekit_remove_oldest_client(); + } } } break;