Skip to content

Add custom script execution functionality with menu integration#128

Merged
henkwiedig merged 3 commits into
OpenIPC:masterfrom
Lupinixx:custom-script-execution
May 29, 2026
Merged

Add custom script execution functionality with menu integration#128
henkwiedig merged 3 commits into
OpenIPC:masterfrom
Lupinixx:custom-script-execution

Conversation

@Lupinixx

Copy link
Copy Markdown
Contributor

This pull request adds a new "Scripts" menu section to the UI. This scans the /media/dvr/scripts folder for .sh scripts and lists them. once selected it first asks for confirmation, and after shows the console output of the script in a new window.
This is made so it is easier to add custom functionality that is not nescesarily something we want to integrate directly into pixelpilot. Example would be a script that copies a binary for APFPV to the drone/vtx, and executes a sysupgrade on the drone side.
Or as shown in this video a script to do a firstboot on the vtx.

2026-05-22.14-49-14.mp4

@henkwiedig

henkwiedig commented May 22, 2026

Copy link
Copy Markdown
Collaborator

Nice, i like the fact that it returns actual script output, wanted to do this myself.
Will have to try this but it seems like it can be more line buffered, the output does not show in a continous fashion. Might also be the called script's fault.

Did you know that there already is a "custom script" support ?
See:

Does it make sense to merge these two pages/features ? Might confuse otherwise.
Like haveing coded buttons, configured buttons and dynamically looked up buttons like you show here ?

@Lupinixx

Lupinixx commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

Yeah i've used those actions before, but now you say it, imo it does make sense to merge those.
Looking at current coded buttons. We could maybe just remove those from the gsmenu.sh and include them as standard dynamic buttons / .sh scripts in the build like i have created here?
Same with the 'actions'. Those require a bit more configuration. Having to just place the scripts in the dvr folder seems like a nicer and more user friendly solution to me opposed to having to also configure a yaml file.
Or we should indeed at least merge those 2 into the same menu, but then keep the coded buttons and actions seperate from the dynamic / imported script buttons.
Let me know what you think @henkwiedig

I'll see if i can do something about the continious log output

@henkwiedig

Copy link
Copy Markdown
Collaborator

I would go with merge those 2 into the same menu and keep both functionalities.

@Lupinixx

Copy link
Copy Markdown
Contributor Author

New commit merges the before newly created scripts menu into the existing Action menu. Also fixed the buffered output of the console.
New video showing the change;

2026-05-24.23-28-02.mp4

@henkwiedig henkwiedig merged commit 5a19eb4 into OpenIPC:master May 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants