1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-26 11:42:09 +00:00

Improve Power off by resetting all regulators

This commit is contained in:
CTCaer 2020-12-15 19:37:52 +02:00
parent 601c85c23e
commit 52c65661d8
2 changed files with 5 additions and 5 deletions

View file

@ -133,7 +133,7 @@ void check_power_off_from_hos()
msleep(600); msleep(600);
display_backlight_brightness(0, 20000); display_backlight_brightness(0, 20000);
} }
power_set_state(POWER_OFF); power_set_state(POWER_OFF_RESET);
} }
} }
@ -1304,7 +1304,7 @@ static void _check_low_battery()
if (!current_charge_status) if (!current_charge_status)
{ {
max77620_low_battery_monitor_config(true); max77620_low_battery_monitor_config(true);
power_set_state(POWER_OFF); power_set_state(POWER_OFF_RESET);
} }
display_end(); display_end();
@ -1498,7 +1498,7 @@ ment_t ment_tools[] = {
menu_t menu_tools = { ment_tools, "Tools", 0, 0 }; menu_t menu_tools = { ment_tools, "Tools", 0, 0 };
power_state_t STATE_POWER_OFF = POWER_OFF; power_state_t STATE_POWER_OFF = POWER_OFF_RESET;
power_state_t STATE_REBOOT_RCM = REBOOT_RCM; power_state_t STATE_REBOOT_RCM = REBOOT_RCM;
power_state_t STATE_REBOOT_BYPASS_FUSES = REBOOT_BYPASS_FUSES; power_state_t STATE_REBOOT_BYPASS_FUSES = REBOOT_BYPASS_FUSES;

View file

@ -906,7 +906,7 @@ static lv_res_t _removed_sd_action(lv_obj_t *btns, const char *txt)
power_set_state(REBOOT_RCM); power_set_state(REBOOT_RCM);
break; break;
case 1: case 1:
power_set_state(POWER_OFF); power_set_state(POWER_OFF_RESET);
break; break;
case 2: case 2:
sd_end(); sd_end();
@ -972,7 +972,7 @@ static lv_res_t _reboot_action(lv_obj_t *btns, const char *txt)
static lv_res_t _poweroff_action(lv_obj_t *btns, const char *txt) static lv_res_t _poweroff_action(lv_obj_t *btns, const char *txt)
{ {
if (!lv_btnm_get_pressed(btns)) if (!lv_btnm_get_pressed(btns))
power_set_state(POWER_OFF); power_set_state(POWER_OFF_RESET);
return mbox_action(btns, txt); return mbox_action(btns, txt);
} }