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

Manual mesh levelling is not consistently displaying the value entered #217

Closed
Thinkersbluff opened this issue Mar 12, 2021 · 8 comments
Closed
Labels
area:dwin-interop Area - DWIN interop prio:low t:bug Something isn't working

Comments

@Thinkersbluff
Copy link

Thinkersbluff commented Mar 12, 2021

Description

This may be one of those float precision issues.

The absolute value of the data point entered is reduced by 0.001 for some entry values but not for others.

e.g. Enter 0.055, stored value displayed is 0.054.
Enter 0.050, stored value displayed is 0.050.
Enter -0.055, stored value displayed is -0.054

Steps to Reproduce

  1. Power on
  2. Select Level
  3. Select View mesh
  4. Tap any existing value
  5. Try to enter the same value as a replacement
  6. Most times, the absolute value of the new value is 0.001 smaller than the value entered. Some values seem to enter correctly, however.

Expected behavior:

Expect entered value to always be the stored/displayed value.

Additional Information

4.5.2 motherboard, stock TFT

CF6 Pre5 for 4.5.2 motherboard

[Provide pictures or links to videos that clearly demonstrate the issue.]
4B37C18A-1CE7-458C-96DD-0AE01606AC16
A7BA8FAA-8A97-4807-B879-D657E0FDD062
BED48866-0D58-4786-BC9A-A74C8AE17393
6594FA2C-D3FD-48ED-96DC-523F6CFBE974
559AB2BE-06B1-4F93-8E17-DA508D7C5DCD
7A306CB1-8414-4E71-BEE9-27AE3C1B1A84

@Sebazzz
Copy link
Collaborator

Sebazzz commented Mar 13, 2021

It is actually stored correctly (verify with M503). DWIN is inconsistently truncating the floats.

@Sebazzz Sebazzz added area:dwin-interop Area - DWIN interop prio:low t:bug Something isn't working labels Mar 13, 2021
@Thinkersbluff
Copy link
Author

Thinkersbluff commented Mar 13, 2021

It is actually stored correctly (verify with M503). DWIN is inconsistently truncating the floats.

Bummer. So we cannot trust the display to confirm the entry.
I hope you are able to work around that issue. Reminds me of the problem we had with Z offset “skipping” some numbers.

is DWIN also rounding the stored values reported by Marlin and displayed in the view mesh function, or is this only affecting values we modify?

@Thinkersbluff Thinkersbluff changed the title Manual mesh levelling is not consistently storing the value entered Manual mesh levelling is not consistently displaying the value entered Mar 13, 2021
@Sebazzz
Copy link
Collaborator

Sebazzz commented Mar 13, 2021

I hope you are able to work around that issue. Reminds me of the problem we had with Z offset “skipping” some numbers.

Yes, but that was different, because I used an incorrect way to blit a floating point to the display.

is DWIN also rounding the stored values reported by Marlin and displayed in the view mesh function, or is this only affecting values we modify?

Any, actually. The input is just a whole number which we divide at the firmware side (DWIN actually doesn't support true floating point input). The values as shown on the display are true floating points, because not using floating points made it even worse 😄

@Thinkersbluff
Copy link
Author

So if you defined the numbers as having four digits to the right of the decimal instead of three, and asked DWIN to display only the first three of those four digits, could you trick DWIN into only screwing around with the hidden digit?

@Sebazzz
Copy link
Collaborator

Sebazzz commented Mar 16, 2021

0.1811 shows as 0.181, but 0.1810 shows as 0.180. But.. 0.1800 also shows at 0.180.

That's DWIN in a nutshell. It is nuts.

@Thinkersbluff
Copy link
Author

Rats. I guess that should just be noted as a “known issue”, in the release notes, then, if we have no way to force the display to match the value entered.

@Sebazzz
Copy link
Collaborator

Sebazzz commented Mar 16, 2021

Known issue: You have a Creality touch screen installed.

@Sebazzz
Copy link
Collaborator

Sebazzz commented Mar 16, 2021

I had one trick left up my sleeve, this seems to to the trick

@Sebazzz Sebazzz closed this as completed Mar 16, 2021
@Sebazzz Sebazzz added this to the Community Firmware Release 6 milestone Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dwin-interop Area - DWIN interop prio:low t:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants