nyx: Fix low battery voltage color

This commit is contained in:
CTCaer 2020-01-07 06:50:33 +02:00
parent c99a87dd09
commit 9263e2192f
2 changed files with 2 additions and 2 deletions

View file

@ -830,7 +830,7 @@ static void _update_status_bar(void *params)
bool voltage_empty = batt_volt < 3200;
s_printf(label + strlen(label), " mA# (%s%d mV%s)",
voltage_empty ? "FFF8000" : "", batt_volt, voltage_empty ? "#" : "");
voltage_empty ? "#FF8000" : "", batt_volt, voltage_empty ? "#" : "");
lv_label_set_array_text(status_bar.battery_more, label, 64);
lv_obj_realign(status_bar.battery_more);

View file

@ -888,7 +888,7 @@ static lv_res_t _create_window_battery_status(lv_obj_t *btn)
max17050_get_property(MAX17050_VCELL, &value);
bool voltage_empty = value < 3200;
s_printf(txt_buf + strlen(txt_buf), "%s%d mV%s\n",
voltage_empty ? "FFF8000" : "", value, voltage_empty ? " (Empty!)#" : "");
voltage_empty ? "#FF8000" : "", value, voltage_empty ? " (Empty!)#" : "");
max17050_get_property(MAX17050_OCVInternal, &value);
s_printf(txt_buf + strlen(txt_buf), "%d mV\n", value);