Move pyvcp location to bottom for portrait display

More
23 Feb 2020 07:32 #158279 by sdwyer
Hi,

I'm looking to change my monitor orientation from Landscape to portrait so I can mount it on the side of my enclosure.

I'm using the Axis UI and have developed a ppvcp panel that sits in the default right side of the Axis display.

Is it possible to move the pyvcp location to the bottom either below or above the gcode window?
This would make a vertical display a more feasible option for me.


Cheers!
-Shaun

Please Log in or Create an account to join the conversation.

More
23 Feb 2020 15:08 #158300 by cmorley
There is not an easy way to do this - it requires code changes - which may be possible using the .axisrc capability.
Just wait and maybe the AXIS guru will help you out...

Chris

Please Log in or Create an account to join the conversation.

More
24 Feb 2020 04:24 #158356 by phillc54
Unfortunately because the relevant code is not in a function it cannot be changed from .axisrc

It is a simple code change in axis.py from:
3797        f = Tkinter.Frame(root_window)
3798        f.grid(row=0, column=4, rowspan=6, sticky="nw", padx=4, pady=4)
3799        vcpparse.filename = vcp
to:
3797        f = Tkinter.Frame(root_window)
3798        f.grid(row=4, column=0, columnspan=6, sticky="nw", padx=4, pady=4)
3799        vcpparse.filename = vcp

A neater way would be to change it to:
3797        f = Tkinter.Frame(root_window)
3798        if inifile.find("DISPLAY", "PYVCP_POSITION") == "BOTTOM":
3799            f.grid(row=4, column=0, columnspan=6, sticky="nw", padx=4, pady=4)
3800        else:
3801            f.grid(row=0, column=4, rowspan=6, sticky="nw", padx=4, pady=4)
3802        vcpparse.filename = vcp
and have an optional PYVCP_POSITION in the [DISPLAY] section of the ini file requiring BOTTOM to effect the change.

Attached image is with the pyvcp-demo sample and would need to be reconfigured to suit the placement

Note that the line numbers above are correct for master branch.
Attachments:
The following user(s) said Thank You: nkp, tommylight, meister, sdwyer

Please Log in or Create an account to join the conversation.

More
24 Feb 2020 08:59 #158360 by tommylight
Neat ! :)
Thank you.

Please Log in or Create an account to join the conversation.

More
24 Feb 2020 09:31 #158363 by sdwyer
Hi Phill,

Thankyou! This looks really good! Do you think this is something that might be worth committing to the tree? I'm sure I'm not the only one who would benefit from this code.

Cheers!
-Shaun

Please Log in or Create an account to join the conversation.

More
24 Feb 2020 09:41 - 25 Feb 2020 02:14 #158364 by phillc54
It probably is worth committing at least into master, it shouldn't break any existing configs.

Edit: github.com/LinuxCNC/linuxcnc/pull/685
Last edit: 25 Feb 2020 02:14 by phillc54.
The following user(s) said Thank You: sdwyer

Please Log in or Create an account to join the conversation.

More
03 Mar 2020 21:55 - 03 Mar 2020 23:59 #159118 by phillc54
Chris has merged this into master and will put it in 2.8 later. 2.8

linuxcnc.org/docs/devel/html/gui/pyvcp.html#sec:pyvcp-with-axis

There is also an example configuration.
Last edit: 03 Mar 2020 23:59 by phillc54. Reason: update
The following user(s) said Thank You: tommylight, roland

Please Log in or Create an account to join the conversation.

Time to create page: 0.070 seconds
Powered by Kunena Forum