Backport latest scripting to Copter-4.4 git branch

Greetings! I am looking forward to use the latest scripting globals, namely mavlink, camera, mount and require on otherwise stable firmware. That is, I will have to build a custom firmware. What else do I need in order to achieve that, other than merging commits from the PRs listed below into stable fork?

All help is very much appreciated, thank you in advance for your assistance!

Hello @partisanapiarist , welcome to the community,

yes, that is basically it, git rebase those branches back to the Copter-4.4 branch. Just make sure to rebase only the last n commits from those branches, not the entire master branch :slight_smile:

1 Like

Thank you for the warm welcome and better wording!
To rebase or cherrypick turned out quite problematic, because branches from the PRs are avaliable no longer. To pick individual commits from the PR I failed miserably as well. For instance,

user@DESKTOP-CIHA7S1:~$ git clone https://github.com/ArduPilot/ardupilot.git
Cloning into 'ardupilot'...
remote: Enumerating objects: 437925, done.
remote: Counting objects: 100% (248/248), done.
remote: Compressing objects: 100% (176/176), done.
remote: Total 437925 (delta 120), reused 150 (delta 72), pack-reused 437677
Receiving objects: 100% (437925/437925), 305.13 MiB | 1.73 MiB/s, done.
Resolving deltas: 100% (324923/324923), done.
Updating files: 100% (5852/5852), done.

user@DESKTOP-CIHA7S1:~$ cd ardupilot
user@DESKTOP-CIHA7S1:~/ardupilot$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

user@DESKTOP-CIHA7S1:~$ git cherry-pick 9737d8c890bb5295d31efee457153fbadfa90de1
fatal: bad object 9737d8c890bb5295d31efee457153fbadfa90de1

How exactly do you suggest rebasing those branches? A complete command will be met with extreme gratitude.

git checkout Copter-4.4
git checkout -b my_branch
git cherry-pick 03148a113f792797fb7e5ca2ab77c9e3c4b25656
git cherry-pick 5d29935039595d4f496c84e9781694b168f8d696
git cherry-pick 58b73c3613a09da175fb7b101d7f757de7b0f1f8

git cherry-pick 1a9189d602debc5ff03a7c4218d45670d00f8224
gi cherry-pick 598919d8ad076f0aa288e41df099c02de429a451

git cherry-pick 06b5400d0bf582225397e761eca2e8b43cab1200

Thank you very much!
Now I think I am starting to understand what seems to be the problem: the commit hashes are different form the ones I took from the PR. Where did you get the hashes from? I need fill in the ellipsis, after all.

All are from the master branch. Use“gitk master“ search function to find them.

Thank you!
After merging I have run into the next issue: these PRs, especially the new viewpro driver, seem to depend on new lua features, like require.
Lua: /APM/scripts/mount-viewpro-driver-4.5.lua:155 attempt to call a nil value (global 'require')
Yet, I was unable to find it in commit descriptions. What PR do I need?

use gitk --all and search for viewpro in the commit messages