#flex-dev Logs

Jun 10 2025

#flex-dev Calendar

04:38 AM Tom_L: morning
06:18 AM JT-Shop: finally connected
09:19 AM JT-Cave: 19 miles this morning
09:46 AM Tom_L: 19 more than me
09:46 AM Tom_L: but i need to do the yard today
09:48 AM Tom_L: doc thinks i might make it another 6mo
11:21 AM JT-Cave: that's good
11:30 AM Tom_L: ok yard done, shower done, waiting for the washer repair guy
11:31 AM Tom_L: nothing serious but has a 5 year part/labor warranty so...
11:34 AM JT-Cave: fridge guy comes tomorrow
11:43 AM Tom_L: never met but so far i like this guy. just called to confirm a 12:00
11:45 AM JT-Cave: my appointment is for 8am to 5pm LOL
11:52 AM Tom_L: he originally gave me an hour window
11:57 AM * JT-Cave hears a nap calling his name
02:58 PM JT-Shop: so for the file load buttons the file has to either be in the [DISPLAY] PROGRAM_PREFIX path or the full path must be supplied... that makes it simple for me to program instead of finding and searching a bunch of directories
03:13 PM lcnc-relay: <roguish> JT. that's ok, as long as it in the docs...........and I'm sure it will be.....
03:19 PM lcnc-relay: <roguish> ok, well, my ride time.... .going out for about 20 miles...... bbl
03:54 PM lcnc-relay: <voiditswarranty@> forgive my python noobness, I'm a c++ guy.
03:54 PM lcnc-relay: question about the IMPORT_PYTHON feature https://gnipsel.com/linuxcnc/flexgui/python.html:
03:54 PM lcnc-relay: def startup(parent):
03:54 PM lcnc-relay: print("Started")
03:54 PM lcnc-relay: ... long message truncated: https://jauriarts.org/_heisenbridge/media/jauriarts.org/DjZkFFiIWFSVhwcsUPSrRILR/XXG23qVnEpw (14 lines)
03:56 PM JT-Shop: can you https://paste.debian.net/ the message it's too long to view here
04:05 PM lcnc-relay: <voiditswarranty@> you bet
04:07 PM lcnc-relay: <voiditswarranty@> https://pastebin.com/CFY4sUN3
04:07 PM lcnc-relay: <voiditswarranty@> sorry for the essay 😄
04:07 PM JT-Shop: np
04:09 PM JT-Shop: yeah, I would not try and run flex from a terminal while linuxcnc is running any more, as you saw it doesn't startup or shut down correctly if you run it multiple times
04:09 PM JT-Shop: so back to the button partial needs the function and the parent
04:10 PM lcnc-relay: <voiditswarranty@> I don't think that's related, it happens on a fresh start of linuxcnc too
04:11 PM JT-Shop: so parent.get_names_pb.clicked.connect(partial(get_names, parent))
04:11 PM JT-Shop: needs the function get_names in the python file you're importing
04:11 PM JT-Shop: you pass parent to a function to be able to access everything in the gui
04:12 PM lcnc-relay: <voiditswarranty@> yeah, and it explodes if it doesn't have it
04:12 PM lcnc-relay: <voiditswarranty@> hence print in the reproduction, there's no way that doesn't exist
04:12 PM JT-Shop: so if you have a label in the ui file called my_label then parent.my_label.setText() will set the text of that label
04:13 PM Tom_L: any ideas on teleop or coord yet?
04:13 PM lcnc-relay: <voiditswarranty@> yeah, that's what I was expecting, but it's not calling anything on click. (tried your example code directly
04:13 PM JT-Shop: I almost never use lambda
04:13 PM JT-Shop: parent.x_max_here_pb.clicked.connect(lambda: print("HERE"))
04:13 PM JT-Shop: that should be valid if the lambda part is correct
04:16 PM Tom_L: teleop doesn't use the trajectory planner where coord does
04:17 PM lcnc-relay: <voiditswarranty@> have you ever seen the UI locking up when trying to access parent through startup()? That's why I was starting flex separately, it sometimes locks up starting it via the ini, but doesn't starting it separately.
04:17 PM Tom_L: https://linuxcnc.org/docs/2.6/html/code/Code_Notes.html#_teleop
04:17 PM Tom_L: that goes back to 2.6
04:17 PM JT-Shop: no, I've never seen flex lockup
04:17 PM JT-Shop: just doing a bit of a test atm
04:17 PM Tom_L: me either
04:18 PM Tom_L: and i've tried :)
04:18 PM lcnc-relay: <voiditswarranty@> doesn't happen on my rpi, just my dev machine. odd.
04:18 PM lcnc-relay: <voiditswarranty@> oh, I wonder if it's my cycle time or something
04:18 PM JT-Shop: and one thing I do when testing is to create a desktop shortcut then copy it to the bar thing and make it application in a terminal so you can use print to debug
04:19 PM lcnc-relay: <voiditswarranty@> I almost always start it directly from the terminal so I can see everything print
04:19 PM lcnc-relay: linuxcnc /path/to/ini.ini
04:19 PM lcnc-relay: <voiditswarranty@> that's how I know my code is valid, if it's not and like you say the function doesn't exist, it throws an exception
04:21 PM JT-Shop: def startup(parent):
04:21 PM JT-Shop: parent.test_pb.clicked.connect(test1)
04:21 PM JT-Shop: def test1():
04:21 PM JT-Shop: print('test')
04:21 PM JT-Shop: just tested that and it works fine
04:22 PM JT-Shop: I find it's easier to just push the button and a terminal appears by magic
04:23 PM JT-Shop: parent.test_2_pb.clicked.connect(lambda: print("HERE"))
04:23 PM JT-Shop: this also works as expected
04:23 PM lcnc-relay: <voiditswarranty@> it can just be a normal QPushButton or whatever it is, right? Doesn't need to be a flex specific widget?
04:23 PM JT-Shop: perhaps you have a typo in the name?
04:24 PM JT-Shop: correct just a qpushbutton with the object name you want to use
04:24 PM lcnc-relay: <voiditswarranty@> when I do, I get an exception because connect() won't exist on a null
04:24 PM lcnc-relay: <voiditswarranty@> when I do have a typo I mean
04:25 PM JT-Shop: ah ok
04:25 PM JT-Shop: try running display = flexgui and making a toolbar button that opens in terminal
04:25 PM lcnc-relay: <voiditswarranty@> well, gonna solve my problem with the ui locking up first, maybe starting it in a second termianl to make it work is hiding a root cause
04:25 PM JT-Shop: works great for trouble shooting
04:26 PM lcnc-relay: <voiditswarranty@> yeah running display = flexgui has the same issue, except for when it locks up on me for some reason
04:26 PM JT-Shop: yeah, I removed most of the code to setup flex when trying to run it like that
04:26 PM JT-Shop: is there any hardware specific items in the configuration?
04:27 PM lcnc-relay: <voiditswarranty@> gonna strip the config back to the minimums and align it with one of your mill touch example configs
04:27 PM JT-Shop: ok
04:27 PM lcnc-relay: <voiditswarranty@> it's sim hardware, so
04:27 PM lcnc-relay: <voiditswarranty@> oohhh maybe it's in the sim hal stuff
04:28 PM JT-Shop: oh my don't use the sim hal crap
04:28 PM JT-Shop: start with the simple sim example
04:30 PM lcnc-relay: <voiditswarranty@> oh, that's WAY simpler
04:31 PM JT-Shop: thank you
04:32 PM JT-Shop: I need to make a section in the manual on how to get started building your flex gui
04:33 PM JT-Shop: a step by step to develop it
04:39 PM lcnc-relay: <voiditswarranty@> ah, I see. swapped in the simplesim config (thank you, that runs so much faster) but still got a lockup, so checked dmesg
04:39 PM lcnc-relay: [19689.283801] misc dxg: dxgk: dxgkio_query_adapter_info: Ioctl failed: -2
04:39 PM lcnc-relay: heh looks like I have hardware GPU acceleration issues even though I don't have the plot widget
04:40 PM JT-Shop: rpi?
04:40 PM lcnc-relay: <voiditswarranty@> amd64 in this case
04:41 PM lcnc-relay: <voiditswarranty@> though, not sure what needs hardware acceleration though. glxinfo and glxgears work just fine with software GL (mesa)
04:41 PM JT-Shop: that's above my pay grade :)
04:42 PM lcnc-relay: <voiditswarranty@> well, that's probably it at least, the low level C layer crashing out before that event handler fires
04:42 PM lcnc-relay: <voiditswarranty@> mark this one as ignore, cannot reproduce 😄
04:44 PM JT-Shop: yuck I have a small window tomorrow for the fridge repair person 8am to 5pm
04:47 PM JT-Shop: recon I'll mow the grass for the second time this year
05:08 PM Tom_L: hope he doesn't show at 4:55 and quit at 5
05:08 PM Tom_L: this guy was a real talker
05:08 PM Tom_L: repair took maybe 2 min which i kinda figured
05:08 PM Tom_L: i think he felt he had to earn the call by taking my time talking
05:09 PM lcnc-relay: <voiditswarranty@> my last plumber has a minimum 1 hour rate. did the 20 minute job and talked the rest of the hour last time, drove me nuts. I don't mind paying him the rest of the hour of I can also use the rest of that hour 😄
05:09 PM Tom_L: this was warranty anyway
05:10 PM Tom_L: doc was a vampire today
05:10 PM Tom_L: we'll wait and see if it was the right flavor
05:12 PM JT-Shop: did he fix it?
05:14 PM lcnc-relay: <roguish> finished my 21 mile ride......
05:15 PM JT-Shop: I felt pretty good today on my ride of 19 miles... going to change it up to get 20
05:15 PM JT-Shop: but I have to sit here and wait tomorrow and oil change thursday
05:19 PM Tom_L: noting to fix
05:20 PM Tom_L: oh the washer just had a squeak and i kinda knew what it was
05:20 PM lcnc-relay: <roguish> JT-Shop: do what you're comfortable with
05:21 PM JT-Shop: yup, I don't push myself at my age
05:21 PM JT-Shop: what was the squeak?
05:21 PM Tom_L: there is some plastic washer or such that needed some lube
05:21 PM Tom_L: i didn't crawl under to look
05:22 PM Tom_L: and took google's word for it without watching a yt about it
05:22 PM JT-Shop: at least you have service people in a big city
05:22 PM JT-Shop: took them a week or more to get a service lined up
05:22 PM Tom_L: yeah kinda nice but i am used to doing my own
05:23 PM Tom_L: never had one that came with a 5yr parts/labor warrant
05:23 PM Tom_L: y
05:23 PM JT-Shop: me too... but if it's in warranty let them fix it
05:23 PM Tom_L: exactly
05:24 PM Tom_L: i got this brand because they use it in laundry mats & on the ships we've been on
05:24 PM Tom_L: i figure it must be fairly reliable
05:25 PM JT-Shop: the kenmore 22 is reliable still running at 38 years
05:25 PM Tom_L: yeah my first set lasted like that too
05:25 PM Tom_L: you can't get that quality anymore
05:26 PM Tom_L: speed queen has good ratings
05:26 PM JT-Shop: probably not as efficient but it works
05:26 PM Tom_L: 'if it works' is worth alot