Skip to content

Commit 1c39529

Browse files
PR comments
1 parent e695f23 commit 1c39529

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

examples/closure-app/silabs/include/ClosureUI.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ class ClosureUI
4141
public:
4242
static void DrawUI(GLIB_Context_t * glibContext);
4343
static void SetMainState(chip::app::Clusters::ClosureControl::MainStateEnum state);
44-
static void SetOverallCurrentState(const char * positionText, const char * latchText, const char * secureText,
45-
const char * speedText);
4644

4745
static void FormatAndSetPosition(const char * suffix);
4846
static void FormatAndSetLatch(const char * suffix);

examples/closure-app/silabs/src/ClosureUI.cpp

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -125,49 +125,6 @@ void ClosureUI::SetMainState(chip::app::Clusters::ClosureControl::MainStateEnum
125125
sMainState = state;
126126
}
127127

128-
void ClosureUI::SetOverallCurrentState(const char * positionText, const char * latchText, const char * secureText,
129-
const char * speedText)
130-
{
131-
// Use fallback values for null parameters - build from prefix + suffix to avoid duplication
132-
// Use snprintf for all cases to ensure null termination and avoid buffer overflows
133-
if (positionText != nullptr)
134-
{
135-
snprintf(sPositionText, sizeof(sPositionText), "%s", positionText);
136-
}
137-
else
138-
{
139-
FormatText(sPositionText, sizeof(sPositionText), ClosureUIStrings::POSITION_PREFIX,
140-
ClosureUIStrings::POSITION_SUFFIX_UNKNOWN);
141-
}
142-
143-
if (latchText != nullptr)
144-
{
145-
snprintf(sLatchText, sizeof(sLatchText), "%s", latchText);
146-
}
147-
else
148-
{
149-
FormatText(sLatchText, sizeof(sLatchText), ClosureUIStrings::LATCH_PREFIX, ClosureUIStrings::LATCH_SUFFIX_UNKNOWN);
150-
}
151-
152-
if (secureText != nullptr)
153-
{
154-
snprintf(sSecureText, sizeof(sSecureText), "%s", secureText);
155-
}
156-
else
157-
{
158-
FormatText(sSecureText, sizeof(sSecureText), ClosureUIStrings::SECURE_PREFIX, ClosureUIStrings::SECURE_SUFFIX_UNKNOWN);
159-
}
160-
161-
if (speedText != nullptr)
162-
{
163-
snprintf(sSpeedText, sizeof(sSpeedText), "%s", speedText);
164-
}
165-
else
166-
{
167-
FormatText(sSpeedText, sizeof(sSpeedText), ClosureUIStrings::SPEED_PREFIX, ClosureUIStrings::SPEED_SUFFIX_UNKNOWN);
168-
}
169-
}
170-
171128
void ClosureUI::DrawHeader(GLIB_Context_t * glibContext)
172129
{
173130
// Draw Silabs Corner icon

0 commit comments

Comments
 (0)