Commit graph

679 commits

Author SHA1 Message Date
Chris Morley
3f664ee1b2 gladevcp -fix a warning about icon size
It seems pygtk doesn't like 'image.set_from_stock' with a number
rather then a constant.
2018-03-19 15:28:34 -06:00
Sebastian Kuzminsky
3241f6dbf1 fix specifed/specified typos all over 2018-01-21 14:49:14 -07:00
Sebastian Kuzminsky
2e02f5c785 fix intial/initial typos all over 2018-01-21 14:49:14 -07:00
Sebastian Kuzminsky
3edc457485 fix inital/initial typoss all over 2018-01-21 14:49:14 -07:00
Sebastian Kuzminsky
0e7dc013fd fix recieved/received typos all over 2018-01-21 14:49:13 -07:00
Sebastian Kuzminsky
2506277876 fix usefull/useful typos all over 2018-01-21 14:49:12 -07:00
Ruoxi Wang
c4c7cfb3a8
Prevent fail when doing item assignment later.
Trying to resolve #328, succeeded.
When one of rotary axis is wrapped, the code between line 1292 and 1302 will do item assignment in positions.
But if self.get_show_relative() returns false, positions is a tuple, item assignment will fail. So I added 2 lines of code to ensure positions is always a list.
2017-12-04 22:16:30 +08:00
Norbert Schechner
803c8d736f GladeVCP - CombiDRO - raise SystemExit Error does not allow to load file with Glade
In the code a SystemExit Error was thrown if linuxcnc status could not
be polled any more, this had the problem, that glade files with CombiDRO
widgets could not be loaded with glade.

Signed-off-by: Norbert Schechner <nieson@web.de>
2017-07-10 19:55:44 +02:00
Dewey Garrett
317a357aa6 gladevcp: continue if missing importlib
import importlib was added with merge of branch: aux_gladevcp_apps
but the old version of python included with Ubuntu-Lucid doesn't include
importlib

If importlib is not available, continue with message to stdout
noting that auxiliary gladevcp applications are not available

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2017-03-28 09:04:47 -07:00
Dewey Garrett
a761a4e732 Merge origin/aux_gladevcp_apps_v2 into z_2.7 2017-03-08 06:10:44 -07:00
Norbert Schechner
ff20647f7c GladeVCP - revert the wrong changes to CombiDRO witch destroyed some other glade applications
Signed-off-by: Norbert Schechner <nieson@web.de>
2017-03-05 19:04:25 +01:00
Dewey Garrett
5c85135971 gladevcp: support auxiliary applications
(9) aux_gladevcp_apps: rebased to origin/2.7 at commit 22cf22a

1) For auxiliary applications installed from a deb
   located in a known toplevel directory defined
   by the substitution variable @LINUXCNC_AUX_GLADEVCP@.
   (This location can be obtained using the linuxcnc_var
   script which should always be in PATH for either a
   RIP build or a deb install of LinuxCNC.  Typically:
   @LINUXNC_AUX_GLADEVCP@ = /usr/share/linuxcnc/aux_gladevcp)

2) For testing development of auxiliary applications, use
   an exported environmental variable (GLADEVCP_EXTRAS)
   to specify a colon (:) separated list of app directories

   Example:
   $ export GLADEVCP_EXTRAS=/home/test1:/home/test2

   Typically one would include the export statement in a startup
   script like ~/.profile or ~/.bashrc

Notes:
  a) App filenames that are duplicated are rejected
  b) Files found in directories specified with the environmental
     variable GLADEVCP_EXTRAS supersede identically-named files within
     subdirectories of the system directory specified by
     LINUXNC_AUX_GLADEVCP (e.g., /usr/share/linuxcnc/aux_gladevcp).
     This provision allows a developer to test an application
     by exporting GLADEVCP_EXTRAS to specify a private application
     directory without removing a system-installed application directory.
     Messages inidicating rejected duplicates are printed to
     stdout.
  c) An exclude list is used to exclude problematic filenames
     that may be used for other purposes
     (curently: *setup*.py, *install*.py)

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2017-02-19 11:53:07 -07:00
Norbert Schechner
69d272e080 gladeVCP - CombiDRO - make it compatible for both 2.7 and master
gmoccapy - getiniinfo - added get_joints_amount for compatibility 2.7 and master


Signed-off-by: Norbert Schechner <nieson@web.de>
2017-02-19 13:01:54 +01:00
Chris Morley
5013a5af7c gladevcp -fix delta scale pin not updating if wheel scroll used
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
2017-01-10 20:23:26 -08:00
Chris Morley
53fe153c8c gladevcp -add missing icon image for hal_dial
Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
2017-01-10 20:22:50 -08:00
Norbert Schechner
c0af9a9a98 GladeVCP - CombiDRO - new property cycle time
with 6 axis machine and not very fast PC the CombiDRO slowed down the main
application too much. Now we can set the poll time for each DRO separately.
At the same time i reduced the hard coded cycle time form 100 to 150.

Signed-off-by: Norbert Schechner <nieson@web.de>
2016-10-30 11:57:11 +01:00
Chris Radek
5ef99c9014 Make the grid stay in the machine limits box
... but still keep an intersection on the origin.

Signed-off-by: Chris Radek <chris@timeguy.com>
2016-10-21 13:19:28 -05:00
Chris Radek
b98597b97b Fix position of the machine limits box
Previously, when a tool length was loaded, the tool would move in space, but
the machine limits box wouldn't move accordingly.  This violated the
expectation that the tool could be jogged (for instance) just inside the box.
Now, the box moves with the TLO so this expectation is true.

Signed-off-by: Chris Radek <chris@timeguy.com>
2016-10-20 16:04:50 -05:00
Chris Radek
41bf3751df Fix red boxed constraint numbers in AXIS preview
Before this change, the angry red box would appear in some cases when the
program would not actually cause the "Program exceeds machine minumum|maximum
on axis ..." and would actually run fine.

To get this situation, make a large positive G54 offset and a matching large
negative TLO offset.  If they match, they should not affect the angry red
boxes, since they don't affect whether a particular gcode program will run.

Signed-off-by: Chris Radek <chris@timeguy.com>
2016-10-20 16:04:50 -05:00
Norbert Schechner
dc960b6362 GladeVCP - SpeedControl - changing limits do reset the increment
changing the limits min or max of the integrated adjustment
will now reset the increment to apply to default value (100 increments
from min to max)

Updated the documentation

Signed-off-by: Norbert Schechner <nieson@web.de>
2016-07-07 01:22:54 +02:00
Norbert Schechner
2ed221015b GladeVcp - tooledit.glade - corrected typo
Signed-off-by: Norbert Schechner <nieson@web.de>
2016-07-04 23:12:19 +02:00
Norbert Schechner
cd91a98084 GladeVCP - SpeedControl - set default increment after setting a new adjustment
- if a user sets new adjustment, the increment value remained at the old
  value, so if if the old values was 0 to 100 and was changed to 0 to 1000,
  the increment remained as 1 instead of changing to 10, now it will be set
  to a new default value.
- corrected the docu in the code

Signed-off-by: Norbert Schechner <nieson@web.de>
2016-07-03 12:03:11 +02:00
Norbert Schechner
1e72e40810 Merge branch '2.6' into 2.7 2016-07-02 13:28:25 +02:00
Norbert Schechner
f102b9f118 GladeVCP - hal_sourceview - creation mode of files
the saved file was created with mode 0600 because the mode was not changed
after the creation of the file, I added a line to correct that.

ToDo: make the mode a property

Signed-off-by: Norbert Schechner <nieson@web.de>
2016-07-02 13:27:52 +02:00
Dewey Garrett
48ea609746 pyngcgui.py: chk for gcmc if not in ini on 1st use
Check for gcmc executable was made only if 1 or more gcmc files specified
by ini items like [DISPLAY]NGCGUI_SUBFILE=cpocket.gcmc but was not
checked on use if there were no gcmc ini items

Thanks to forum user phillc54 for the bug report

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2016-06-17 07:52:06 -07:00
Moses McKnight
6b90e14513 Added callLevel to EMC_TASK_STAT class, to fix hal_glib file-loaded bug.
callLevel will be non-zero if executing a subroutine.  When subroutines are
executing, EMC_TASK_STAT::file gets set to the file name of the subroutine
(remap as well I think).
Exporting the call level in the task status allows us to ignore file name
changes in hal_glib and avoid sending bogus signals to things
such as hal_gremlin and hal_sourceview.

Signed-off-by: Moses McKnight <moses@texband.net>
2016-06-01 12:07:48 -05:00
Norbert Schechner
a3f4f2efb1 GladeVCP - gremlin - corrected mouse button 6 behavior
- Checking the file for lathe behavior, I changed the intended
  handling of button 6 mode

Signed-off-by: Norbert Schechner <nieson@web.de>
2016-05-31 15:33:14 -05:00
Norbert Schechner
5bd18891a6 GladeVCP - IconView - Bug due to double click
If the user uses a double click on a place where no icon is
located, a python exception was thrown.

Solved that with a try except

Signed-off-by: Norbert Schechner <nieson@web.de>
2016-05-23 20:07:31 +02:00
Jeff Epler
23aafb0fa9 Merge remote-tracking branch 'origin/2.6' into 2.7 2016-05-10 08:14:32 -05:00
Jeff Epler
409125ecc8 gladevcp: Fix mdi error with tiny values
string.Template converts template values to strings as if by str(), but
for tiny values like 1e-9 (or large values like 1e12) this results in
exponential notation.

Tiny values arise "naturally" by manipulating a gtk spinbox, which uses
repeated addition or subtraction to manage the value.  For illustrative
purposes, the following fragment of Python gives the gist:
    >>> x = .1
    >>> x + x + x - x - x - x  # mathematically, zero
    2.7755575615628914e-17     # but not in FP math

Reproduce with configs/sim/axis/gladevcp/gladevcp_tab.ini,
following this sequence of actions:
    F1 F2 Ctrl-Home
    click the "GladeVCP demo" tab
    increment the spinbox 3 times
    decrement it 3 times (0.00 will show)
    click "Execute Oword subroutine"

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2016-05-10 08:13:55 -05:00
Dewey Garrett
1a972d0dbc glcanon.py is_lathe() is a function
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2016-04-24 17:53:54 -07:00
Norbert Schechner
0e7a3591be GladeVCP - SpeedControl - forgot to push this file
Signed-off-by: Norbert Schechner <nieson@web.de>
2016-04-10 21:12:21 +02:00
Norbert Schechner
3dc1c46f24 GladeVCP - SpeedControl - added widget icon
Signed-off-by: Norbert Schechner <nieson@web.de>
2016-04-10 17:51:09 +02:00
Norbert Schechner
0818599209 GladeVCP - New Widget SpeedControl - Adjustment for Touch Screen
The SpeedControl Widget serves as a slider with button to increment or
decrease the value and a progress bar showing the value with or without
units.
It is designed to be used with touch screens

It is needed to change the sliders used with gmoccapy.
That changes will be pushed separately.


Signed-off-by: Norbert Schechner <nieson@web.de>
2016-04-04 21:29:31 +02:00
Norbert Schechner
825f44068e Merge branch '2.6' into 2.7 2016-03-30 22:00:30 +02:00
Norbert Schechner
4108eb3321 GladeVCP - Iconview
If the user select a icon with the mouse, the select button did not get
sensitive. I added a "selection_changed" signal to set the
button in correct state.

Signed-off-by: Norbert Schechner <nieson@web.de>
2016-03-30 21:59:24 +02:00
Dewey Garrett
6a5a64f30c pyngcgui.py remove --help mention of --height
as it was never supported in a release

also: fix a typo and the grammar for possessive "its"

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2016-02-19 12:07:24 -07:00
Norbert Schechner
233eb6ed06 Merge branch '2.6' of ssh://norbert@git.linuxcnc.org/git/linuxcnc.git into 2.7
Conflicts:
	docs/src/gui/gladevcp.txt
	docs/src/gui/gmoccapy.txt

solved conflicts!

Signed-off-by: Norbert Schechner <nieson@web.de>
2016-01-18 18:45:16 +01:00
Norbert Schechner
9cd3ebaf7a gmoccapy_1_5_6 - deleted alarm entry and added new settings for combi_dro
ver 1.5.6
- deleted the alarm_entry log page, as it has not been used by users
  to report bugs, and therefor it was designed.
- changing DRO mode by click can be disabled on settings page
- corercted and added information to the docs
- added a new property to combi_dro to disable readout toggling

Signed-off-by: Norbert Schechner <nieson@web.de>
2016-01-17 17:30:58 +01:00
chris morley
2dcaff3f1a gladevcp : fix hal_dial for wheezy
it seems pygtk in wheezy has sutble bugs/differences
This makes the dial widget actually update it's appearence
when you manipulate the on screen controls.
strangely it you test this without using GLADE it works fine
without this change - meaning call it: python hal_dial.py

Signed-off-by: chris morley <chrisinnanaimo@hotmail.com>
2015-12-21 18:35:09 -08:00
Chris Morley
42dc7c2615 gladevcp: hide error message from hal_lightbutton
error message from no HAL pin while using GLADE editor.

Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
2015-12-21 13:16:47 -08:00
Norbert Schechner
0e702bd9b7 Merge branch '2.6' into 2.7 2015-12-08 09:09:32 +01:00
Norbert Schechner
865f2bb10e gladevcp - iconview could create exception in some circumstances
- the widget did throw an exception if a the user did enter a enter a directory
  without read rights and then pushed the next or previous button, caused because
  we are not allowed to iter over the files. Now the widget checks if the user is
  allowed to read the files in a directory, if not the dir will be skiped and
  therefor it is not visible in the widget.

- the button will get not sensitive if it does not make sense to push them,
  i.e. button next, if no file is in the selected directory or home button,
  if we are in the home directory

- introduced a new signal "sensitive" emitting button state changes,
  so surrounding GUI can be sincroniized with the widget, see gmoccapy
  as example

- the button next will now jump to first, if we are on the last icon,
  the previous button jumps to last if we are on the first icon
  so it is faster to get from first to last and vice versa

- some typo errors has been corrected

thanks to balestrino to report the bugs and typos


Signed-off-by: Norbert Schechner <nieson@web.de>
2015-12-08 09:02:44 +01:00
Chris Morley
73c3ae8c8d Merge branch '2.6' into 2.7 2015-12-05 16:48:26 -08:00
Chris Morley
e9d6ff5b15 gladevcp -offset_widget: fix rare error of non-existant var file
sometimes the var file is copied and deleted then re-saved by
 linuxcnc - account for that by ignoring the update.

Signed-off-by: Chris Morley <chrisinnanaimo@hotmail.com>
2015-12-05 16:27:38 -08:00
Sebastian Kuzminsky
dbf34f67d5 Merge remote-tracking branch 'origin/2.6' into 2.7 2015-11-17 10:46:34 -07:00
Balestrino
04e0118fc9 tooledit_widget.py: tool diameter sorting fix
Signed-off-by: Balestrino <salvatore.balestrino@gmail.com>
2015-11-17 17:53:30 +01:00
Dewey Garrett
faf9e113c3 pyngcgui.py, gremlin_view.py improve ini file find
using ps -C linuxcncsvr --noheader -o args

both pyngcgui and gremlin view can be started independently
of the process running linuxcnc so they ask the system for
the inifile

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-10-06 14:13:43 -07:00
Dewey Garrett
efe3ac1545 pyngcgui.py, gremlin_view.py regression
The options of pgrep (package procps) changed between:
  lucid:  procps 1:3.2.8-1ubunt
  jessie: procps 2:3.3.9-9

pgrep -lf worked on lucid but not on jessie
pgrep -a  worked on jessie but not on lucid

so try the form ps ax|grep ...

ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784143

Signed-off-by: Dewey Garrett <dgarrett@panix.com>
2015-10-06 13:10:59 -07:00
Moses McKnight
c14c1c5886 Add option to disable line number reset in hal_sourceview when idle.
Signed-off-by: Moses McKnight <moses@texband.net>
2015-09-17 08:25:08 -05:00