Flexible GUI

More
06 Jul 2024 13:51 #304541 by blazini36
Replied by blazini36 on topic Flexible GUI
lol it's one page back in this thread, you replied to it.

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

More
07 Jul 2024 03:08 - 07 Jul 2024 03:12 #304561 by tlightus
Replied by tlightus on topic Flexible GUI
Almost ready for prime time it seems. This one is a dark theme targeted for the RPI touch screen. Shown is the dark mode and available are standard buttons, light and dark touch screen. Included as part of the examples files.
 

 

 

 

 

 
Attachments:
Last edit: 07 Jul 2024 03:12 by tlightus. Reason: added where to find them
The following user(s) said Thank You: tommylight, stefan63

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

More
28 Jul 2024 23:36 - 28 Jul 2024 23:42 #306293 by MennilTossFlykune
Replied by MennilTossFlykune on topic Flexible GUI
In the plot widget, to automatically reload a file when an offset has changed you could maybe use the fingerprint
For example:
        fingerprint = (self.logger.npts,
        self.soft_limits(),
        s.actual_position,
        s.motion_mode,
        s.current_vel,
        s.joint_actual_position,
        s.homed,
        s.limit,    
        s.tool_in_spindle,             
        s.g5x_offset,
        s.g92_offset,
        s.rotation_xy,
        s.tool_offset)

        if fingerprint[9:12] != self.fingerprint[9:12] or s.file != self._current_file:
            if self.display_loaded:
                self.load()

        if fingerprint != self.fingerprint:
            self.fingerprint = fingerprint            
            self.update()
files.catbox.moe/5km48d.mp4
Last edit: 28 Jul 2024 23:42 by MennilTossFlykune. Reason: couldn't embed video
The following user(s) said Thank You: blazini36, JT

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

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
29 Jul 2024 13:55 - 29 Jul 2024 14:21 #306330 by JT
Replied by JT on topic Flexible GUI

In the plot widget, to automatically reload a file when an offset has changed you could maybe use the fingerprint
For example:

        fingerprint = (self.logger.npts,
        self.soft_limits(),
        s.actual_position,
        s.motion_mode,
        s.current_vel,
        s.joint_actual_position,
        s.homed,
        s.limit,    
        s.tool_in_spindle,             
        s.g5x_offset,
        s.g92_offset,
        s.rotation_xy,
        s.tool_offset)

        if fingerprint[9:12] != self.fingerprint[9:12] or s.file != self._current_file:
            if self.display_loaded:
                self.load()

        if fingerprint != self.fingerprint:
            self.fingerprint = fingerprint            
            self.update()
files.catbox.moe/5km48d.mp4

Can you share the whole code for what I saw in the video? For some reason the plot is not moving when I set an offset. The xyz origin marker is the only thing that moves...

JT
Last edit: 29 Jul 2024 14:21 by JT.

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

More
29 Jul 2024 19:40 #306356 by blazini36
Replied by blazini36 on topic Flexible GUI

In the plot widget, to automatically reload a file when an offset has changed you could maybe use the fingerprint
For example:

        fingerprint = (self.logger.npts,
        self.soft_limits(),
        s.actual_position,
        s.motion_mode,
        s.current_vel,
        s.joint_actual_position,
        s.homed,
        s.limit,    
        s.tool_in_spindle,             
        s.g5x_offset,
        s.g92_offset,
        s.rotation_xy,
        s.tool_offset)

        if fingerprint[9:12] != self.fingerprint[9:12] or s.file != self._current_file:
            if self.display_loaded:
                self.load()

        if fingerprint != self.fingerprint:
            self.fingerprint = fingerprint            
            self.update()
https://files.catbox.moe/5km48d.mp4
 

Any chance you can share the whole configuration you have shown in your post a couple pages back? That looks pretty good. I've been pecking at a Flex UI for a bit but haven't gotten very far yet.

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

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
29 Jul 2024 22:20 #306367 by JT
Replied by JT on topic Flexible GUI
Ok, I did figure out that I can't test the plotter with a sim running. Everything works as it should when I run from installed.

I still would like to look at your code if possible.

JT

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

More
30 Jul 2024 00:00 - 30 Jul 2024 00:06 #306370 by MennilTossFlykune
Replied by MennilTossFlykune on topic Flexible GUI
I wanted to be able to test it in qtdragon so it's PyQt5 instead
This one does work as a standalone window
Attachments:
Last edit: 30 Jul 2024 00:06 by MennilTossFlykune. Reason: attached wrong file
The following user(s) said Thank You: JT

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

More
30 Jul 2024 23:52 #306451 by MennilTossFlykune
Replied by MennilTossFlykune on topic Flexible GUI

Any chance you can share the whole configuration you have shown in your post a couple pages back? That looks pretty good. I've been pecking at a Flex UI for a bit but haven't gotten very far yet.

I don't think I have it anymore. It was based on Persei8's QtDragon version but when the plotter stuff is all working I'll modify the standard QtDragon UI instead.

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

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
31 Jul 2024 12:20 #306512 by JT
Replied by JT on topic Flexible GUI


JT
The following user(s) said Thank You: tommylight, MennilTossFlykune

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

More
01 Aug 2024 04:24 #306581 by MennilTossFlykune
Replied by MennilTossFlykune on topic Flexible GUI
This should all work:
    view_controls = {
        'view_rotate_up_pb': ('rotateView', 0, -10),
        'view_rotate_down_pb': ('rotateView', 0, 10),
        'view_rotate_left_pb': ('rotateView', 10, 0),
        'view_rotate_right_pb': ('rotateView', -10, 0),
        'view_pan_up_pb': ('panView', 0, 10),
        'view_pan_down_pb': ('panView', 0, -10),
        'view_pan_left_pb': ('panView', 10, 0),
        'view_pan_right_pb': ('panView', -10, 0),
        'view_zoom_in_pb': ('zoomin',),
        'view_zoom_out_pb': ('zoomout',),
        'view_clear_pb': ('clear_live_plotter',)
    }

    for key, value in view_controls.items():
        if key in parent.children:
            button = getattr(parent, key)
            if len(value) == 3:
                method, vertical, horizontal = value
                button.clicked.connect(lambda _, m=method, v=vertical, h=horizontal: (
                    getattr(parent.plotter, m)(vertical=v, horizontal=h)
                ))
            elif len(value) == 1:
                method = value[0]
                button.clicked.connect(lambda _, m=method: (
                    getattr(parent.plotter, m)()
                ))   
            
    views = {
        'view_p_pb': 'p',
        'view_x_pb': 'x',
        'view_y_pb': 'y',
        'view_y2_pb': 'y2',
        'view_z_pb': 'z',
        'view_z2_pb': 'z2'
    }

    for key, value in views.items():
        if key in parent.children:
            button = getattr(parent, key)
            button.clicked.connect(lambda _, v=value: (
                parent.plotter.makeCurrent(),
                setattr(parent.plotter, 'current_view', v),
                parent.plotter.set_current_view()
            ))
The following user(s) said Thank You: JT

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

Time to create page: 0.272 seconds
Powered by Kunena Forum