now, what was the result of the pillow studies ?-)
both toggle action and one-shot actions are needed
I currently set_active() as needed
via emit i think
hold on, i'll roll patch in a half an hour
btw: dumbo question: how do I get an event when the program ends (m2)? interp-idle?
i think yes
interp-idle states that interp ends it work - via stop or program end
where do I connect that to?
don't catch question
ok. I my program I need a handler to be called on interp-idle.
connect(signame,handler) is a widget method
so the question is: which widget?
interp-idle is global state
you mean like foowidget.gstat,.connect(signame,hdlr)?
it's not available in glade though
yep, I see
but if it's needed - simple Action wrapper on top of GStat may be added
that would be useful eventually, yes - I'll take in on the do-list
check gladevcp-actions for ToggleAction
ok, gstat connect worked..
i'm nearly ready with Stat widget for gldae
yes, we need to add this in a more sane way
currently you need to builder.get_object("<any action>").gstat.connect(signame,hdlr)...
quite a contraption ;-)
what's Stat supposed to do?
nothing - just provide signals
I need to do the test drive post breakfast... stomach walls caving in...
is there a #5xxx parameter(s) which returns the current *absolute* machine position?
mhaberler: have you examined gstat widget?
psha: yes, perfect - see mail
+/- perfect, that is;)
I am migrated..
yes, saving actions is pointless
had to fix persistence.py; see http://git.mah.priv.at/gitweb/emc2-dev.git/shortlog/refs/heads/gladevcp-candidate
I would actually appreciate a critical review of the first 140 lines of persistence.py - it lacks style :-/
btw in Actions don't fall into current save/restore checks - Adjustment, Scale, etc
dont think so; the widget list is a whitelist - see persistence.py select_widgets
ah, I see - on all widgets that might fail. WIll not to test that case.
one point i see - exception in 'accessor' is a bit useless...
i think )
hm, maybe it's useful
by now: yes..
i'd better return methods, not names in accessor
this will simplify code a bit
and None, None if it's not found
ah, ok - makes sense - drop getattr
looks better: http://git.mah.priv.at/gitweb/emc2-dev.git/blob/f427105a0c1848c9d69d8520631976c1418401c6:/lib/python/gladevcp/persistence.py
why so many levels of exception checking?
for example get_value/set_value _and_ in parent calls?
I toldya: it lacks style..
catch at lowest or highes level?
i'd rather replace get_value with something:
getter, _ = accessors(w)
if not getter: return
without any try's
or even 'return getter and getter()'
which is identical to previous statement
so you'd rather get 'None' or value
but i have to warn you that my coding style is strongly influenced by Maybe monad from haskell :)
oh, the famous Maybe monad.. WTF?
I like it. Code which isnt there cant break.
Maybe is excelent idiom - it's either value or Nothing :)
very useful to declare functions that may (not must) return value
yes, that makes sense
in python it usualy simulated this by None value
either None or some value
in C it's NULL pointer, in java - null value
monad.. sounds very Leibnitz...
ok, looks better now. Even works. http://git.mah.priv.at/gitweb/emc2-dev.git/blob/14e930c37409a547671133915ce364f1bcc9fdcd:/lib/python/gladevcp/persistence.py
anyway, I'm running out of feeping creatures for the time being, I guess I have what I need
lets merge-plan: I need at least this evening to document and do examples
we could either do tomorrow or tuesday evening, am busy on wednesday
so let it be either tomorrow
or today if docs goes to wiki and not git
so you mean wiki update and merge should be same day, is that what you're saying?
not should but may :)
i feel i won't have enought time tomorrow
ok, I'll be back in about 2hrs and start on the wiki
maybe you can look over it later tonight
what's your timeframe for today?
till 23:30 GMT+3 i think
ok, that looks doable, will ping you when I'm back
psha: I'm baack
do we have an example for an action which brings its own label/tooltip, ro an ActionGroup? I dont quite see where the latter might make sense
do we stay with 'HAL widgets' ;-?
there are few HAL-free by now
just skimming the gtk manual
i've not found use cases for it besides UI Manager
action with it's own label/tooltip - ESTOP action with tooltip from axis :)
why cant I associate a G-code ngc file with an EMC Action Run widget?
it's impossible :)
run actions just runs currently loaded program
Because you say so?
consulte code if you wont' believe me :)
I'm saying: "optionally" load an ngc file and run it
that's not 'why cant I associate' :)
Ok. since you're bugging me. How do I load a f...g ngc file with an action?
i think it's not possible yet :(
i really want to retain compatibility with axis filters
i've created filechooser derivative with support for filters but it's not landed yet
well, think outside the touchy/Axis box: maybe there's a canned app which just has the capability to run a couple of predefined ngc files and basta..
that's good use case
but then you don't need pause/resume buttons?
that's optional I'd say
and we have the gcode parse() method, isnt that what we need?
i think load/run action deserves it's place under the sun but as derivative of simple RUN action
gcode parse is not needed - just ask EMC to load file
whatever class derivation makes you happy
that would be emc.command.program_open() I'd assume
i mean current RUN actions are fine without loading gcodes
but don't you think that 'load' button is better?
that loads arbitrary file (may be fixed at interface creation)
so running fixed file will be done in two steps - load file with fixed button, check via backplot and then hit 'run'
why do I have to load it explicitely?
there should be a way to press a button, and it executes a given file if told to do so
need to cover the simple case
i'm not specialist in machine safety but i believe that two stage run will lower chances to run incorrect file
you are stubborn geek
maybe somebody comes up with a UI which has no relation to g-code whatsoever, like JT's sausage smoker
consider JT's smoker - it has two operations
smoke sausage and shred everthing around in 2m radius
second one is useful too - to clean workspace for example
1. probe sausage wether it fits in smoker
2. smoke the s...t out of sausage
so you place sousage in smoker and press... 2!
you loose you dinner!
excellent. Now the smoker has 2 buttons: 'Probe Sausage Caliber' and 'Smoke"
it has no 'Load Probe Sausage .ngc File" button
yea, it has 'Probe' and "smoke' buttons
The JT Smoker doesnt sport a G-Code preview window
and extra 'do what i said!' button
man, that's so sixties, like loading a deck of cards, and the push 'Execute'
I sincerely suggest we give the user enough rope to hang herself.
but i'd really leave this thing not excessively advertised :)
or you'll have tons of hanged users :)
but people have the right to own guns as well.
at least in the colonies
send to you as silant reproach
this I dont understand
don't mind :)
so let's add it in next patch series
q: mode signals like mode-mid,mode-auto - these are emitted when emc transitions into this mode, right?
psha: mdi-command-start and mdi-command-stop only available with EMC_ToggleAction_MDI, right?
also it enables/disables button for free )
Action is a sort of 'one shot' action
ok, see http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?GladeVCPprogramming
'Extending....HAL value change events'
psha: I'm editing this as you read..
I'll start a new page for ActioWidgets - this bloats too much
there is one extra signal
it indicates that interp switched from idle to one of active states
pause, reading or waiting
it's not represented in EMC by sepearate state flag
do I need to document that?
do I get this right: no Action has a direct UI appearance - just in association with a button, correct?
Action is backend for UI
but you may attach any UI you want - menu, toolbutton, button,...
hm, EMC Stat is an 'Object', not an 'Action', but I'll subsume it there anyway
could you do a screenshot of the glade HAL Python section only ? I have run-in-place and the icons of meter and graph are missing..
i'm running RIP too :)
oh, there are no icons for graph and meter
I see, it's a feature
please start thinking about text for http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?ActionWidgets
sections "EMC Action widgets" and "EMC ToggleAction widgets"
the usual "nist-logic" has one button to switch something on, one button to switch it off, and one indicator "is-on" to tell the state
awallin: which is represented with 'toggle button' :)
right. if you are running multiple UI's the toggle button should respond to state-changes by other UIs too...
that's why gtk Actions were added
they are driven by changes in global EMC state
so you may place 100 ESTOP buttons and they will behave just like one
sounds good. this will go in the direction of a completely modular emc2-gui ?
i hope so
but the way is very long...
currently there are only ESTOP, ON/OFF, run, pause, stop and MDI command actions
important things are program listing, loading file with filters and error reporting
psha: do we have foreign hal component pins yet?
i'm preparing candidate actions branch
Was this a "yes, I will do it"?
psha: bug: ActionMDI stays active when G-code program is running
check gladevcp-actions2 branch
not bad.. turnaround time: 190seconds ;-)
psha: I understand I may document foreign hal component pins in Action MDI command and they will work when merged?
you may mark them as TODO
and i'll add support for them in next patchset
unfortunately my report ate most of my time today
ah, scientific endeavours 'n such
heh, scientific... another try for grant...
so i've to pick fixes from combobox-fix branch?
may you push new branch? :) all your branches (combobox-fix, candidate) has my gladevcp-actions branch merged :)
push branch with only needed fixes
while I do this, please contribute some text as requested here: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?ActionWidgets
I wont touch the wiki page until you tell me you#re done ;-)
ok, my repo branch gladevcp-combofix should be it
I would love to slide in the abort patch but jepler might nootice ;-)
psha: methinks you're suffering writers block again on ActionWidgets
oops :) forgot to tell you that i was afk :)
I dont buy it
aaa, grasping explioter! no chance to rest, no chance to eat, and i'm not talking about short sleep!
have a drink
honestly, a good explanation why we need one-shot and toogle would be helpful
explain it to me and I'll explain it to the wiki
yes, adding it
i've added a bit about toggles
when would I use one-shots?
*at all*, that is?
'stop' may be simple action, not toggle
but i've make it toggle too to retain visual compatibility with axis
also 'step' action is not toggle
added a bit for simple actions
ESTOP button in axis
it's toggle button in Toolbar
combofix has only one patch?
pused gladevcp branch
yes, collected wisdom of many days
jepler, cradek: anyone around?
mhaberler: it seem that we'll have another day for testing :)
I fear so. Emc unplugged ;-)
christmas was too merry? :)
Oh. We can do foreign components and 'load files', and even test it.. wouldnt that just be wunderful