mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 19:31:12 +00:00
nyx: Fix low battery voltage color
This commit is contained in:
parent
c99a87dd09
commit
9263e2192f
2 changed files with 2 additions and 2 deletions
|
@ -830,7 +830,7 @@ static void _update_status_bar(void *params)
|
||||||
|
|
||||||
bool voltage_empty = batt_volt < 3200;
|
bool voltage_empty = batt_volt < 3200;
|
||||||
s_printf(label + strlen(label), " mA# (%s%d mV%s)",
|
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_label_set_array_text(status_bar.battery_more, label, 64);
|
||||||
lv_obj_realign(status_bar.battery_more);
|
lv_obj_realign(status_bar.battery_more);
|
||||||
|
|
|
@ -888,7 +888,7 @@ static lv_res_t _create_window_battery_status(lv_obj_t *btn)
|
||||||
max17050_get_property(MAX17050_VCELL, &value);
|
max17050_get_property(MAX17050_VCELL, &value);
|
||||||
bool voltage_empty = value < 3200;
|
bool voltage_empty = value < 3200;
|
||||||
s_printf(txt_buf + strlen(txt_buf), "%s%d mV%s\n",
|
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);
|
max17050_get_property(MAX17050_OCVInternal, &value);
|
||||||
s_printf(txt_buf + strlen(txt_buf), "%d mV\n", value);
|
s_printf(txt_buf + strlen(txt_buf), "%d mV\n", value);
|
||||||
|
|
Loading…
Reference in a new issue