feat: gcode_shell_command: option to terminate or not subprocess #237
Reference in New Issue
Block a user
Delete Branch "ruben-podadera/master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi @th33xitus,
I'm using
gcode_shell_commandto take a timelapse (with gphoto and an external camera plugged in usb). I set as many camera settings as possible in manual mode so the photography process is quite fast (less than 1s). But after that, I copy the image file to a network drive. This part takes up to 10 seconds.I dont want to pause the print job for something that can be made in background. So I just added a config for the
gcode_shell_commandin order to let the subprocess continue if I want to.I know that this is far from perfect (could may be add a second "safety" timeout to actually terminate the subprocess) but may be it could help other users.
Anyway, thank you for you work. Regards
I can update the doc if you want to
Hi, thanks for contributing.
Can you give me an example where you make use of that new option?
I haven't tried it yet but is it not possible to call an external shell script and inside there, start subprocesses as you wish?
In any case, if your idea makes sense and we merge it, we definitely need an example in the docs i would say.
Hi ! Sorry for the long answer, i'll try to be quicker now.
I use this command to take pictures with gphoto.
macro_timelapse.cfg :
gphoto_take_snapshot.sh :
With the camera model I have, once the picture is taken, it takes a while before gphoto command returns. For what I've measured, the picture is taken around 1s but the command takes around 9s to return. Thats a lot of time for each layer. Thats why I set
timeout: 2.andterminate: FalseHow does sudo work for you, I want to run a script for updating the firmware of the board, but sudo does not work for me, because it says that a password must be entered. sudo service klipper stop and sudo service klipper start not working.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.