[solved]Axis for 800x480 screen w/ usercommand

More
28 Apr 2022 22:56 #241580 by andypugh
That's quite cute. Though I rather feel that tiny screens are a false economy.

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

More
04 May 2022 00:37 #241956 by cakeslob

Proposal for forum.linuxcnc.org/21-axis/38188-solved-...mand?start=20#217294

 



thats what I have been trying to do since I started. layout wise it makes sense regardless of screen size,

The problem Im having is I cannot move the gcode widget to the tabs portion. Thats why I have the button on the side to switch from manual to gcode. otherwise I have a screen that is exactly that sans the tabs, it took me a little to realize it was photoshopped. Ill post the version closest to your proposal, I just need to update it to python3.

Not that it cannot be done, but my project is based in usercommand file for versatility , and modifying axis at a source level would mean maintaining it every update, and its a pain in he ass for users if theres a version mismatch. Something Im not willing to do. I draw a hardline at the usercommand file.

To make it work in usercommand file, I think the gcode widget would need to be remade as a new widget, and placed into the tab as a new widget. A considerable undertaking with my computer ability, because there is a lot going on in the gcode window.

Unless a pro knows how we can somehow clone/mirror/parallel a widget inside of tkinter, like something that would re-direct everything from gcode old to gcode new.

That's quite cute. Though I rather feel that tiny screens are a false economy.


Thats only the case if cost is your main metric, or if you are using a pc. Size is my main metric because most of my machines fit inside a 300x300mm footprint. and older/basic pc monitors only support vga
The following user(s) said Thank You: HansU

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

More
08 May 2022 09:54 #242295 by HansU

Not that it cannot be done, but my project is based in usercommand file for versatility , and modifying axis at a source level would mean maintaining it every update, and its a pain in he ass for users if theres a version mismatch. Something Im not willing to do. I draw a hardline at the usercommand file.


I agree on that.

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

More
09 May 2022 02:25 - 09 May 2022 04:04 #242343 by phillc54

To make it work in usercommand file, I think the gcode widget would need to be remade as a new widget, and placed into the tab as a new widget. A considerable undertaking with my computer ability, because there is a lot going on in the gcode window.


Most widgets that appear in the widget list can be "moved" by recreating the list:

github.com/LinuxCNC/linuxcnc/blob/3b17ed...cripts/axis.py#L1314

The gcode text needs a bit more work than most because widget.text is assigned as t so it needs reassigning after creating the new widget. The following code shows this way of moving the gcode text to a new auto tab:
Warning: Spoiler!


I must admit that I have not spent a lot of time testing but it appears to work ok.
Last edit: 09 May 2022 04:04 by phillc54. Reason: Remove a redundant line
The following user(s) said Thank You: cakeslob, HansU

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

More
09 May 2022 03:58 #242347 by cakeslob
Phil, you wizzard, thank you so much! Thats a gamechanger for me. Just gonna start from scratch around this now.
Everything works great so far, all the gcode scrolling things i use are all normal, the only issue was it loads the default gcode into bottom.t.text, and you can run the file without anything showing up on the new gcode window. This got fixed when I added the optional loadlast file portion, so now it loaded the default gcode into the new window the same as before


I see, I didnt have to move or redirect bottom.t.text, just change the widget list to the new one, and redo all the bindings/config
The first part I get, its making the new tab, making the new text
The third part I get, its redoing all the configs and key binds and stuff
The second part I love and would not have got in a million years
# create a new widget list so we can "move" the gcode text
widget_list_new = []
for widget in widget_list:
    if '.t.text' in widget[2]:
        widget = ('text', Text, '.pane.top.tabs.fauto.t.text')

Ok awesome this part I understand and I love, so you changed the third item down on the widgets list to be the new text widget
    widget_list_new.append(widget)
    widget_list_new.append(('buttonFrame', Frame, '.fbuttons'))
widgets = nf.Widgets(root_window,*widget_list_new)

Now you change widgets to the new appended widgets list, Im pretty sure I understand whats going on.....
The part I dont understand is the button frame. I recognize that from plasmac, so did that also add it to the widget list?
The following user(s) said Thank You: phillc54

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

More
09 May 2022 04:01 #242348 by phillc54
Oops, the button frame can go, it is just part of something I am playing around with for a Pi4.
 
The following user(s) said Thank You: cakeslob

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

More
09 May 2022 04:52 #242352 by cakeslob
no no, please
what i wanted for this project from the start was gcode in the tabs for size, and then copy everything from plasmac to make it 'regular'mac with the button frame and the orientation stuff. And the gcode search thing. Thanks again


I need to work on the size but heres what I got, the same thing you posted + loadlast to fix initial loaded file, only for 2.9
Attachments:

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

More
09 May 2022 05:00 #242354 by phillc54
That looks good, I did similar with the active gcodes and moved them down to the "status bar".

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

More
11 May 2022 03:33 #242567 by cakeslob
Im surprised how fast everything came into the right size, I only needed to add like 15 lines. Need to fix a few things, and I cannot remember shit how I did everything the first time, trying to get it to resize automatically is now the hard part. it resizes it self once you click the window, but not load to size. Without re/moving to much, everything came out at 740x470 so far. Big thanks again to phil.

Attachments:
The following user(s) said Thank You: HansU

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

More
11 May 2022 05:44 #242572 by HansU
This looks really great now and should definitely go in master.
I would suggest to add it as a sample configuration for axis.
Cakeslob would you like to commit it yourself, or would you like someone else to do that?

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

Time to create page: 0.225 seconds
Powered by Kunena Forum