- Posts: 336
- Thank you received: 0
Custom User Button External Command Issue
Second, I'm trying to string together a gcode and then a call to an external command like this:
BUTTON_7_NAME = CLICK\ME
BUTTON_7_CODE = G0 X5 Y5 \ %howdy
howdy is simple "hello world" executable python script that I've placed in /usr/local/bin for now.
When I click this button LinuxCNC throws the error:
HAL PIN ERROR:
Invalid code for user button #7
External command "%howdy" does not exist
BUT if i call the external command by itself:
BUTTON_7_CODE = %howdy
It finds the command and executes the script just fine.
Please Log in to join the conversation.
- snowgoer540
- Offline
- Platinum Member
-
- Posts: 2580
- Thank you received: 0
If that doesn't work, my guess is that there is an unintended feature holding this up.
Per the user guide, it should be valid. Just trying to determine if it doesn't like your script, or the problem is in the user button check.
Please Log in to join the conversation.
Please Log in to join the conversation.
- snowgoer540
- Offline
- Platinum Member
-
- Posts: 2580
- Thank you received: 0
AgentWD40 wrote: I'll give it a shot tonight. A problem with the button code validation sounds like a prime suspect since afterall I am able to execute the script from the button when the command is by itself.
No need, I had some time after work. I reckon it's an issue with the code. I'm sure it'll get sorted out.
Please Log in to join the conversation.
Please Log in to join the conversation.
I think I found the bug.
Line #2231 of qtplasmac_handler.py
should be
github.com/LinuxCNC/linuxcnc/blob/a316f2...mac_handler.py#L2231
Please Log in to join the conversation.
- snowgoer540
- Offline
- Platinum Member
-
- Posts: 2580
- Thank you received: 0
Thanks for the report!
I noticed a few other things about conversational while I was messing around with this tonight. So, some changes should be coming shortly.
Please Log in to join the conversation.
(repeated code *tisk* *tisk* *tisk* haha :laugh: )
Please Log in to join the conversation.
AgentWD40 wrote: Oh, and the same change needs to be made on line #2381 of the same file.
(repeated code *tisk* *tisk* *tisk* haha :laugh: )
Actually, redundant code...
Fix has been pushed along with some others. There are still some issues like accepting negative values when it shouldn't. I'll get around to them after my next pay rise.
Please Log in to join the conversation.
Line #2377: Instead of calling Popen, ACTION.SET_MANUAL_MODE() is called instead.
phillc54 wrote: I'll get around to them after my next pay rise.
Do you have a patreon, gofundme... onlyfans page or whatever where we can donate for your efforts?
Please Log in to join the conversation.
