Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved Status Area for DWIN Display #20983

Merged
merged 11 commits into from
Feb 12, 2021

Conversation

Jyers
Copy link
Contributor

@Jyers Jyers commented Feb 3, 2021

Description

An improved status area for the Ender 3 V2 DWIN LCD display.

This is a small portion of a complete rewrite I have done for the DWIN display, which is why it contains a couple new global variables which will come into use as I submit more aspects of the rewrite in future PRs.

20210203_010111

Requirements

An Ender 3 V2 with its stock DWIN Display

Benefits

Significantly more information in the status area of the display. Including flow rate, fan speed, and the current x, y, and z axis coordinates.

Configurations

Ender 3 V2 Config.zip

@Jyers Jyers changed the title Improved Status Area Improved Status Area for DWIN Display Feb 3, 2021
@ETE-Design
Copy link
Contributor

@Jyers Mabye you could look at #19371 and make a complere rewrite to make if work perfect with Marlin features?

@Jyers
Copy link
Contributor Author

Jyers commented Feb 3, 2021

@ETE-Design What I have already written should be able to be adapted to tie into the marlin UI features, so as time goes on I will most likely slowly migrate the features to the marlin UI framework.

Copy link
Contributor

@CRCinAU CRCinAU left a comment

Choose a reason for hiding this comment

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

Other than the two comments - I have no other objections to this code. I have tested and it seems to do exactly what it states - which is a good addition to the DWIN ecosystem.

Marlin/src/lcd/dwin/e3v2/dwin.cpp Outdated Show resolved Hide resolved
if (current_position.z != z) {
z = current_position.z;
DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 205, 459, current_position.z * 10);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

On the downwards part of a G29 probe, I noticed that the Z value hit 726.4. I'm not exactly sure why this is the case. Someone might be able to enlighten us here.

@CRCinAU
Copy link
Contributor

CRCinAU commented Feb 9, 2021

@thinkyhead - I'm trying to apply this to the current bugfix to test the changes, but it seems things are a bit confused. I normally grab a patch of the PR by adding .patch to the end of the URL, which gives me:
https://github.com/MarlinFirmware/Marlin/pull/20983.patch

When I apply this patch, a ton of it fails.

 $ patch -p1 < ../../20983.patch 
patching file Marlin/src/lcd/dwin/e3v2/dwin.cpp
Hunk #1 succeeded at 203 (offset -4 lines).
Hunk #2 FAILED at 1535.
Hunk #3 FAILED at 1580.
Hunk #4 FAILED at 1803.
3 out of 4 hunks FAILED -- saving rejects to file Marlin/src/lcd/dwin/e3v2/dwin.cpp.rej
patching file Marlin/src/lcd/dwin/e3v2/dwin.cpp
Hunk #1 FAILED at 1593.
Hunk #2 FAILED at 1632.
Hunk #3 FAILED at 1874.
3 out of 3 hunks FAILED -- saving rejects to file Marlin/src/lcd/dwin/e3v2/dwin.cpp.rej
patching file Marlin/src/lcd/dwin/e3v2/dwin.cpp
Hunk #2 succeeded at 1541 (offset 23 lines).
Hunk #3 FAILED at 1590.
Hunk #4 FAILED at 1859.
2 out of 4 hunks FAILED -- saving rejects to file Marlin/src/lcd/dwin/e3v2/dwin.cpp.rej

Do you have any suggestions on how to fix this? I can't say I've had this problem before - but maybe from additional commits that were then shifted elsewhere?

@thinkyhead
Copy link
Member

thinkyhead commented Feb 9, 2021

I'm trying to apply this to the current bugfix to test the changes

I generally just use git plus GitHub Desktop when I want to compare things. So first I might just look at the differences between this PR and the current bugfix code…

git fetch upstream
git checkout upstream/bugfix-2.0.x -b changes_from_20983
git diff HEAD pr/20983 | git apply

Anyway, all you really need to do is check out the PR directly, because it is already applied to the current bugfix-2.0.x. If you wanted to bring that up to date after more commits are added to bugfix, you can just use git merge upstream/bugfix-2.0.x.

If you have the branch checked out and all you want to do is see the differences in isolation, or squashed to a single commit, you could use…

git checkout pr/20983 ;# as checked out by Github Desktop
git fetch upstream
git merge upstream/bugfix-2.0.x ;# latest commits
git reset upstream/bugfix-2.0.x ;# differences in isolation

@CRCinAU
Copy link
Contributor

CRCinAU commented Feb 11, 2021

@thinkyhead - Thanks I'm pretty sure I got this right. So from a UI perspective, the only thing I see that doesn't work atm is the ???.? and blink parts.

Is that expected with the current status?

@mriscoc
Copy link
Contributor

mriscoc commented Feb 12, 2021

Thank you for your PR I applied it successfully to my fork.

@thinkyhead
Copy link
Member

the only thing I see that doesn't work

The logic to blink the positions is similar to that used for other displays. If it's not working now then it can be adjusted. I need to flash and test some other things on the Ender-3 V2 so I will test these updates shortly.

In the long run, of course, we want to get rid of the custom menu code in dwin.cpp and replace it with MarlinUI. The PR for that is almost working over at #19371.

@thinkyhead thinkyhead merged commit 3c41f10 into MarlinFirmware:bugfix-2.0.x Feb 12, 2021
kpishere pushed a commit to kpishere/Marlin that referenced this pull request Feb 19, 2021
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
vyacheslav-shubin pushed a commit to vyacheslav-shubin/Marlin that referenced this pull request Mar 10, 2021
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
vyacheslav-shubin pushed a commit to vyacheslav-shubin/Marlin that referenced this pull request Mar 10, 2021
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
W4tel-BiDi pushed a commit to W4tel-BiDi/Marlin that referenced this pull request Apr 5, 2021
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
thinkyhead added a commit that referenced this pull request Apr 30, 2021
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
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.

6 participants