#flex-dev Logs
Nov 07 2025
#flex-dev Calendar
04:25 AM Tom_L: morning
04:45 AM JT-Cave: morning
04:46 AM JT-Cave: 58°F - 74°F
06:00 AM lcnc-relay: <AllAboutJake@> rdtsc-w: this is my script.
06:00 AM lcnc-relay: #!/bin/sh
06:00 AM lcnc-relay: /home/cnc/flexgui
06:00 AM lcnc-relay: debuild -us -uc
06:00 AM lcnc-relay: ... long message truncated: https://jauriarts.org/_heisenbridge/media/jauriarts.org/YmAoIKTiTxKYvXvPuLdNAFKI/kTMzYw77S5Y (6 lines)
06:01 AM lcnc-relay: <AllAboutJake@> It works, I was just wondering if there was a way to "run in place" from the cloned repo in "/home/cnc/flexgui"
06:36 AM JT-Cave: https://paste.debian.net/1404980/
06:38 AM lcnc-relay: <AllAboutJake@> this is my script.
06:38 AM lcnc-relay: #!/bin/sh
06:38 AM lcnc-relay: cd /home/cnc/flexgui
06:39 AM lcnc-relay: debuild -us -uc
06:39 AM lcnc-relay: ... long message truncated: https://jauriarts.org/_heisenbridge/media/jauriarts.org/DuhrMcBfrQpNYUjvRwWAuaic/tF3j03yJmyk (6 lines)
06:45 AM Tom_L: PR #385
06:45 AM Tom_L: thanks
06:53 AM Tom_L: i'll test that later
07:12 AM JT-Cave: almost done...
07:12 AM JT-Cave: but not quite
07:13 AM Tom_L: not saving here unless i didn't get the deb installed on the pi
07:13 AM Tom_L: i'll check on it later..
07:13 AM Tom_L: when i finish the ui, i'd like your input on touch stuff on it
07:14 AM Tom_L: i got all the tabs done, just need to go back over it and check things
07:15 AM JT-Cave: now I'm done the gcode, numbers and keyboard remember their position for the object that called it
07:16 AM JT-Cave: build again
07:16 AM Tom_L: ok
07:17 AM Tom_L: i discarded the deb
07:19 AM JT-Cave: ok
07:19 AM Tom_L: http://tom-itx.no-ip.biz:443/~webpage/cnc/JT-SHOP/flexgui/rpi5/GUI/
07:19 AM Tom_L: there's the latest ui so far
07:20 AM Tom_L: save position works
07:20 AM Tom_L: can there be a 'global' position save?
07:20 AM JT-Cave: no
07:20 AM Tom_L: ok
07:21 AM JT-Cave: well yup but it doesn't make sense because you may want one to be upper left and one to be lower right so you don't cover up the object
07:22 AM JT-Cave: that's a lot of layouts
07:22 AM Tom_L: once i move them all it will be great
07:22 AM Tom_L: took a bit to get that far
07:22 AM Tom_L: but it works and resizes good
07:22 AM Tom_L: couple spots need a little work
07:23 AM Tom_L: add that ui to touch-probe3 and try it
07:23 AM JT-Cave: the tool tab doesn't have a layout
07:23 AM Tom_L: that was a last min midnight addition
07:23 AM Tom_L: i realized i'd forgotten tools
07:24 AM Tom_L: gotta run
07:25 AM Tom_L: thanks for fixin that
07:26 AM JT-Cave: ok
09:39 AM lcnc-relay: <AllAboutJake@> Playing with adding a hal pin to a QFrame that triggers visibility:
09:39 AM lcnc-relay: <AllAboutJake@> https://jauriarts.org/_heisenbridge/media/jauriarts.org/MKQaxcwbEYGaAtbkLjHcCTOA/Es8VIJDOtiE/qframe.gif
09:40 AM lcnc-relay: <AllAboutJake@> https://jauriarts.org/_heisenbridge/media/jauriarts.org/FrsOdfZKZCdxYAprlsKZFWeg/MFFzKWBSfEw/image.png
10:05 AM lcnc-relay: <AllAboutJake@> https://jauriarts.org/_heisenbridge/media/jauriarts.org/iSnCGwSvEPndKcxKNoYhaQnD/q39LJW3Am4U/buttons.gif
10:05 AM xxcoder: interesting
10:06 AM xxcoder: looks pretty great, though if I was adopting for my own personal use, I would make text easier to read lol. green on blue is not exactly high contrast.
10:08 AM lcnc-relay: <AllAboutJake@> just using the default probe3 example to start
10:09 AM lcnc-relay: <AllAboutJake@> the architecture only lets you use a hal signal once over the UI so it kind of feels messy
10:12 AM lcnc-relay: <AllAboutJake@> net homenet flexhal.is-all-homed <= motion.is-all-homed
10:12 AM lcnc-relay: net homenet flexhal.is-all-homed-2 <= motion.is-all-homed
10:12 AM lcnc-relay: <AllAboutJake@> One QFrame takes the first hal signal and the other takes the 2nd and I added a checkbox to invert:
10:13 AM lcnc-relay: <AllAboutJake@> https://jauriarts.org/_heisenbridge/media/jauriarts.org/jTChObSYztgsQePutWuMfqCM/-h-HBmle91A/image.png
10:13 AM lcnc-relay: <AllAboutJake@> not sure I'll use this but I was just experimenting.
10:15 AM xxcoder: always good to learn :D
11:24 AM JT-Cave: you can do a lot with flex just by using the python import
11:30 AM JT-Cave: <AllAboutJake@> the architecture only lets you use a hal signal once over the UI so it kind of feels messy
11:30 AM JT-Cave: not sure I understand what you're saying
11:37 AM lcnc-relay: <AllAboutJake@> JT-Cave: This check fails when I create two things that both refer to the same HAL pin:
11:37 AM lcnc-relay: if pin_name in dir(parent):
11:37 AM lcnc-relay: msg = (f'HAL Frame {frame_name}\n'
11:37 AM lcnc-relay: f'pin name {pin_name}\n'
11:37 AM lcnc-relay: ... long message truncated: https://jauriarts.org/_heisenbridge/media/jauriarts.org/jMzpBPOyHTIwjaChtAszKGME/GADBijqSrxk (8 lines)
11:39 AM JT-Cave: yup you can't create two pins with the same name but a signal can be used multiple times
11:39 AM JT-Cave: if you try and create two pins with the same name emc will bitch and not run
11:41 AM JT-Cave: for example a hal led label is a reader so you can have multiple hal labels with different pin names all reading the same sender pin
11:43 AM lcnc-relay: <AllAboutJake@> gonna say this clumbsily, but....: you can create the pin once on the first widget that refers to it, and not fail on the second widget. and still have multiple QT widgets that update in status
11:43 AM lcnc-relay: <AllAboutJake@> but that's not how flex is currently constructed.
11:47 AM JT-Shop: hal pin names must be unique, it's not a flex thing
11:48 AM JT-Shop: there is a difference between a pin and a signal
11:49 AM JT-Shop: http://linuxcnc.org/docs/stable/html/hal/basic-hal.html#sub:hal-net
11:49 AM lcnc-relay: <AllAboutJake@> yeah I mean the hal pin is created with the call to "parent.halcomp.newpin(pin_name, hal_type, hal_dir)" but once its created, and attached to the parent, there's no reason that multiple QWidgets couldn't react to it
11:50 AM lcnc-relay: <AllAboutJake@> but maybe I have it wrong
11:53 AM JT-Shop: to connect multiple widgets to a hal out pin they need to be hal in pins and the connection is done in the postgui.hal file
11:54 AM JT-Shop: and all pin names must be unique
11:54 AM JT-Shop: if you create a pyqt signal then multiple widgets can react to that I "think"
11:55 AM JT-Shop: yeah if they are programmed to monitor the custom qt signal they could
11:55 AM Tom_L: busy morning
11:56 AM JT-Shop: to be connected to a hal pin the widget must have a hal pin not sure how you would do it otherwise
11:56 AM lcnc-relay: <AllAboutJake@> In startup.py it loops through each widget in the UI file.
11:56 AM lcnc-relay: the first time it find a QT widget with the dynamic "pin_name" property, it will create the pin in the hal and attach it to the parent.
11:56 AM lcnc-relay: the 2nd widget with the same pin_name can't create the pin again, and instead it fails.,... but I think it could be allowed to pass and just not try and just re-use/monitor the same pin that was created on the first widget.
11:57 AM JT-Shop: that's pretty much what the code does it does not create the same pin name twice
11:57 AM lcnc-relay: <AllAboutJake@> more than 1 thing in the halreader array can be updated by a single pin
11:58 AM JT-Shop: correct but they must be reader type not sender type
11:58 AM lcnc-relay: <AllAboutJake@> ahh. right.. and the error isn't really a failure
11:58 AM JT-Shop: https://github.com/jethornton/flexgui/blob/master/flexgui/src/libflexgui/startup.py#L1846
11:59 AM JT-Shop: continue means skip it for the for loop
11:59 AM Tom_L: is this about the 2nd led thing i was asking about?
11:59 AM lcnc-relay: <AllAboutJake@> ahh yeah it continues. I'm gonna comment that out and see if it works
11:59 AM JT-Shop: the popup just warns you that the pin will not be created
12:00 PM JT-Shop: emc will not run
12:00 PM JT-Shop: but give it a whirl
12:02 PM JT-Shop: it's really nap time now
12:02 PM Tom_L: :)
12:02 PM Tom_L: and i just got back
12:03 PM Tom_L: allaboutjake, working on a touch version of that fwiw
12:03 PM lcnc-relay: <AllAboutJake@> Tom_L: Well in theory it could be used for multiple leds on the same signal. I was doing it for my appearing/disappering frames
12:03 PM Tom_L: i wanted a 2nd led to respond to a button led
12:04 PM Tom_L: since the probe enable isn't on the probe page i wanted an indicator there
12:06 PM lcnc-relay: <AllAboutJake@> yeah. same problem.
12:07 PM Tom_L: but i'm not a programmer
12:07 PM Tom_L: at least not python
12:50 PM lcnc-relay: <AllAboutJake@> Tom_L: the probe enable button is outisde the Probe tab so you can see it even with the probe tab active, what pin do you want to expose on the probe tab?
12:56 PM JT-Shop: the upshot is you can't have two objects in the same namespace with the same name
12:57 PM JT-Shop: start a new mainwindow in designer and drag two labels in and the first one has a object name of "label" the second is "label_2"
12:57 PM JT-Shop: try and delete the "_2" from the second label
12:59 PM lcnc-relay: <AllAboutJake@> so I think that in startup.py you can create the hal pins ONCE even if multiple QT widgets refer to the same hal pin. Then in status.py, have the value of the hal pin applied to multiple QT widgets. Like in the case of two LEDs for the same pin
01:01 PM Tom_L: allaboutjake, not on my new config :)
01:01 PM JT-Shop: not sure how you can have multiple widgets react to a hal pin unless they have a hal pin
01:01 PM * Tom_L goes back to work on the gui
01:02 PM * Tom_L puts up a 'do not disturb' sign in the hall
01:03 PM Tom_L: i had some fixes i probably should have written down
01:05 PM Tom_L: i see you fixed the keyboard too
01:10 PM JT-Shop: https://pasteboard.co/T6bPErUWyde6.png
01:10 PM lcnc-relay: <AllAboutJake@> Here's what I am working on:
01:10 PM JT-Shop: https://pasteboard.co/l6Cl5RWAMWtc.png
01:10 PM lcnc-relay: <AllAboutJake@> https://jauriarts.org/_heisenbridge/media/jauriarts.org/IDhaLvILsIokEwRbkLonMdfJ/B6rADvc516w/simplescreenrecorder-2025-11-07_14.08.23.mp4
01:12 PM lcnc-relay: <AllAboutJake@> The home/unhome buttons are in QFrames that show and hide based on all-homed pin
01:15 PM JT-Shop: why don't you use a stacked widget for that?
01:19 PM lcnc-relay: <AllAboutJake@> maybe i don't know how to use the stacked widget? :). This is driven off the state of the hal pin not just a button press
01:19 PM lcnc-relay: <AllAboutJake@> can you add change_page to button that also is a command?
01:20 PM JT-Shop: you can in python
01:27 PM lcnc-relay: <AllAboutJake@> Here's my code with what I'm playing with.
01:27 PM lcnc-relay: https://github.com/jake-b/flexgui/commit/5e5c5bdc380462dbcabe3584e26cb597bcdf20c5
01:28 PM lcnc-relay: <AllAboutJake@> if you look at line 2293 of startup.py you can kind of see what I mean, rather than erroring out the whole widget when the pin already exists, I just skip it silently if it already exists.
01:30 PM lcnc-relay: <AllAboutJake@> it adds it to hal_readers though so then in status.py it can apply the same pin value to multiple things that have asked to be a reader.
01:31 PM lcnc-relay: <AllAboutJake@> Might look at doing this with stacked widgets because I didn't realize that they were a thing. If I could be both a command button and also trigger a change to the stacked widget you can do the same thing.
01:31 PM Tom_L: JT-Shop, when i try to input a Qdoublespinbox before estop and power on, on a probe item that should be inactive linuxcnc crashes
01:32 PM Tom_L: using the input number dynamic property
01:33 PM Tom_L: on a regular config without the input number dynamic proterty before estop and power, they are inactive
01:34 PM Tom_L: the normal method works, with dynamic property 'input number' it crashes lcnc if you try doing it before power and estop enabled
01:34 PM Tom_L: .... and home all
01:35 PM JT-Shop: https://pasteboard.co/Hc1EKffA2ls2.png
01:35 PM Tom_L: same with the ops inputs
01:36 PM JT-Shop: https://pasteboard.co/JGEL5KtjGd1C.png
01:37 PM JT-Shop: they?
01:38 PM Tom_L: using dynamic property 'input number' if estop isn't enabled, if power is not on, if you are not homed... and you try to input a number in a qdoublespinbox, linuxcnc crashes
01:40 PM JT-Shop: ah ok
01:40 PM Tom_L: without the dynamic property the widgets are disabled like they should be
01:40 PM JT-Shop: oh I need to update here
01:41 PM Tom_L: interesting results running 2 configs side by side
01:42 PM * Tom_L keeps werkin on the ui
01:43 PM Tom_L: can a line edit use the number keypad?
02:03 PM JT-Cave: yup
02:05 PM JT-Cave: I just tested a spin box and double spin box with input number and no issues
02:06 PM JT-Cave: a line edit can use any popup as it's just text
02:08 PM lcnc-relay: <AllAboutJake@> So all my nonsense with QFrames isn't really necessary :). The "change_page" dynamic property can be applied to the _home_all_pb_ and _unhome_all_pb_ just fine. It will change the page and also trigger the appropriate home/unhome command.
02:10 PM Tom_L: http://tom-itx.no-ip.biz:443/~webpage/cnc/JT-SHOP/flexgui/rpi5/mill-touch-main.png
02:10 PM Tom_L: moved a few things around
02:10 PM Tom_L: comments?
02:12 PM Tom_L: http://tom-itx.no-ip.biz:443/~webpage/cnc/JT-SHOP/flexgui/rpi5/mill-touch-main-full.png
02:12 PM Tom_L: full screen
02:16 PM lcnc-relay: <AllAboutJake@> the advantage to the hal approach is that it stays consistent with the hal even if homing/unhoming is triggered by some other action.... this way, the buttons just trigger the stacked widget change and I guess its possible for them to get out of sync
02:21 PM JT-Shop: https://paste.debian.net/1405061/
02:22 PM JT-Shop: you could use some of the utilitie functions
02:22 PM JT-Shop: how are you getting everything is homed in hal?
02:25 PM JT-Shop: https://github.com/jethornton/flexgui/blob/master/flexgui/src/libflexgui/utilities.py#L128
02:27 PM JT-Shop: https://gnipsel.com/linuxcnc/flexgui/python.html#timer
02:35 PM lcnc-relay: <AllAboutJake@> JT-Shop: "net homenet flexhal.is-all-homed <= motion.is-all-homed"
02:44 PM JT-Shop: haven't seen that pin before cool
02:45 PM JT-Shop: hmm, I can't think of any error condition that would unhome a joint but there might be
02:47 PM JT-Shop: flexhal.is-all-homed is what type of hal object?
02:47 PM lcnc-relay: <AllAboutJake@> HAL_BIT
02:47 PM lcnc-relay: <AllAboutJake@> https://jauriarts.org/_heisenbridge/media/jauriarts.org/HCminzFCRQeKxHJnVKGYcvmP/LCzr_RsHD2U/multi-leds.gif
02:48 PM lcnc-relay: <AllAboutJake@> I updated it so that you can have multiple hal_leds or hal_labels with the same pin
02:48 PM JT-Shop: so it's a hal led or label?
02:49 PM lcnc-relay: <AllAboutJake@> if you see lower left it works for both
02:49 PM lcnc-relay: <AllAboutJake@> https://github.com/jake-b/flexgui/commit/ed35ee13760eff3216269f5cb99c3ac578aa6bcd
02:50 PM lcnc-relay: <AllAboutJake@> https://jauriarts.org/_heisenbridge/media/jauriarts.org/dGNIDtFLdjYVqQyptCBkUFny/XjmAOWU4kII/image.png
02:50 PM lcnc-relay: <AllAboutJake@> https://jauriarts.org/_heisenbridge/media/jauriarts.org/cKHPZflrMMhyTCdqLAzHTajU/oQgqN4eijWY/image.png
02:50 PM lcnc-relay: <AllAboutJake@> these are the definitions for those 5 lets and lablels on the example above
02:52 PM lcnc-relay: <AllAboutJake@> *leds and labels hehe
02:52 PM JT-Shop: that's cool
02:53 PM JT-Shop: now to figure out what torque I need for the half shaft caps on the C3
02:53 PM lcnc-relay: <AllAboutJake@> its a pretty simple change, you can see the commit above, but it probably could stand for more error checking
02:54 PM JT-Shop: if it works and only creates one hal pin then it's a win
02:55 PM lcnc-relay: <AllAboutJake@> like if you creat a HAL_BIT called is-all-homed now, and then try to make a label later and create it as a HAL_S32 then it probably should error
02:55 PM JT-Shop: yup
03:04 PM JT-Shop: well I found in the service manual the torque and I have to move one of the yokes 90°
03:14 PM C5-Shop: but that's impossible on an 82 C3
03:17 PM lcnc-relay: <AllAboutJake@> I added a direction/type check before re-using an existing HAL Pin:
03:17 PM lcnc-relay: https://github.com/jake-b/flexgui/tree/multiple_leds
03:25 PM C5-Shop: direction type checking is only needed if there is a choice
03:27 PM JT-Shop: I guess I didn't finish them all up
03:27 PM JT-Shop: https://github.com/jethornton/flexgui/blob/master/flexgui/src/libflexgui/startup.py#L2414
04:35 PM JT-Shop: Tom_L, are you still having an issue with a double spinbox with input number?
04:35 PM Tom_L: i went shopping so i haven't tested or pulled any new code yet
04:36 PM JT-Shop: ok
04:36 PM Tom_L: did you fix something?
04:36 PM JT-Shop: no, worked fine for me with a plain double spinbox
04:37 PM Tom_L: lemme make sure things are up to date on the pi but i'm pretty sure they are
04:38 PM Tom_L: just doc changes
04:40 PM Tom_rpi5: Traceback (most recent call last):
04:40 PM Tom_rpi5: File "/usr/bin/flexgui", line 88, in eventFilter
04:40 PM Tom_rpi5: dialogs.spinbox_numbers(window, source.parent())
04:40 PM Tom_rpi5: File "/usr/lib/python3/dist-packages/libflexgui/dialogs.py", line 36, in spinbox_numbers
04:40 PM Tom_rpi5: if dialog.exit_pos is not None: # save last position
04:40 PM Tom_rpi5: ^^^^^^
04:40 PM Tom_rpi5: UnboundLocalError: cannot access local variable 'dialog' where it is not associated with a value
04:40 PM JT-Shop: is it just a simple dbl spinbox?
04:40 PM Tom_L: crashed as soon as i clicked on the doublespinbox
04:41 PM Tom_L: i think all mine are double
04:41 PM JT-Shop: hal or ?
04:43 PM Tom_rpi5: http://tom-itx.no-ip.biz:443/~webpage/cnc/JT-SHOP/flexgui/DSB-error.png
04:44 PM JT-Shop: ok
04:44 PM Tom_rpi5: most if not all mine are double
04:47 PM Tom_rpi5: if you estop -> poweron -> home all it's ok
04:48 PM JT-Shop: for me the dbl spinbox is not enabled until you estop power home
04:48 PM Tom_rpi5: these aparently are with this config
04:49 PM Tom_rpi5: without the dynamic property they behave like they should
04:49 PM Tom_rpi5: my regular touch-probe3 works as expected
04:49 PM Tom_rpi5: the only thing changed was dynamic property input -> number
04:50 PM Tom_rpi5: behave like they should -> disabled until estop poweron home all
04:51 PM JT-Shop: which ui file is the issue in?
04:51 PM Tom_rpi5: mill-touch-layout
04:52 PM Tom_rpi5: the one on the site.. i can refresh it..hang on
04:52 PM Tom_rpi5: sftp://root@192.168.1.120/home/webpage/public_html/cnc/JT-SHOP/flexgui/rpi5/GUI/
04:53 PM Tom_rpi5: the associated files are there also
04:58 PM Tom_L: afk a bit
04:58 PM JT-Shop: that link doesn't look good
04:59 PM Tom_L: hang on
04:59 PM Tom_L: http://tom-itx.no-ip.biz:443/~webpage/cnc/JT-SHOP/flexgui/rpi5/GUI/
04:59 PM Tom_L: doesn't work?
05:00 PM JT-Shop: that one works
05:00 PM Tom_L: ahh i see
05:00 PM JT-Shop: but sftp does not
05:00 PM Tom_L: the rpi made it a local ip
05:00 PM Tom_L: i'd mapped the server is why probably
05:01 PM Tom_L: sftp wouldn't without a password..
05:02 PM Tom_L: ok, afk a bit
05:02 PM JT-Shop: ok
06:18 PM lcnc-relay: <AllAboutJake@> Does keyboard support rapid jog when holding shift? If didn’t seem like it in the simulator vm I’m using to play around but I didn’t try on my actual machine yet
07:14 PM Tom_L: i'm not sure but i don't think so
07:14 PM Tom_L: it would more likely follow the manual jog rate
07:16 PM Tom_L: yes, it follows the jog velocity slider
08:53 PM Tom_rpi5: JT-Cave, https://paste.debian.net/1405108/
08:55 PM Tom_rpi5: only happened once so far