bigtreetech / BIGTREETECH-TouchScreenFirmware

support TFT35 V1.0/V1.1/V1.2/V2.0/V3.0, TFT28, TFT24 V1.1, TFT43, TFT50, TFT70
GNU General Public License v3.0
1.3k stars 1.64k forks source link

Feature probe level corner #1742

Closed Cal1sto closed 3 years ago

Cal1sto commented 3 years ago

Requirements

New Feature request to have the Marlin function of Level Corner on the TFT with more function and for best leveling experience with a probe.

Description

The Level corner function added in ABL menu give the potentiality to quick level the bed by measuring with the probe the 4 corner and adjust it, the tested point could be adjusted like the manual leveling

Benefits

Easy and very quick bed leveling could be performed with this function and usefull for bed level check.

Function

Level corner (L corner): give you the following function , it will probe all the 4 corners , display the Z value measured on each corner, then you could adjust each corner individualy and you could use your own tolerance based on the probe precision that you could get with the M48 . You could scan all corner again and again or check and adjust individualy the 4 corners in cross adjustement or linear adjustement manually. Like the manual leveling function you have also the possibility to set the corner position test, this is limited already with a minimum value set depending of the probe offset to the nozzle to reduce the risk the printing head is not going outside the X and Y bed area, set a reasonable lowest value to measure nearest the 4 corners leveling screw of the bed (default value will be set automatically on the lowest possible offset based on the probe offset to be accurate and optimal).

Implements / Resolves

resolves #1646 resolves #1102 resolves #549

oldman4U commented 3 years ago

Nice👍🏻

Cal1sto commented 3 years ago

LevelCorner.c and LevelCorner.h replace the old implementation in ABL.c and ABL.h done on the old Master state before change with BedLevelingLayer2.c and BedLevelingLayer2.h -- > remove from this request both ABL.c and ABL.h

oldman4U commented 3 years ago

Hi Cal1sto.

Would it be possible to reduce the number of different icons used for this functionality, or to use Icons which are already available? There are point_1 to point_5 bmp's available today which do the same but only without the sensor.

This would be great, thank you

Cal1sto commented 3 years ago

Hi oldman4U,

I understood why (limited free space), i will check if i could move the measured value bellow the icone, and find a way to clear the label area to display the value change.

Cal1sto commented 3 years ago

Hi oldman4U,

Only one new icone left the levelcorner.bmp all other replaced with the leveling one "POINT_1" .... LevelCorner.c, menu.c and icon_list.inc updated / adapted for the new text location

Guilouz commented 3 years ago

I redesigned icons to stay in the same spirit as the others.

Sans titre-1

Level Corner BMP.zip

Cal1sto commented 3 years ago

New icone proposal fron Guilouz added

bigtreetech commented 3 years ago

Hello, I'm going to release a new stable version of firmware on this weekend(3/21), so major changes won't be merged into the main branch for the time being. When the new version is released, I will merge this PR immediately.

Cal1sto commented 3 years ago

Thanks bigtreetech i will inform the community about this good news , take care and have great time

Cal1sto commented 3 years ago

The bmp delivered by Guilouz, was defect and could not be read during the import(update) on the device, i open it and just save it in same location, after that the bmp format was ok.

Guilouz commented 3 years ago

The bmp delivered by Guilouz, was defect and could not be read during the import(update) on the device, i open it and just save it in same location, after that the bmp format was ok.

Very strange, they are exported in bmp 24 bits from photoshop

Cal1sto commented 3 years ago

Yes i saw that it's very strange (Je sait j'ai vue cela) , I use GIMP for this type of purpose and he was able to read it, but strange he generate 66 bytes more .

Guilouz commented 3 years ago

Yes i saw that it's very strange (Je sait j'ai vue cela) , I use GIMP for this type of purpose and he was able to read it, but strange he generate 66 bytes more .

I will try your PR tonight, i will see the issue with bmp files, they must have all the same size.

Cal1sto commented 3 years ago

I found why i provide 66 bytes more and why you provide 2 byte more at the end of the file i commit now the last fully correct files that is readable, and standard. image

oldman4U commented 3 years ago

@Acenotass @AntoszHUN @bepstein111

One Icon more, sorry.

But like BTT wrote, there is no need to hurry, as all new features will be released next week, once the new firmware is available.

Thank you all!

Cal1sto commented 3 years ago

Files restored from source repository, No change to be performed on Configuration.h, platformio.ini, ABL.c and ABL.h

AntoszHUN commented 3 years ago

@Acenotass @AntoszHUN @bepstein111

One Icon more, sorry.

But like BTT wrote, there is no need to hurry, as all new features will be released next week, once the new firmware is available.

Thank you all!

I do not see. What icon? What is the name?

oldman4U commented 3 years ago

Look what Guilouz wrote and attached yesterday.

Cal1sto commented 3 years ago

Please could someone advise how to remove the ABL.c, ABL.h, Configuration.h and platformio.ini from this PR, there is no change on this files, i replace all this from origin master, but still on some strange difference :

digant73 commented 3 years ago

Please could someone advise how to remove the ABL.c, ABL.h, Configuration.h and platformio.ini from this PR, there is no change on this files, i replace all this from origin master, but still on some strange difference :

  • New line (char) at the end of the files
  • ABL.c Diff not reflecting the reality ? Or wrong compare result ?

I only see ABL.c now. Just restore the current BTT file

digant73 commented 3 years ago

@Cal1sto if I'm not wrong your PR implements FR #1646, so please at the end of the PR description report the following line:

resolves #1646

Cal1sto commented 3 years ago

@digant73 Thanks yes it seems a request related and matched with the FR #1646, PR description updated.

Cal1sto commented 3 years ago

@bigtreetech You could merge this PR, the conflict resulted to other merge are now solved. thanks

Guilouz commented 3 years ago

Just try your PR and it's not working as expected for me...

When I clic on L Corner icon, probing run directly and points 2 and 4 are always in error, can do nothing on the screen and freeze after a while. This process never stops, probe of the 4 corners turns in a loop.

Here a video of this issue : https://www.youtube.com/watch?v=Miibz6StZao

With level bed corner from Marlin I don't have issue : https://www.youtube.com/watch?v=FMbsn1hwxnU

EDIT : Issue fixed with last commit.

Cal1sto commented 3 years ago

LevelCorner.c now with the fix of the G30 modified in last Marlin bug fix release https://github.com/MarlinFirmware/Marlin/pull/20437 TouchMi will use the G30 E0 and other Probe like BL-Touch the G30 E1

Cal1sto commented 3 years ago

In preparation i will add M48 to have a visual view on the probe accuracy on this page level to help in precision decision.

Cal1sto commented 3 years ago

M48 added in this menu Level corner

Cal1sto commented 3 years ago

Due that the M48 made motor off i add the M17 call to made motor on, on X, Y and Z

Guilouz commented 3 years ago

PR tested and working but a small graphical issue, text overflows from icon on TFT43

162471021_2049340218546818_1918169376129697798_n

Cal1sto commented 3 years ago

@Guilouz Please check again on your TFT43, should look better now , moved the text up and made only 1px shadow. Better than creating a new icon for this single function.

Guilouz commented 3 years ago

@Guilouz Please check again on your TFT43, should look better now , moved the text up and made only 1px shadow. Better than creating a new icon for this single function.

There is still 1 pixel too much to the left and there the text overlaps the BLTouch icon.

Cal1sto commented 3 years ago

20210324_223112 Last solution, hope final generic proposition on a TFT28 should now also be good on other screen size or icon size

oldman4U commented 3 years ago

Maybe you want to give it a try to put the 4 blue buttons in the upper row and everything else below. Doing so it would be easier to "find" the buttons without looking too much onto the screen.

Maybe you covered this topic before: Why are the number much closed to the buttons than the text elements?

Just my 2 cents

Guilouz commented 3 years ago

Perfect on TFT43

6E5649CD-0799-49DD-B2B4-4983C2F3386A

Cal1sto commented 3 years ago

20210325_011708 Adjusted with same procedure as the one used for displaying label, should now be same position as the one for Label for all display

Cal1sto commented 3 years ago

Maybe you want to give it a try to put the 4 blue buttons in the upper row and everything else below. Doing so it would be easier to "find" the buttons without looking too much onto the screen.

Maybe you covered this topic before: Why are the number much closed to the buttons than the text elements?

Just my 2 cents

For the 4 corners blue (cyan) icons, this disposition on the screen is spacialy the same as the bed front of the user and therefore intuitive. For this reason i will suggest to let it like that.

Cal1sto commented 3 years ago

Added M18 S0 X Y Z to reduce the risk when MARLIN is not set without stepper timeout, that user could not after an inactivity time move the axis, should also be integrated in Z-align procedure to reduce the move of the Z-axis after timeout is falling.

Cal1sto commented 3 years ago

Added after G34 (Z-Alignment) the call of M18 S0 X Y Z , to reduce the risk when Marlin is not compiled with no timeout on the stepper that the Axes could move.

Cal1sto commented 3 years ago

Added value refresh that was missing after setting new corner offset point.

Cal1sto commented 3 years ago

So nothing else to add there, is everything so far tested and ready , enjoy

Cal1sto commented 3 years ago

@bigtreetech So far ready

Cal1sto commented 3 years ago

Last fine tuning to force coordinate init on going into "L Corner", to reduce risk because the coordinateIsKnown() function is not accurate when motor are off over Marlin or other function.

digant73 commented 3 years ago

@Cal1sto if I can suggest a layout, I would move:

Cal1sto commented 3 years ago

@digant73 Yes good idea it is done

Cal1sto commented 3 years ago

We are testing, the last change , is not validated yet

Cal1sto commented 3 years ago

Last menu function reordering is tested and worked, like expected

ETE-Design commented 3 years ago

@Cal1sto There seems to be 2 different ways to do the messuring in Marlin, one mesure each point one time and give the result at the end... The other messure 1 point and set it to be the "Zero" Point, move to the next, mesure it and show the result, then you adjust it, then it messure again, you can keep on messure and adjust each point before go to the next, that way you can adjust on the go to get best result... Also if using solution two would it be possible to show "live" messurement if using an inductive / capasitive sensor instead of an BLTouch...

Cal1sto commented 3 years ago

@ETE-Design The idea of the current implementation is to get from the mesured Z = 0 initialized with the Home (G28), the corner level , and adjust each on arround 0.01 precision, what is mostly enought . To be generic this implementation should work with all the probe able to give good accurency (see M48 function icon). So the solution provided here take the zero Z point on middle and display the difference on each corner. About inductive/capasitive sensor this should work if the accurency (precision) of the probe is enought, for this you could check it by pressing the M48 icons, what do you mean with live messurement, the live messurement is done when you press the start button.

ETE-Design commented 3 years ago

@Cal1sto So to understand it right it stop at each corner and let you level it before it goes to the next corner? About "Live" Messurement I was thinking about letting the sensor stand over one corner when you level it, then let the Inductive / Capasitive sensor messure all the time since it dosen't need to raise / lower the probe to messure as long as the bed is close enough it will be possible to see the exact messurement all the time... This is of cause not possible with a BLTouch since the probe need to touch the bed each time to get the messurement.

Cal1sto commented 3 years ago

@ETE-Design I make it generic and simple enought to all user, i do not integrate a logic analysis depending on the accurency of the probe to make this automatismus, an automatismus will be great with a motor on each screw that is yet not used on mostly printer. Therefore this version will be integrated like it is , and when you use it like i did you will be happy to have the possibility to make your bed in a better leveling state than the paper mode leveling. Try and enjoy.