@@ -24,7 +24,7 @@ void loadAlertSnapshot(const AlertSnapshot& snap) {
2424 }
2525 const char * txt = sensorIDToAbbreviation (static_cast <SensorID>(snap.ids [0 ]));
2626 lv_label_set_text (alert_text_label, txt);
27- lv_obj_set_style_text_color (alert_text_label, snap.criticalMode ? lv_color_make (255 ,0 , 0 ) : lv_color_make (255 ,165 ,0 ), 0 );
27+ lv_obj_set_style_text_color (alert_text_label, snap.criticalMode ? lv_color_make (255 , 0 , 0 ) : lv_color_make (255 , 165 , 0 ), 0 );
2828 lv_obj_clear_flag (alert_text_label, LV_OBJ_FLAG_HIDDEN);
2929}
3030
@@ -105,7 +105,7 @@ void updateAlertCounterDisplay(const AlertCounts& counts) {
105105 if (counts.warningCount > 0 ) {
106106 char buf[4 ];
107107 if (counts.warningCount > 9 ) {
108- strcpy (buf, " 9+" );
108+ snprintf (buf, sizeof (buf) , " 9+" );
109109 } else {
110110 snprintf (buf, sizeof (buf), " %u" , counts.warningCount );
111111 }
@@ -119,7 +119,7 @@ void updateAlertCounterDisplay(const AlertCounts& counts) {
119119 if (counts.criticalCount > 0 ) {
120120 char buf[4 ];
121121 if (counts.criticalCount > 9 ) {
122- strcpy (buf, " 9+" );
122+ snprintf (buf, sizeof (buf) , " 9+" );
123123 } else {
124124 snprintf (buf, sizeof (buf), " %u" , counts.criticalCount );
125125 }
@@ -173,10 +173,10 @@ void lv_showAlertTextWithLevel(SensorID id, AlertLevel level, bool critical) {
173173 // Make warning text darker and slightly larger for readability
174174 lv_obj_set_style_text_font (alert_text_label, &lv_font_montserrat_16, 0 );
175175 // Dark orange for better readability over light background
176- lv_obj_set_style_text_color (alert_text_label, lv_color_make (200 ,100 ,0 ), 0 );
176+ lv_obj_set_style_text_color (alert_text_label, lv_color_make (200 , 100 , 0 ), 0 );
177177 }
178178 if (critical) {
179- lv_obj_set_style_text_color (alert_text_label, lv_color_make (255 ,0 , 0 ), 0 );
179+ lv_obj_set_style_text_color (alert_text_label, lv_color_make (255 , 0 , 0 ), 0 );
180180 }
181181 lv_obj_clear_flag (alert_text_label, LV_OBJ_FLAG_HIDDEN);
182182}
0 commit comments