From a951047aca1aa3f902d76af0457eef9149be3987 Mon Sep 17 00:00:00 2001 From: Mathieu Kardous Date: Tue, 22 Aug 2023 13:11:51 -0400 Subject: [PATCH] restyle --- src/app/icd/ICDManager.cpp | 2 +- src/app/icd/IcdManagementServer.h | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/app/icd/ICDManager.cpp b/src/app/icd/ICDManager.cpp index 1acfbb567924f7..bdc0b1feb4ab10 100644 --- a/src/app/icd/ICDManager.cpp +++ b/src/app/icd/ICDManager.cpp @@ -126,7 +126,7 @@ void ICDManager::UpdateOperationState(OperationalState state) if (state == OperationalState::IdleMode) { - mOperationalState = OperationalState::IdleMode; + mOperationalState = OperationalState::IdleMode; uint32_t idleModeInterval = IcdManagementServer::GetInstance().GetIdleModeInterval(); DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds32(idleModeInterval), OnIdleModeDone, this); diff --git a/src/app/icd/IcdManagementServer.h b/src/app/icd/IcdManagementServer.h index f74d40dac15eae..185731b5257387 100644 --- a/src/app/icd/IcdManagementServer.h +++ b/src/app/icd/IcdManagementServer.h @@ -67,20 +67,25 @@ class IcdManagementServer static IcdManagementServer mInstance; - static_assert((CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL) <= 64800, "Spec requires the IdleModeInterval to be equal or inferior to 64800s."); + static_assert((CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL) <= 64800, + "Spec requires the IdleModeInterval to be equal or inferior to 64800s."); static_assert((CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL) >= 1, "Spec requires the IdleModeInterval to be equal or greater to 1s."); - uint32_t mIdleInterval = CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL; // in seconds. + uint32_t mIdleInterval = CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL; // in seconds. - static_assert((CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL) <= (CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL * 1000), "Spec requires the IdleModeInterval be equal or greater to the ActiveModeInterval."); - static_assert((CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL) >= 300, "Spec requires the ActiveModeThreshold to be equal or greater to 300ms"); - uint32_t mActiveInterval = CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL; // in milliseconds + static_assert((CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL) <= (CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL * 1000), + "Spec requires the IdleModeInterval be equal or greater to the ActiveModeInterval."); + static_assert((CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL) >= 300, + "Spec requires the ActiveModeThreshold to be equal or greater to 300ms"); + uint32_t mActiveInterval = CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL; // in milliseconds - static_assert((CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD) >= 300, "Spec requires the ActiveModeThreshold to be equal or greater to 300ms."); - uint16_t mActiveThreshold = CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD; // in milliseconds + static_assert((CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD) >= 300, + "Spec requires the ActiveModeThreshold to be equal or greater to 300ms."); + uint16_t mActiveThreshold = CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD; // in milliseconds - uint32_t mIcdCounter = 0; + uint32_t mIcdCounter = 0; - static_assert((CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC) >= 1, "Spec requires the minimum of supported clients per fabric be equal or greater to 1."); + static_assert((CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC) >= 1, + "Spec requires the minimum of supported clients per fabric be equal or greater to 1."); uint16_t mFabricClientsSupported = CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC; };