Flexible GUI

More
2 years 3 months ago #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 to join the conversation.

More
2 years 3 months ago #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.
 

Attachment not found



 

Attachment not found



 

Attachment not found



 

Attachment not found



 

Attachment not found



 

Attachment not found

Please Log in to join the conversation.

More
2 years 3 months ago #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:
Code:
        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

Please Log in to join the conversation.

More
2 years 3 months ago #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:

Code:
        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

Please Log in to join the conversation.

More
2 years 3 months ago #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:

Code:
        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 to join the conversation.

More
2 years 3 months ago #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 to join the conversation.

More
2 years 3 months ago #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

Please Log in to join the conversation.

More
2 years 3 months ago #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 to join the conversation.

More
2 years 3 months ago #306512 by JT
Replied by JT on topic Flexible GUI


JT

Please Log in to join the conversation.

More
2 years 2 months ago #306581 by MennilTossFlykune
Replied by MennilTossFlykune on topic Flexible GUI
This should all work:
Code:
    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()             ))

Please Log in to join the conversation.

Time to create page: 1.103 seconds
Powered by Kunena Forum