Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move AP_Scripting object up to AP_Vehicle #26097

Merged
merged 12 commits into from
Feb 7, 2024

Conversation

peterbarker
Copy link
Contributor

Setup for testing was this for each vehicle:

param set SCR_ENABLE 1
param ftp
param set SCR_USER6 17
param set SCR_HEAP_SIZE 222222

... then making sure those parameter values were still present on the new firmware.

@peterbarker
Copy link
Contributor Author

Board               AP_Periph  blimp  bootloader  copter  heli  iofirmware  plane  rover  sub
Durandal                       56     *           40      40                32     64     32
HerePro             -8                                                                    
Hitec-Airspeed      *                                                                     
KakuteH7-bdshot                48     *           56      56                48     48     24
MatekF405                      *      *           *       *                 *      *      *
Pixhawk1-1M-bdshot             *                  *       *                 *      *      *
f103-QiotekPeriph   *                                                                     
f303-Universal      *                                                                     
iomcu                                                           *                         
skyviper-v2450                                    *                                       

@IamPete1
Copy link
Member

This means that scripting now comes up before a bunch of other stuff? What happens if my script needs some of that for its first run? For example it looks like on copter scripting now comes before attitude control and motors. We have singletons for those, so will a script error out on its first run? They can dump you in config error loops also, I wonder what happens to the script in that case.

I think my preference would be to just move scripting to be the last thing init. It means were less likely to hit issues with this change, or in the future if we add more things after where this PR moves it to. I can't immediately think of an problem that would result from having the script come up after stuff its currently before.

@peterbarker
Copy link
Contributor Author

This means that scripting now comes up before a bunch of other stuff? What happens if my script needs some of that for its first run? For example it looks like on copter scripting now comes before attitude control and motors. We have singletons for those, so will a script error out on its first run? They can dump you in config error loops also, I wonder what happens to the script in that case.

I think my preference would be to just move scripting to be the last thing init. It means were less likely to hit issues with this change, or in the future if we add more things after where this PR moves it to. I can't immediately think of an problem that would result from having the script come up after stuff its currently before.

I've moved it.

@peterbarker
Copy link
Contributor Author

... I've also done a smoke test to make sure hello_world.lua works on real hardware.

@tridge tridge merged commit b69c51a into ArduPilot:master Feb 7, 2024
92 checks passed
@peterbarker peterbarker deleted the pr/scripting-up branch February 7, 2024 07:53
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.

3 participants