color_ui: refresh the menu on media detach#20958
color_ui: refresh the menu on media detach#20958thinkyhead merged 1 commit intoMarlinFirmware:bugfix-2.0.xfrom
Conversation
|
|
||
| if (!IS_SD_PRINTING()) card.release(); | ||
|
|
||
| IF_ENABLED(TFT_COLOR_UI, ui.refresh(LCDVIEW_CALL_REDRAW_NEXT)); |
There was a problem hiding this comment.
Is here the right place for that?
I prefer that UI code should be handled on UI code, not on core/gcode.
I think the right place for that, is right after the menu call, isn't?
There was a problem hiding this comment.
i seen the lcd/marlinui.h in most others M2x commands... and menu code is messy
There was a problem hiding this comment.
The point is: only when you have that menu opened on screen that you need a refresh, not every time a M22 is called. That is the main reason I would prefer the UI handling its own needs.
There was a problem hiding this comment.
you only detach the SD from the menu no ? to remove it...
There was a problem hiding this comment.
you can do it manually calling M22... We should try our best to separated core than UI
There was a problem hiding this comment.
Also, there are other reasons to refresh even on the status page... to show/hide the sd icon
There was a problem hiding this comment.
Now you got a really good point. So, maybe it's a hook for card.release.... I don't know if card.release is called only on M22... This issue happens when we have SD_DETECT and pull out the SD?
There was a problem hiding this comment.
a refresh doesnt hurt, and you dont do mount/umount during prints
There was a problem hiding this comment.
I mean: if I pull out the SD card while on that menu screen, it will refresh?
There was a problem hiding this comment.
for the others, this issue was without SD DETECT PIN, with COLOR UI
… into bugfix-2.0.x * 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin: (121 commits) [cron] Bump distribution date (2021-02-04) [cron] Bump distribution date (2021-02-03) Add "more" menu in LVGL interface (MarlinFirmware#20940) Evaluate ANY_SERIAL_IS in place Note (MarlinUI) limit on PREHEAT settings (MarlinFirmware#20966) Update a UBL comment (MarlinFirmware#20931) STM32 Shared Media - USB Mass Storage Device (MarlinFirmware#20956) Multi-language pertains to Color UI (MarlinFirmware#20972) Touch Calibration Screen auto-save option (MarlinFirmware#20971) Include ui_common for MARLIN_LOGO_FULL_SIZE (MarlinFirmware#20963) Fix host_response_handler compile (MarlinFirmware#20962) [cron] Bump distribution date (2021-02-02) LVGL UI G-code console (MarlinFirmware#20755) [cron] Bump distribution date (2021-02-01) Refresh screen on M22 (detach) (MarlinFirmware#20958) Fix AutoReporter implementation (MarlinFirmware#20959) Serial refactor followup (MarlinFirmware#20932) Init serial ports first (MarlinFirmware#20944) Remove extra G29 V newlines (MarlinFirmware#20955) [cron] Bump distribution date (2021-01-31) ...
Actually, if you click on detach, the menu label is not refreshed unless you scroll the menu...
That make you think you didnt "click" correctly.. and the second click is re-attaching the card...