gmoccapy file update problem

More
07 Nov 2016 00:52 - 07 Nov 2016 01:50 #82526 by auto-mation-assist
I noticed that my gmoccapy in /usr/bin does not match the current version available from the git in the linuxcnc-dev package. The gmoccapy.py file in my linuxcnc-dev folder is the latest. I copied this latest verson to the /usr/bin/ folder, removed the .py and changed permissions and when running linuxcnc it will not complete the startup of linuxcnc and reports errors in the gmaccapy file.

The new files starts deviating from the old just after line 590. Part of the new file that does not work:

590 # since the main loop is needed to handle the UI and its events, blocking calls like sleep()
# will block the UI as well, so everything goes through event handlers (aka callbacks)
# The gobject.timeout_add() function sets a function to be called at regular intervals
# the time between calls to the function, in milliseconds
# CYCLE_TIME = time, in milliseconds, that display will sleep between polls
cycle_time = self.get_ini_info.get_cycle_time()
gobject.timeout_add( cycle_time, self._periodic ) # time between calls to the function, in milliseconds

def set_motion_mode(self, state):
# 1:teleop, 0: joint
self.command.teleop_enable(state)
self.command.wait_complete()
4569 lines in file



Part of the old file that works for me:

590 # since the main loop is needed to handle the UI and its events, blocking calls like sleep()
# will block the UI as well, so everything goes through event handlers (aka callbacks)
# The gobject.timeout_add() function sets a function to be called at regular intervals
# the time between calls to the function, in milliseconds
gobject.timeout_add(100, self._periodic) # time between calls to the function, in milliseconds

def set_motion_mode(self, state):
# 1:teleop, 0: joint
self.command.teleop_enable(state)
self.command.wait_complete()
4570 lines in file

I don't know why the git pull update process did not upgrade the old /usr/bin/gmoccapy file and kill linuxcnc by itself. I restored the original file to get it all working again. Still busy trying to get the matchbox-keyboard to show up even when gmoccapy reports that it is installed in Debian Jessie in the right place during startup,
Last edit: 07 Nov 2016 01:50 by auto-mation-assist.

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

More
07 Nov 2016 12:58 #82539 by andypugh
If you pull from git you get a run-in-place version in linuxcnc-dev (or wherever you chose).
To run that version you need to execute the linuxcnc-dev/scripts/rip-environment in a terminal window then start LinuxCNC from the command line in that same terminal.
Any other way of starting LinuxCNC will run the installed version.

You can get a compiled / installed version of the very latest version via the package manager and the buildbot. If you are not actively developing the software his might be a better plan.
buildbot.linuxcnc.org
The following user(s) said Thank You: auto-mation-assist

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

More
07 Nov 2016 21:11 #82569 by newbynobi
If you only copied the gmoccapy file, it won't work, because the latest update also changed the getiniinfo.py file!

Plesase see the commit info for details on each changed file.

Norbert

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

More
13 Nov 2016 05:53 - 13 Nov 2016 05:57 #82733 by auto-mation-assist
Ok thanks for the information. I only use run-in-place configurations and thought that a 'get pull' when it shows that I'm up to date would not leave files different in linuxcnc-dev and usr/bin and /usr/share/. Perhaps I had something unusual going on. All my efforts were made in regards to attempt to get Glade be actually be able to display a complete front panel of gmoccapy instead of having a bunch of missing items. I think older versions of linuxcnc along with older versions of Debian are required to do that.

I had solved my matchbox-keyboard showing up with a blank screen segment instead of keys by changing from Debian Jessie to MINT LMDE-2 which is based on Debian Jessie. This worked out OK on a older 4 CPU computer but caused some problems on a newer 8 CPU machine.

On a newer 8 CPU machine using a ASUS Z170-A mother board with a Intel I7-6700 LGA1151 CPU. I will need to build up a kernel before I can check to see if the matchbox-keyboard keys show up on this configuration. Some items on the motherboard such as the on board LAN port are not recognized.

I started all these changes since I got very frustrated with glade which appears to not be useful in editing the gmoccapy front panel in the newer versions and installations of linuxcnc.
Last edit: 13 Nov 2016 05:57 by auto-mation-assist.

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

More
13 Nov 2016 10:10 #82737 by newbynobi
@fairngs,

First:
a git pull will only get the last files of the branch, but will not merge the changes with the actual branch! Have you done also a merge?
I noticed that sometimes even a make clean is needed to get the latest version running! (Specially if you are working with several brunches at once.

Second:
If you run rip-environment, the files you place in /usr/bin and /usr/share are not used, the files used in rip-environment are in ~/linuxcnc-dev/bin or share, etc. So if you copy files around, you mix up your system!

Third:
I also noticed some misbehavior of matchbox-keyboard with Jessie and Mate, but I was not aware that that could be related to the hardware of the PC.

Fourth:
You can edit gmoccapy.glade file with glade, without problems! I am doing that quite often.
If you use Jessie, you will need to install glade_3.8.5 from source.
Get it from here
if that one is installed, you still need to copy the linuxcnc glade catalog and the corresponding files to the correct folders.

You need to copy all files from
linuxcnc-dev/lib/python/gladevcp
to
/usr/lib/pymodules/python2.7/gladevcp
and
/usr/share/pyshared/gladevcp

Do not ask me why they need to be in two places, as I do not understand that easer.

After that try to start glade from a terminal with:
glade-gtk2
and check if the hal widgets are available.

If it does work till here, try to open /linuxcnc-dev/src/emc/user_intf/gmoccapy/gmoccapy.glade

edit according to your needs and have fun ;-)

Do not forget to do a make after changing a file, otherwise you will use the old file (linuxcnc-dev/share/gmoccapy/gmoccapy.glade)

And if you could do me a favor, please document the steps to install and configure glade in detail, so we can add that to the documentation. All the above mentioned is out of memory, without testing!

Norbert
The following user(s) said Thank You: auto-mation-assist

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

More
18 Nov 2016 09:02 #82952 by auto-mation-assist
Norbert, in regards to the matchbox-keyboard not displaying any keys even though it is detected as being installed. On my last 4 CPU machine with a fresh install from master linuxcnc was started the first time and matchbox-keyboard keys showed up. Shutting down linuxcnc and restarting it without rebooting also showed the keyboard keys. Shutting down the computer however, rebooting and restarting linuxcnc in the same manner as before failed to show the the matchbox-keyboard on every launch of linuxcnc there after. I'm suspecting that a socket or pipe to Xwin is not being released by Xwin process or that the past links are being retained and therefore a new link could not be established to actually display the keyboard and transfer data. So the old and new --xid's or other id may not match for data exchange. Thats just a thought.

I have had problems with matchbox-keyboard showing up on first run of linuxcnc after install and after rebooting the computer matchbox-keyboard is gone from the linuxcnc display but is detected.. So this seems to point to a loss of communication or proper pointing between linuxcnc and the screen Xwindows handling processes. I have tested this on three separate computers running various versions of Debian 8 with similar results.

There is some mention on the internet that Xwin may hide the keyboard on the wrong window layer. The xraisewindow function is thought not to work reliably to attempt to see if that is true or not to bring a window to the front. It has not done anything for me, Perhaps due to a lack of knowledge on how to use it.

I will carefully read your last message tomorrow. Its just before midnight here.

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

More
18 Nov 2016 22:32 #82978 by newbynobi
I have seen the matchbox keyboard problem only on mate systems, not on XFCE, could you check with XFCE please.

Norbert

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

More
19 Nov 2016 03:19 - 19 Nov 2016 03:23 #82981 by auto-mation-assist
I had XFCE installed on several computers and it had the same problems with matchbox-keyboard showing and then disappearing. I'm confused on directories being used by different uninstallable versions of matchbox-keyboard found on the internet for download. Some use /usr/share/ while others use /usr/local/share/ for the keyboard files.

In regards to glade 3.8.5 install. I installed glade 3.8.5 from the source you listed after all dependencies were satisfied, and copied gladevcp files to the two directories you mentioned earlier. It shows the HAL Python and VCP Actions tabs in glade. However the computer system reports that no version of glade is installed. The glade icon in the menu program tab will staer glade but the icon itself when selected for uninstall states that it is not associated with any states that it is not associated with any package. Glade will not run from a terminal. When trying to run it from a terminal it just reports that glade is not installed, but yet I can get it to run from the main menu. Since it is reported as not being installed it can not be removed by normal methods, not even apt-get remove. I will post a few pictures of what glade looks like when running. shortly. During the install of glade 3.8.5 the following configuration was used. Only version 3.18 is shown as being available for install in synaptic. Picture attached.

john@cnc2 ~/Downloads/glade3-3.8.5 $ ./configure --prefix=/usr --enable-gtk-doc --enable-dependency-tracking
Configuration:
Source code location: .
Compiler: gcc
GTK+ UNIX Print Widgets: yes
GNOME UI Widgets: yes
PYTHON Widgets support: yes
Build Reference Manual: yes
Build User Manual: yes
john@cnc2 ~/Downloads/glade3-3.8.5 $
Attachments:
Last edit: 19 Nov 2016 03:23 by auto-mation-assist.

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

More
19 Nov 2016 03:34 - 19 Nov 2016 03:41 #82982 by auto-mation-assist
Here is a picture of gmocappy.glade in glade 3.8.5 on my computer. It shows many problems and the preview screen is full of the tabbed items that are on the right side of the screen. Linux reports it is not installed so there are likely underlying issues. Added second picture.
Attachments:
Last edit: 19 Nov 2016 03:41 by auto-mation-assist.

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

More
19 Nov 2016 08:31 #82984 by newbynobi
You need to start glade with glade-gtk2 from a terminal, or make a new starter for that.
The displying proble is known for such big files as gmoccapy.

But edditing should work. Just test on a smaller glade file to get used

Norbert

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

Moderators: newbynobiHansU
Time to create page: 0.183 seconds
Powered by Kunena Forum