fix: avoid "0" brightness in some cases
This commit is contained in:
@@ -331,12 +331,12 @@ api:
|
||||
id(disp1).set_component_font_color(btnbri.c_str(), btn_bri_font);
|
||||
id(disp1).set_component_text_printf(btnicon.c_str(), "%s", btn_icon.c_str());
|
||||
id(disp1).set_component_text_printf(btntext.c_str(), "%s", btn_label.c_str());
|
||||
id(disp1).set_component_text_printf(btnbri.c_str(), "%s", btn_bri_txt.c_str());
|
||||
// if (strcmp(btn_bri_txt.c_str(), "0") != 0) {
|
||||
// id(disp1).set_component_text_printf(btnbri.c_str(), "%s", btn_bri_txt.c_str());
|
||||
// } else {
|
||||
// id(disp1).set_component_text_printf(btnbri.c_str(), "%s", std::string(" "));
|
||||
// }
|
||||
// id(disp1).set_component_text_printf(btnbri.c_str(), "%s", btn_bri_txt.c_str());
|
||||
if (strcmp(btn_bri_txt.c_str(), "0") != 0) {
|
||||
id(disp1).set_component_text_printf(btnbri.c_str(), "%s", btn_bri_txt.c_str());
|
||||
} else {
|
||||
id(disp1).set_component_text_printf(btnbri.c_str(), " ");
|
||||
}
|
||||
|
||||
##### START - GLOBALS CONFIGURATION #####
|
||||
globals:
|
||||
|
||||
Reference in New Issue
Block a user