Axis 2 - touchscreen version of old friend

More
18 Sep 2021 16:45 #221025 by 109jb
Very cool. Will it scale for different display resolutions?

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

More
11 Apr 2022 18:17 - 25 Sep 2022 18:45 #239950 by zack
Can doif we read the w
Attachments:
Last edit: 25 Sep 2022 18:45 by zack.

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

More
11 Apr 2022 18:21 - 23 Oct 2022 11:18 #239953 by zack
    After some thought I Can also rework layout if screen is less than say 640 by 480 for these very inexpensive touch screenshey Phil C or  John Thornton - can we push this to master??
Attachments:
Last edit: 23 Oct 2022 11:18 by zack. Reason: Afterthought
The following user(s) said Thank You: tommylight

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

More
27 Apr 2022 09:44 #241365 by HansU
Yes would be great to have this in master. Axis 2 as name for this fits well I think as it is a further development of Axis.

But it would also be nice to have an Axis version that looks almost like the normal Axis but scalable down to 800x480 like one of these here: forum.linuxcnc.org/21-axis/38188-solved-...w-usercommand#169617

And maybe also a "Axis small touchy" like this: forum.linuxcnc.org/21-axis/38188-solved-...mand?start=20#217855
Hard to decide, because they are all are looking great.

Maybe first could be named named axis_small and latter axis_touch(y) ?

What do you think?
 

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

More
28 Apr 2022 22:54 #241579 by andypugh

hey Phil C or  John Thornton - can we push this to master??

Possibly. My only concern would be ongoing support.

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

More
29 Apr 2022 01:44 #241597 by cmorley
if any one is willing to work on the qt version of AXIS - I would maintain it afterwards.

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

More
26 May 2022 15:46 #243908 by zack
i will be around for a long while and will support it but not every week maybe monthly

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

More
28 May 2022 00:57 #244036 by cakeslob
Hey, I tried installing this, but it looks like you are using a pretty old version of 2.9 , so glcanon breaks, and axis breaks. I recommend using usercommand file if possible.

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

More
29 May 2022 06:16 #244101 by zack
Hi cakeslob
I will have a deep dive into this.
Did u put the axis2.py file etc in there respective folders with elevated privileges?

User command file as in a axis.src file will not allow a timer and certain highlighted areas when in pause and run etc
This was a request by a user

I chose to continue in tcl since it is pretty simple and axis is Rock solid I really want to maintain this simplicity and reliability.
I think the files including icons are less than 400kB

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

More
29 May 2022 19:30 - 29 May 2022 19:35 #244145 by cakeslob
I dont think you need to do a deep dive, you can do a fairly shallow dive. On quick inspection your axis versions and glcanon versions are over a year old. They make reference to python2 and have python2/3 work arounds, as well as both files still calling on minigl, which was changed to opengl and glu last august , so before I can even try, glcanon breaks everything.
I use RIP, install so its pretty easy, but I also dont know if 2.9 is using the python2.7 lib anymore either

original glcanon | axis2 glcanon

from OpenGL.GL import * | from minigl import *
from OpenGL.GLU import * |
import itertools |
| 'cone_xy_alpha': 1/4.,
| 'cone_uv_alpha': 1/4.,
| 'axis_z_alpha': 1/4.,
| 'overlay_foreground_alpha_xy': 1/3.,
| 'overlay_background_alpha_xy': 1/3.,
'overlay_alpha': 0.75, | 'overlay_alpha': 0.35,
'tool_alpha': 0.20, | 'tool_alpha': 0.50,
geometry_chars = "XYZABCUVW-!;" | geometry_chars = "XYZABCUVW-!"
buffer = glRenderMode(GL_RENDER) | buffer = list(glRenderMode(GL_RENDER))
min_depth, max_depth, names = (buffer[0].near, buffer[0].far, buffer[0].names) | min_depth, max_depth, names = min(buffer)
for x in buffer: |
if min_depth < x.near: |
min_depth, max_depth, names = (x.near, x.far, x.names) |
| glEnable(GL_BLEND);
| glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
|
|
|
| glEnable(GL_BLEND);
| glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
|
| glLoadIdentity ();
| glMatrixMode (GL_PROJECTION);
| glPushMatrix ();
| glLoadIdentity ();
|
| glDisable(GL_DEPTH_TEST);
|
| glBegin (GL_QUADS);
| glColor3f(0.1,0.1,0.125); # bottom left color
| glVertex3f (-1.0, -1.0, -1.0);
| glVertex3f (1.0, -1.0, -1.0);
|
| glColor3f(0.08,0.08,0.4); # top right color
| glVertex3f (1.0, 1.0, -1.0);
| glVertex3f (-1.0, 1.0, -1.0);
| glEnd ()
|
| glEnable(GL_BLEND);
| glEnable(GL_LIGHTING);
| glEnable(GL_DEPTH_TEST);
| glPopMatrix ();
| glMatrixMode (GL_MODELVIEW);
| glPopMatrix ();
| glMatrixMode (GL_PROJECTION);
|
glPopMatrix() # Restore the matrix |
|
|
|
| glEnable(GL_BLEND);
| glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
| glBegin (GL_QUADS);
| glColor3f(0.1,0.1,0.125); # bottom left color
| glVertex3f (-w, -1.0, -1.0);
| glVertex3f (w, -w, -1.0);
|
| glColor3f(0.08,0.08,0.4); # top right color
| glVertex3f (h, 1.0, -1.0);
| glVertex3f (-h, h, -1.0);
| glEnd ()
|
|
|
|
|
| if sys.version_info[0] == 3:
| else:
| glBitmap(13, 16, 0, 3, 17, 0, icon.tostring())
spd = self.to_internal_linear_unit(s.current_vel) |
| spd = self.to_internal_linear_unit(s.current_vel)
return self.dro_format(self.stat,spd,dtg,limit,homed,positions, |
axisdtg,g5x_offset,g92_offset,tlo_offset) | # Note: hal_gremlin overrides dro_format() for different dro behavior
| limit, homed, posstrs, droposstrs = self.dro_format(self.stat,spd,dtg,limit,homed,positions,axisdtg,g5x_offset,g92_offset,tlo_offset)
return self.joint_dro_format(s,spd,self.get_num_joints(),limit, homed) |
|
# Note: this is overridden in other guis (then AXIS) for different dro behavior |
def joint_dro_format(self,s,spd,num_of_joints,limit, homed): |
# Note: this is overridden in other guis (then AXIS) for different dro behavior |
axis2 | axis original

|
from __future__ import print_function |
| from OpenGL.GL import *
| from OpenGL.GLU import *
| from OpenGL.GLUT import *
if sys.version_info[0] == 3: |
else: |
import Tkinter |
import thread as _thread |
gettext.install("linuxcnc", localedir=os.path.join(BASE, "share", "locale"), unicode=True) |
from minigl import * |
if sys.version_info[0] == 3: |
else: |
import ConfigParser as configparser |
| continuous_jog_in_progress = False
| cjogindices =
iconname = self.tk.call("load_image", "std_" + iconname) | iconname_image = self.tk.call("load_image", "std_" + iconname)
icon.configure(image=iconname) | icon.configure(image=iconname_image)
widgets = frame, icon, text, button, iconname | widgets = frame, icon, text, button, iconname_image
widgets = frame, icon, text, button, iconname | widgets = frame, icon, text, button, iconname_image
| if iconname == "error":
| comp["error"] = True
| if self._remaining_error_count() == 0:
| comp["error"] = False
| def _remaining_error_count(self):
| """ Returns the count of remaining error messages """
| count = 0
| for i, item in enumerate(self.widgets):
| frame, icon, text, button, iname = item
| if iname == "icon_std_error":
| count += 1
| return count
|
|
| global continuous_jog_in_progress,cjogindices
| if continuous_jog_in_progress and not manual_tab_visible():
| jjogmode = get_jog_mode()
| for idx in cjogindices:
| c.jog(linuxcnc.JOG_STOP, jjogmode,idx)
| continuous_jog_in_progress = 0
| cjogindices =
|
| stderr_line = line.decode()
# If it was "Continous" just before, then don't change last jog increment! | # If it was "Continuous" just before, then don't change last jog increment!
| comp["abort"] = True
| time.sleep(0.3)
| comp["abort"] = False
if sys.version_info[0] == 3: |
else: |
items = tuple(inifile.findall(section, item)) |
return root_window.tk.merge(*items) # str |
global continuous_jog_in_progress | global continuous_jog_in_progress,cjogindices
continuous_jog_in_progress = 1 | continuous_jog_in_progress = True
| if not a in cjogindices: cjogindices.append(a)
continuous_jog_in_progress = 0 | continuous_jog_in_progress = False
if joint_sequence[jnum] is '': | if joint_sequence[jnum] == '':
coordinate_font = "courier bold 20" | coordinate_font = "monospace 20"
coordinate_font = "courier bold 11" | coordinate_font = "monospace 11"
| comp.newpin("error", hal.HAL_BIT, hal.HAL_OUT)
| comp.newpin("abort", hal.HAL_BIT, hal.HAL_OUT)
cmd += ['-x', str(xid)] + gladecmd | cmd += ['-d', '-x', str(xid)] + gladecmd
| print(cmd)
# call an empty function that can be overidden | # call an empty function that can be overridden
[/code]
[/code]

User command file as in a axis.src file will not allow a timer and certain highlighted areas when in pause and run etc
This was a request by a user


I do not believe that is the case, there appears to be no reason you cannot add a timer using usercommand.
I just made a quick dumb one using time.time() which works, so a more involved one using buttons or linked to program running or feedrate_blackout shouldnt be too much more effort, using these 2 examples as reference

github.com/LinuxCNC/linuxcnc/blob/17bb82...vcp_widgets.py#L1125

pythonguides.com/python-tkinter-stopwatch/

The highlighted sections could prove to be rudimentary also as axis already is doing something similar.

I chose to continue in tcl since it is pretty simple and axis is Rock solid I really want to maintain this simplicity and reliability.
I think the files including icons are less than 400kB


You appear to be proficient in tcl, but the simplicity involved with changing the tcl files is really only a short term gain, that requires more work long term with maintenance/upkeep which erodes the simplicity/reliability and makes it more difficult to deploy. Im not a computer hacking pro, but it became pretty clear for me early on that the usercommand file maybe be initially a little more difficult, long term it is easier to maintain, deploy and holds axis stability by not changing the source. The maintaining devs might be less reluctant to add this into master if it were in the form of a usercommand file. Nothing personal, I am just a lobbyist for the usercommand file and will always suggest its use when ever the chance arises. I think that was the whole reason it is there in the first place. I like your revisions and look forward to using them myself, but every time I try and install your screen, there is a version mismatch and I need to update the files for it to work. Phil and Chris have demonstrated to me many times that you can do pretty much anything using the usercommand file, like reassigning widgets to different locations and changing the preview screen. If you need help or examples feel free to ask, I dont know how to program but I know how to try. I know my long winded post probably make me come off like a know-it-all blowhard who doesnt know anything, but if we all get on the same page in regards to modifying axis by using phil's plasmac as an example/standard github.com/LinuxCNC/linuxcnc/blob/2.8/co...smac/plasmac_axis.py , I think we can accomplish more as a collective, with more long term stability.
If you need a good starting point, the file in this post has i think every widget brokenout in usercommand making it a good place to start from.
forum.linuxcnc.org/21-axis/45385-axis-dark-mode#237837
forum.linuxcnc.org/media/kunena/attachme...d_dark_2022-03-20.py

By comparison, the plasmac usercommand file is only 50kb, and from a maintenance perspective, ive only needed to update usercommand files twice, once for the mdi change from 2.8 to 2.9, and once to go from py2 to py3

But I do have 1 suggestion for improvement.
Instead of writing your setting to 5 different txt files, perhaps it could be done by reading the ini file for things like custom button, and writing things like colour to the .axis_preference file. Reading the ini file is pretty easy, I just copied it from plasmac,

the writing things to .axis_preference file is something I am still working on, as it could be useful for things like remembering new screen options ,like your colour chooser, or remembering things from last shutdown like rapid override rates.

edit, the compare files didnt format correctly in forum post so I will attatch them
Attachments:
Last edit: 29 May 2022 19:35 by cakeslob. Reason: holy fuck can we fix the forum editor already or what
The following user(s) said Thank You: phillc54

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

Time to create page: 0.379 seconds
Powered by Kunena Forum