>
>
> Hi Kurt
> your code looks fine.
> Gstat is a super secret dev only code....
> Ok truth is it is used in gladevcp and GUIs for widgets that require
> linuxcnc status updates.
> It has no documentation - yet - I have some started somewhere...
> I recently added more functions to it to help with GUI development.
> I have a branch of QTvcp that uses it extensively.
> I idea is to have only one program poll updates rather then every little
> program polling.
> It uses GObject messages to tell the programs that are registered to the
> signal to update.

event driven updates is the GUI programming term for it.


Ah, so it is similar to a event callback signal in GUI programming, but for
LCNC status.

Looking back at your code I see something that looks like a GTK button
signal connector:
GSTAT.connect("metric-mode-changed",mode_changed)

So "metric-mode-changed" is similar to "clicked" when connecting a button
handler? But then there must be a bunch of different signals like
"metric-mode-changed"...
And, if I am thinking in the right direction, instead of polling to see if
something has changed I can write functions that get called only when
something does change. That's genius!

Sorry for thinking out loud. Guess I'll have to dig around and see what I
can learn about this top secret code!


> Chris M


Thanks much Chris!

Kurt



On Mon, Apr 17, 2017 at 7:57 PM, Chris Morley <[email protected]>
wrote:

>
>
>
> ________________________________
> From: Kurt Jacobson <[email protected]>
> Sent: April 17, 2017 8:16 PM
> To: EMC developers
> Subject: Re: [Emc-developers] view and mm/inches switching.
>
> Chris,
>
> I am using the user-space Python comp pasted below to get the G20/21 state
> out to HAL pins. It looks somewhat similar to what you came up with (which
> makes me feel good as I am just starting to learn python and play with
> LCNC). I sent it to Gene on Saturday, but I guess he did not like it ;)
>
> I brute forced it buy using the python interface and polling every 50ms and
> updating the HAL pins, but I see you used a module GStat, where can I find
> some info on that, it looks useful?
>
> Cheers,
> Kurt
>
>
> Hi Kurt
> your code looks fine.
>
> Gstat is a super secret dev only code....
>
> Ok truth is it is used in gladevcp and GUIs for widgets that require
> linuxcnc status updates.
> It has no documentation - yet - I have some started somewhere...
> I recently added more functions to it to help with GUI development.
> I have a branch of QTvcp that uses it extensively.
> I idea is to have only one program poll updates rather then every little
> program polling.
> It uses GObject messages to tell the programs that are registered to the
> signal to update.
> event driven updates is the GUI programming term for it.
>
> look in lib/python/hal_glib.py for the code.
>
> Chris M
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Emc-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to