nyx: Disallow eMMC ops with low battery

This commit is contained in:
CTCaer
2020-04-30 03:59:16 +03:00
parent e89b7f12dd
commit f540c8250b
4 changed files with 40 additions and 0 deletions

View File

@@ -308,6 +308,9 @@ static lv_res_t _create_emummc_action(lv_obj_t * btns, const char * txt)
static lv_res_t _create_mbox_emummc_create(lv_obj_t *btn)
{
if (!nyx_emmc_check_battery_enough())
return LV_RES_OK;
lv_obj_t *dark_bg = lv_obj_create(lv_scr_act(), NULL);
lv_obj_set_style(dark_bg, &mbox_darken);
lv_obj_set_size(dark_bg, LV_HOR_RES, LV_VER_RES);