#hazzy Logs

May 25 2020

#hazzy Calendar

12:02 AM Joco[m]: lol - wide screen is ok on dev setup/ Laptop has the res
12:21 AM Mufdvr0978[m]: hi, in probe_basic it the feed rate change and reset calls these 2 actions: machine.feed-override.reset and machine.feed-override.set, I can't find how / where they are defined, can someone please point me in the right direction
12:30 AM Mufdvr0978[m]: hi, in probe_basic the feed rate change and reset calls these 2 actions: machine.feed-override.reset and machine.feed-override.set, I can't find how / where they are defined, can someone please point me in the right direction
01:08 AM Lcvette1: i believe it may be in the machine_actions.py file
01:08 AM Lcvette1: in the qtpyvcp/actions folder
01:08 AM Lcvette1: lmclaren: ^^^
01:09 AM Mufdvr0978[m]: thanks! I will take a look
01:23 AM Joco[m]: its in the actions file
01:23 AM Joco[m]: lmclaren: as Lcvette noted.
01:24 AM Joco[m]: it uses the linuxcnc python interface to talk directly to linuxcnc
01:25 AM Joco[m]: line 334
01:25 AM Joco[m]: ``` def reset():
01:25 AM Joco[m]: """Feed Override Reset"""
01:25 AM Joco[m]: CMD.feedrate(1.0)```
01:27 AM Joco[m]: actually ... might be quite easy to start exposing some of those actions as pins. Wonder what hazzy would think of that as an idea.
01:31 AM Mufdvr0978[m]: I have found the python interface but I am wondering if the signals are documented somewhere? eg where do you find the info on machine.feed-override.set etc? I can see them being used but not where they are defined.
01:34 AM Mufdvr0978[m]: ah, I can see the linuxcnc.command feedrate, now I am starting to get it.
01:35 AM Joco[m]: actions are bound to a widget to be executed. The binding function is: https://github.com/kcjengr/qtpyvcp/blob/e348a3b26b19d2ccda1419405acb1292f46c0cbf/qtpyvcp/actions/init.py#L20
01:36 AM Joco[m]: from what I can see the machine actions are making using of methods that hang off linuxcnc.command()
01:37 AM Joco[m]: this is the python interface that linuxcnc itself provides.
01:37 AM Mufdvr0978[m]: starting to make sense now, I can see that set and reset are part of the class feed_override and the are running CMD.
01:38 AM Joco[m]: yes. and CMD = linuxcnc.command()
01:39 AM Mufdvr0978[m]: thank you, I think I know enough to write a user module but are wondering if that is the correct way to go about this, would it be better to expose the UI actions as pins?
01:42 AM Joco[m]: In this case I think the better view to take is exposing some core machine actions as pins via the framework. Means GUI designers do not need to do anything as the framework provides some of these key actions for free.
01:43 AM Joco[m]: I would want to test that thinking with some hazzy (lead) or other senior contributors but that would be my thinking at the moment.
01:44 AM Joco[m]: * I would want to test that thinking with hazzy (lead) or other senior contributors but that would be my thinking at the moment.
02:43 AM TurBoss: Joco: whats the ide you mentioned
02:49 AM Joco[m]: I'm using Eclipse. pycharm is also supposed to be good. hazzy uses that
02:49 AM Joco[m]: I had issues with pycharm on my Mint 19.3 install so went to eclipse
02:49 AM Joco[m]: lol - and just to prove me wrong its started working again.
02:49 AM TurBoss: trying eclipse
02:49 AM TurBoss: :)
02:49 AM TurBoss: made some space on hdd
02:49 AM Joco[m]: I'm seeing if I can get pycharm to do what I had Eclipse doing. Eclipse is fiddly to get working. UNLESS you install from apt
02:49 AM TurBoss: :o
02:49 AM Joco[m]: then might be easier
02:49 AM Joco[m]: pycharm at least is a pureplay python environment
02:49 AM TurBoss: ok if you find the way letme know!
02:49 AM TurBoss: :P
02:49 AM Joco[m]: playing at the moment
02:57 AM TurBoss: i pay for pycharm
02:57 AM TurBoss: lol
02:57 AM TurBoss: told hazzy to start using it
02:58 AM TurBoss: comunity version is complete for qtpyvcp
03:00 AM Joco[m]: ok - got it working
03:00 AM TurBoss: I use pay version for remote debuging
03:00 AM TurBoss: you got it?
03:00 AM Joco[m]: https://www.jetbrains.com/help/pycharm/attaching-to-local-process.html
03:01 AM Joco[m]: just did that for a running linuxcnc gui. set a break point and breakpoint triggered.
03:01 AM Joco[m]: need to make sure you have correct interperter set for the project.
03:02 AM Joco[m]: If you use pycharm for remote debugging then I guess you know how to load the framework or a gui project
03:04 AM TurBoss: but you managed to run with pydev
03:05 AM Joco[m]: yup
03:06 AM Joco[m]: pycharm looks to be using a pydev debug server
03:07 AM TurBoss: i think you can save a run configuration
03:08 AM Joco[m]: not sure if that is budled with it or if its cose I installed one earlier
03:09 AM TurBoss: so how do i run qtpyvcp with debuger?
03:10 AM Joco[m]: all I did was run up a gui
03:10 AM Joco[m]: then attach to the process per that link
03:11 AM Joco[m]: I can do a quick video of my screen if not make sense
03:16 AM TurBoss: please
03:16 AM Joco[m]: okay - bear with
03:16 AM TurBoss: but you attach to arunning process or start it in debug mode
03:21 AM Joco[m]: just uploading video to show
03:21 AM Joco[m]: attach to running process. You will see in a few mins
03:22 AM Joco[m]: https://drive.google.com/open?id=1vtGsYOzZAkhreQtm57AgKdu1RH6hn4mN
03:23 AM Joco[m]: it is possible you migh be able ti run direct from within pycharm Have not tried that yet
03:23 AM TurBoss: checking
03:24 AM Joco[m]: I tend to attach to already running process as I know I have the correct linuxcnc env
03:25 AM TurBoss: hurray!
03:25 AM TurBoss: got ir
03:25 AM TurBoss: * got it
03:26 AM Joco[m]: cool
03:26 AM Joco[m]: I had to set my interpreter env to be 2.7 as it defaulted to 3
03:26 AM Joco[m]: but after that was easy
03:27 AM TurBoss: figured another way
03:27 AM TurBoss: sorry
03:28 AM * TurBoss uploaded an image: Captura de pantalla de 2020-05-25 10-18-38.png (72KB) < https://matrix.org/_matrix/media/r0/download/jauriarts.org/UZZBbhuCponckaVZnXYxKket >
03:28 AM Joco[m]: oh - all good.
03:30 AM Joco[m]: how did you get that python debug server configuration?
03:31 AM Joco[m]: I have the templates but nothing about debug server
03:31 AM TurBoss: maybe is only for the paid version
03:31 AM TurBoss: :(
03:34 AM TurBoss: not gud
03:36 AM Joco[m]: is ok. At the end I have an easy way to connect to a running process. Which is same as eclipse
03:36 AM TurBoss: ok
03:36 AM TurBoss: win win
03:36 AM Joco[m]: correct
03:36 AM Joco[m]: And you can know debug properly.
03:38 AM TurBoss: sure
03:41 AM TurBoss: finally
03:41 AM TurBoss: \o/
03:41 AM * TurBoss uploaded an image: Captura de pantalla de 2020-05-25 10-32-21.png (202KB) < https://matrix.org/_matrix/media/r0/download/jauriarts.org/RdYAjQOhCPbgrXwBvxjVCIPF >
03:42 AM TurBoss: wow
03:43 AM Joco[m]: I tell you it makes SUCH a difference
03:43 AM Joco[m]: when stuff is not doing what you think it should being able to step through and check var states is just fundamental to dev work
04:13 AM TurBoss: now I don't know what to debug lol
04:13 AM Joco[m]: if it moves, debug it
05:24 AM JT-Cave: morning
05:24 AM Joco[m]: morning
05:26 AM TurBoss: morning
05:37 AM Joco[m]: WIN - just added my first hal pin via code and exposed feed-override.rest
05:37 AM Joco[m]: kicked it via hal show and it WORKED
05:50 AM TurBoss: nice
05:54 AM Joco[m]: working through a way expose a bunch of pins for end users for common functions like machine on, the override resets, maybe the override input values etc
05:54 AM Joco[m]: the sort of stuff gmoccapy gives
05:54 AM Joco[m]: If we do it at the framework level then guis get it for free
08:44 AM mozmck: Joco[m]: have you looked at halui?
10:11 AM hazzy-m: mozmck: hello
10:13 AM mozmck: hi hazzy-m!
10:36 AM Lcvette1: morning
10:36 AM Lcvette1: \
10:37 AM Lcvette1: * morning
10:37 AM Lcvette1: o/
02:34 PM Joco[m]: mozmck: yup seen halui. The only thing i think halui makes “hard” is the overrides resets. I think it can be done by setting direct input true, set counts to ether 0 or 1 then restore the previous value of direct input. Tests i should not doing this could get odd results. A simple rest pin would be much more elegant.
02:35 PM mozmck: what is a "rest" pin?
02:35 PM Joco[m]: * mozmck: yup seen halui. The only thing i think halui makes “hard” is the overrides resets. I think it can be done by setting direct input true, set counts to ether 0 or 1 then restore the previous value of direct input. Tests i did showed not doing this could get odd results. A simple rest pin would be much more elegant.
02:36 PM Joco[m]: * mozmck: yup seen halui. The only thing i think halui makes “hard” is the overrides resets. I think it can be done by setting direct input true, set counts to ether 0 or 1 then restore the previous value of direct input. Tests i did showed not doing this could get odd results. A simple reset pin would be much more elegant.
02:36 PM Joco[m]: Fixed. Sodding auto correct
02:36 PM mozmck: Haha!
02:36 PM mozmck: ah, reset pin.
02:37 PM mozmck: So are you adding that to halui or somewhere else?
02:38 PM Joco[m]: Im testing making those pins available from the qtpyvcp framework
02:40 PM Joco[m]: The linuxcnc python interface provides those higher order commands. So just exposing them as hal pins. I have no idea how to do that in the linuxcnc code base.
02:41 PM Joco[m]: Plus, even if i did figure that out I suspect that pull request would sit there for a very long time.
02:54 PM Joco[m]: Just been reading through the halui.cc file. My head hurts. Not recommended on an ipad.
11:40 PM Not-944e: [02qtpyvcp] 07joco-nz opened pull request 03#37: Expose override reset pins - cheerypick - 13https://git.io/Jfwmw