diff --git a/bdk/usb/usb_gadget_ums.c b/bdk/usb/usb_gadget_ums.c index f411f46..6a9831f 100644 --- a/bdk/usb/usb_gadget_ums.c +++ b/bdk/usb/usb_gadget_ums.c @@ -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) diff --git a/nyx/nyx_gui/frontend/gui_tools.c b/nyx/nyx_gui/frontend/gui_tools.c index d2bd51b..8a2d132 100644 --- a/nyx/nyx_gui/frontend/gui_tools.c +++ b/nyx/nyx_gui/frontend/gui_tools.c @@ -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;