diff --git a/examples/lock-app/silabs/src/ZclCallbacks.cpp b/examples/lock-app/silabs/src/ZclCallbacks.cpp index 1c2ac85f0a56ee..80d045c9df341f 100644 --- a/examples/lock-app/silabs/src/ZclCallbacks.cpp +++ b/examples/lock-app/silabs/src/ZclCallbacks.cpp @@ -31,7 +31,7 @@ #ifdef DIC_ENABLE #include "dic.h" -#endif //DIC_ENABLE +#endif // DIC_ENABLE using namespace ::chip::app::Clusters; using namespace ::chip::DeviceLayer::Internal; @@ -49,8 +49,8 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & ChipLogProgress(Zcl, "Door lock cluster: " ChipLogFormatMEI " state %d", ChipLogValueMEI(clusterId), to_underlying(lockState)); #ifdef DIC_ENABLE - DIC_SendMsg("lock/state", (const char *) ( lockState == DoorLock::DlLockState::kLocked ? "lock" : "unlock")); -#endif //DIC_ENABLE + DIC_SendMsg("lock/state", (const char *) (lockState == DoorLock::DlLockState::kLocked ? "lock" : "unlock")); +#endif // DIC_ENABLE } } diff --git a/examples/thermostat/silabs/src/AppTask.cpp b/examples/thermostat/silabs/src/AppTask.cpp index a92e6323882edc..7cc5fc01934217 100644 --- a/examples/thermostat/silabs/src/AppTask.cpp +++ b/examples/thermostat/silabs/src/AppTask.cpp @@ -37,7 +37,7 @@ #ifdef DIC_ENABLE #include "DIC_EventHandler.h" -#endif //DIC_ENABLE +#endif // DIC_ENABLE #include #include @@ -109,7 +109,7 @@ CHIP_ERROR AppTask::Init() #ifdef DIC_ENABLE chip::DICManager::Init(); -#endif //DIC_ENABLE +#endif // DIC_ENABLE return err; } diff --git a/examples/thermostat/silabs/src/TemperatureManager.cpp b/examples/thermostat/silabs/src/TemperatureManager.cpp index d35d9b9de35ba5..7b238ad3daaaa3 100644 --- a/examples/thermostat/silabs/src/TemperatureManager.cpp +++ b/examples/thermostat/silabs/src/TemperatureManager.cpp @@ -31,7 +31,7 @@ #define DECIMAL 10 #define BYTE 5 #include "dic.h" -#endif //DIC_ENABLE +#endif // DIC_ENABLE /********************************************************** * Defines and Constants @@ -101,8 +101,8 @@ void TemperatureManager::AttributeChangeHandler(EndpointId endpointId, Attribute #ifdef DIC_ENABLE char buffer[BYTE]; itoa(Temp, buffer, DECIMAL); - DIC_SendMsg("thermostat/Local_Temp",(const char *)(buffer)); -#endif //DIC_ENABLE + DIC_SendMsg("thermostat/Local_Temp", (const char *) (buffer)); +#endif // DIC_ENABLE } break; @@ -113,7 +113,7 @@ void TemperatureManager::AttributeChangeHandler(EndpointId endpointId, Attribute #ifdef DIC_ENABLE char buffer[BYTE]; itoa(coolingTemp, buffer, DECIMAL); - DIC_SendMsg("thermostat/CoolingSetpoint",(const char *)(buffer)); + DIC_SendMsg("thermostat/CoolingSetpoint", (const char *) (buffer)); #endif } break; @@ -125,7 +125,7 @@ void TemperatureManager::AttributeChangeHandler(EndpointId endpointId, Attribute #ifdef DIC_ENABLE char buffer[BYTE]; itoa(heatingTemp, buffer, DECIMAL); - DIC_SendMsg("thermostat/HeatingSetpoint", (const char *)(buffer)); + DIC_SendMsg("thermostat/HeatingSetpoint", (const char *) (buffer)); #endif } break; @@ -134,29 +134,30 @@ void TemperatureManager::AttributeChangeHandler(EndpointId endpointId, Attribute SILABS_LOG("SystemMode %d", static_cast(*value)); uint8_t mode = static_cast(*value); #ifdef DIC_ENABLE - const char* Mode; + const char * Mode; char buffer[BYTE]; - switch (*value){ - case 0: - Mode = "OFF"; - break; - case 1: - Mode = "HEAT&COOL"; - break; - case 3: - Mode ="COOL"; - break; - case 4: - Mode ="HEAT"; - break; - default: - Mode = "INVALID MODE"; - break; + switch (*value) + { + case 0: + Mode = "OFF"; + break; + case 1: + Mode = "HEAT&COOL"; + break; + case 3: + Mode = "COOL"; + break; + case 4: + Mode = "HEAT"; + break; + default: + Mode = "INVALID MODE"; + break; } uint16_t current_temp = TempMgr().GetCurrentTemp(); itoa(current_temp, buffer, DECIMAL); DIC_SendMsg("thermostat/systemMode", Mode); - DIC_SendMsg("thermostat/currentTemp", (const char *)(buffer)); + DIC_SendMsg("thermostat/currentTemp", (const char *) (buffer)); #endif if (mThermMode != mode) { diff --git a/examples/window-app/common/src/WindowApp.cpp b/examples/window-app/common/src/WindowApp.cpp index 31514dfe4e071c..d6ada996136a75 100644 --- a/examples/window-app/common/src/WindowApp.cpp +++ b/examples/window-app/common/src/WindowApp.cpp @@ -703,8 +703,8 @@ void WindowApp::Cover::CallbackPositionSet(intptr_t arg) uint16_t value = data->percent100ths; char buffer[BYTE]; itoa(value, buffer, DECIMAL); - DIC_SendMsg("tilt/position set", (const char *)(buffer)); -#endif //DIC_ENABLE + DIC_SendMsg("tilt/position set", (const char *) (buffer)); +#endif // DIC_ENABLE } else { @@ -713,8 +713,8 @@ void WindowApp::Cover::CallbackPositionSet(intptr_t arg) uint16_t value = data->percent100ths; char buffer[BYTE]; itoa(value, buffer, DECIMAL); - DIC_SendMsg("lift/position set",(const char *)(buffer)); -#endif //DIC_ENABLE + DIC_SendMsg("lift/position set", (const char *) (buffer)); +#endif // DIC_ENABLE } chip::Platform::Delete(data); diff --git a/examples/window-app/silabs/src/WindowAppImpl.cpp b/examples/window-app/silabs/src/WindowAppImpl.cpp index a14806a5ab00c4..5aa98409513b32 100644 --- a/examples/window-app/silabs/src/WindowAppImpl.cpp +++ b/examples/window-app/silabs/src/WindowAppImpl.cpp @@ -49,7 +49,7 @@ SilabsLCD slLCD; #ifdef DIC_ENABLE #include "DIC_EventHandler.h" -#endif //DIC_ENABLE +#endif // DIC_ENABLE #define APP_TASK_STACK_SIZE (4096) #define APP_TASK_PRIORITY 2 @@ -220,7 +220,7 @@ CHIP_ERROR WindowAppImpl::Init() #ifdef DIC_ENABLE chip::DICManager::Init(); -#endif //DIC_ENABLE +#endif // DIC_ENABLE #ifdef DISPLAY_ENABLED slLCD.Init();