Skip to content

color_ui: refresh the menu on media detach#20958

Merged
thinkyhead merged 1 commit intoMarlinFirmware:bugfix-2.0.xfrom
tpruvot:colorui_detach
Feb 1, 2021
Merged

color_ui: refresh the menu on media detach#20958
thinkyhead merged 1 commit intoMarlinFirmware:bugfix-2.0.xfrom
tpruvot:colorui_detach

Conversation

@tpruvot
Copy link
Contributor

@tpruvot tpruvot commented Jan 31, 2021

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...

@tpruvot
Copy link
Contributor Author

tpruvot commented Jan 31, 2021

@tpruvot
Copy link
Contributor Author

tpruvot commented Jan 31, 2021


if (!IS_SD_PRINTING()) card.release();

IF_ENABLED(TFT_COLOR_UI, ui.refresh(LCDVIEW_CALL_REDRAW_NEXT));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i seen the lcd/marlinui.h in most others M2x commands... and menu code is messy

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you only detach the SD from the menu no ? to remove it...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can do it manually calling M22... We should try our best to separated core than UI

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, there are other reasons to refresh even on the status page... to show/hide the sd icon

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a refresh doesnt hurt, and you dont do mount/umount during prints

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean: if I pull out the SD card while on that menu screen, it will refresh?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the others, this issue was without SD DETECT PIN, with COLOR UI

@thinkyhead thinkyhead merged commit 7626ef5 into MarlinFirmware:bugfix-2.0.x Feb 1, 2021
@tpruvot tpruvot deleted the colorui_detach branch February 1, 2021 00:54
Jyers pushed a commit to Jyers/Marlin that referenced this pull request Feb 3, 2021
susisstrolch pushed a commit to susisstrolch/Marlin that referenced this pull request Feb 16, 2021
… 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)
  ...
kpishere pushed a commit to kpishere/Marlin that referenced this pull request Feb 19, 2021
zillarob pushed a commit to zillarob/Marlin that referenced this pull request Feb 25, 2021
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
thinkyhead pushed a commit that referenced this pull request Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants