@@ -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-
171128void ClosureUI::DrawHeader (GLIB_Context_t * glibContext)
172129{
173130 // Draw Silabs Corner icon
0 commit comments