Welcome! Log In Create A New Profile

Advanced

Show live Z while Tramming

Posted by Naternoris 
Show live Z while Tramming
September 19, 2022 12:28PM
Hi, I'm not much of a programmer but I've been trying to change the menu screen to display a live z position while trimming. I think it'd be useful. Could someone point me in the right direction? I think it's the Z_axis variable but I'm not sure and I'm not sure where to put it. lol
Re: Show live Z while Tramming
September 19, 2022 01:05PM
It seems I want to edit the LCD menu for trimming current_position.z is the variable and I have to convert it to a string but I'm unsure if I can make it update continuously. If I figure it out I'll post it.
Re: Show live Z while Tramming
September 19, 2022 04:52PM
Not Exactly what I wanted but I edited the menu_bed_corners.cpp file.

There is a line in there that displays the previous Z position. I found that it was calculated from the current_position.z variable and that it was nested in a function called _lcd_draw_probing().

That function is called with this line of code:

ui.refresh(LCDVIEW_REDRAW_NOW);
_lcd_draw_probing();

So, I changed the code to draw the current_position.z instead if the: (LAST_Z_TO_STR(last_z)) With: ftostr53_63(current_position.z)
and I rather hackily added the ui.refresh command just above where it was called originally in the: void _lcd_test_corners() function.

Now when it is testing the corners, it shows the z position as its testing, when it tests, so you can determine if you need to raise or lower the bed.

kinda wanted a live view and maybe a static readout of some kind but my programming knowledge is a bit lacking. If anyone knows how to do this better I'd appreciate it.

Thanks.
Sorry, only registered users may post in this forum.

Click here to login