Marlin
Marlin copied to clipboard
Enabled 2 mesh viewers
Description
for ProUI:
This adds the option to enable two types of mesh viewers.
Toggle between the older "Red ..0.. Green" square block style and the newer rainbow color round style.
- add menu option to view 2 ways to view mesh.
- renamed to
MSG_CHANGE_MESHfromMSG_CHANGE_MESH_VIEWER
changed in Conditionals_post.h so USE_GRID_MESHVIEWER is defined when ProUI is used, because bedlevelTools is.
in settings.cpp, also added a couple relevant comments to other things in settings.cpp.
Requirements
DWIN_LCD_PROUI
HAS_MESH
Benefits
gives the user the option to toggle between the two ways to view the mesh.
Configurations
Related Issues
[!NOTE] in meshviewer.cpp I wrote a
TODO:comment becauseset_status_and_levelwas changed in marlinui.h (which is now in the other PR).I'm not sure which is right... either leaving how this function is defined, and just changing how it is used in meshviewer.cpp (by adding
, 0)to the end of it ORlevel=0as its defined).
- ui.set_status_and_level(MString<30>(F("Mesh Z min: "), p_float_t(min, 2), F(", max: "), p_float_t(max, 2)));
// with change in marlin.h -- level=0
+ ui.set_status_and_level(MString<30>(F("Mesh Z min: "), p_float_t(min, 2), F(", max: "), p_float_t(max, 2)), 0);
// without changes
as example
- static void set_status_and_level(const char * const cstr, const int8_t level) { _set_status_and_level(cstr, level, false); }
+ static void set_status_and_level(const char * const cstr, const int8_t level=0) { _set_status_and_level(cstr, level, false); }
@thisiskeithb @thinkyhead Prusa/MK3S-BigTreeTech-BTT002 has caused an issue with pull requests
(BIGTREE_BTT002) (pull_request) fails and with the given error:
Marlin\src\sd\cardreader.cpp:996:28: error: 'IS_DIR' was not declared in this scope; did you mean 'EISDIR'? Marlin\src\sd\cardreader.cpp:1014:30: error: 'IS_DIR' was not declared in this scope; did you mean 'EISDIR'? Marlin\src\sd\cardreader.cpp:1365:11: error: 'isDir' was not declared in this scope; did you mean 'isDigit'?
HAS_FOLDER_SORTING should be enabled, because FOLDER_SORTING became undefined in the recent push to example configs.
Thinkyhead will need to push a follow-up commit after checking existing configs that were broken after https://github.com/MarlinFirmware/Configurations/commit/65c51209d4cccdd4f4709d2af71bea675d4d9d1f.
The viewer_asymmetric_range flag is still referenced, so that cannot be removed just yet. If it is no longer relevant then the code that refers to it must be updated. Check with @mriscoc for advice on whether it should be retained.
The
viewer_asymmetric_rangeflag is still referenced, so that cannot be removed just yet. If it is no longer relevant then the code that refers to it must be updated. Check with @mriscoc for advice on whether it should be retained.
I didn't see what was wrong with the thumbnail preview. Proper definitions should be ensured to allow people to choose between having a normal mesh viewer, a grid mesh viewer, or a selectable one; otherwise, we're increasing the program memory usage for no real benefit.
I didn't see what was wrong with the thumbnail preview.
it wasnt working when I tried before I made the changes. unless I imagined it. but it was working fine after.
update: not sure what happened. thumbnail previews are working without changes made. so disregard.
I didn't see what was wrong with the thumbnail preview.
@mriscoc — If you look at the current bugfix-2.1.x code you will see that viewer_asymmetric_range exists as part of ProUI but it never changes; it is always false. It seems to be a remnant of JyersUI that should have been removed. Or maybe viewer_asymmetric_range was meant to be used but no interface has been created yet to toggle it.
you will see that
viewer_asymmetric_rangeexists as part of ProUI but it never changes
viewer_asymmetric_range was kept to allow to JYERSUI to use the bed_level_tools in the future but it is currently not used in ProUI.
I made some changes to this PR which should be easier to merge now. take a look at the Note in description for a small concern/issue
@thinkyhead I believe we can merge this now if you dont mind taking a quick review