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

Simplify g2 object conversion #26280

Conversation

peterbarker
Copy link
Contributor

@peterbarker peterbarker commented Feb 21, 2024

Board                    AP_Periph  blimp  bootloader  copter  heli  iofirmware  plane  rover  sub
CubeOrange-periph-heavy  *                                                                     
Durandal                            -48    *           -68     -68               -112   -96    -88
Hitec-Airspeed           *                                                                     
KakuteH7-bdshot                     48     *           20      20                -16    -8     -8
MatekF405                           60     *           68      60                60     44     32
Pixhawk1-1M-bdshot                  60                 60      60                60     44     40
f103-QiotekPeriph        *                                                                     
f303-Universal           *                                                                     
iomcu                                                                *                         
revo-mini                           60     *           68      60                60     44     32
skyviper-v2450                                         60                                      

@peterbarker peterbarker force-pushed the pr/parameter-conversion-static-const-array branch 2 times, most recently from 76c8c93 to 91e8b7a Compare February 21, 2024 11:37
@peterbarker peterbarker changed the title Plane: simplify g2 object conversion Simplify g2 object conversion Feb 22, 2024
@peterbarker
Copy link
Contributor Author

I tested that script parameters are still moved across for all vehicles.

struct G2ObjectConversion {
void *object_pointer;
const struct AP_Param::GroupInfo *var_info;
uint16_t old_index; // Old parameter index in g
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"g" or "g2"?

#endif
};

AP_Param::convert_g2_objects(&g2, g2_conversions, ARRAY_SIZE(g2_conversions));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a comment could be added here somewhere..

@peterbarker peterbarker merged commit f673617 into ArduPilot:master Feb 26, 2024
92 checks passed
@peterbarker peterbarker deleted the pr/parameter-conversion-static-const-array branch February 26, 2024 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants