Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and Thirsrin committed Jun 20, 2023
1 parent 8672483 commit 6fe9da6
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 34 deletions.
6 changes: 3 additions & 3 deletions examples/lock-app/silabs/src/ZclCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
}
}

Expand Down
4 changes: 2 additions & 2 deletions examples/thermostat/silabs/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

#ifdef DIC_ENABLE
#include "DIC_EventHandler.h"
#endif //DIC_ENABLE
#endif // DIC_ENABLE

#include <app-common/zap-generated/attributes/Accessors.h>
#include <app-common/zap-generated/callback.h>
Expand Down Expand Up @@ -109,7 +109,7 @@ CHIP_ERROR AppTask::Init()

#ifdef DIC_ENABLE
chip::DICManager::Init();
#endif //DIC_ENABLE
#endif // DIC_ENABLE

return err;
}
Expand Down
47 changes: 24 additions & 23 deletions examples/thermostat/silabs/src/TemperatureManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#define DECIMAL 10
#define BYTE 5
#include "dic.h"
#endif //DIC_ENABLE
#endif // DIC_ENABLE

/**********************************************************
* Defines and Constants
Expand Down Expand Up @@ -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;

Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -134,29 +134,30 @@ void TemperatureManager::AttributeChangeHandler(EndpointId endpointId, Attribute
SILABS_LOG("SystemMode %d", static_cast<uint8_t>(*value));
uint8_t mode = static_cast<uint8_t>(*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)
{
Expand Down
8 changes: 4 additions & 4 deletions examples/window-app/common/src/WindowApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions examples/window-app/silabs/src/WindowAppImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 6fe9da6

Please sign in to comment.