mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-26 11:42:09 +00:00
ums: Dim backlight and change the maintenance order
This commit is contained in:
parent
bf8fd9a33b
commit
9daa14abec
2 changed files with 12 additions and 6 deletions
|
@ -1774,16 +1774,16 @@ static inline void _system_maintainance(usbd_gadget_ums_t *ums)
|
|||
|
||||
u32 time = get_tmr_ms();
|
||||
|
||||
if (timer_dram < time)
|
||||
{
|
||||
minerva_periodic_training();
|
||||
timer_dram = get_tmr_ms() + 100;
|
||||
}
|
||||
else if (timer_status_bar < time)
|
||||
if (timer_status_bar < time)
|
||||
{
|
||||
ums->system_maintenance(true);
|
||||
timer_status_bar = get_tmr_ms() + 30000;
|
||||
}
|
||||
else if (timer_dram < time)
|
||||
{
|
||||
minerva_periodic_training();
|
||||
timer_dram = get_tmr_ms() + EMC_PERIODIC_TRAIN_MS;
|
||||
}
|
||||
}
|
||||
|
||||
int usb_device_gadget_ums(usb_ctxt_t *usbs)
|
||||
|
|
|
@ -293,8 +293,14 @@ static lv_res_t _create_mbox_ums(usb_ctxt_t *usbs)
|
|||
lv_obj_align(mbox, NULL, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_top(mbox, true);
|
||||
|
||||
// Dim backlight.
|
||||
display_backlight_brightness(20, 1000);
|
||||
|
||||
usb_device_gadget_ums(usbs);
|
||||
|
||||
// Restore backlight.
|
||||
display_backlight_brightness(h_cfg.backlight - 20, 1000);
|
||||
|
||||
lv_mbox_add_btns(mbox, mbox_btn_map2, mbox_action);
|
||||
|
||||
ums_mbox = dark_bg;
|
||||
|
|
Loading…
Reference in a new issue