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

Rename SRV_Channel::Aux_servo_function_t to SRV_Channel::Function #29085

Merged

Conversation

peterbarker
Copy link
Contributor

Not only is the new name shorter, it's also more in-keeping with the way we do enum-class names elsewhere in the code.

Additionally, the word "aux" in the old name is completely misleading - this covers all servo functions, not just "auxiliary" functions!

This is a no-compiler-output-change PR:

Board                    AP_Periph  blimp  bootloader  copter  heli  iofirmware  plane  rover  sub
CubeOrange-periph-heavy  *                 *                                                   
CubeRedPrimary                      *      *           *       *                 *      *      *
Durandal                            *      *           *       *                 *      *      *
Hitec-Airspeed           *                 *                                                   
KakuteH7-bdshot                     *      *           *       *                 *      *      *
MatekF405                           *      *           *       *                 *      *      *
Pixhawk1-1M-bdshot                  *                  *       *                 *      *      *
f103-QiotekPeriph        *                 *                                                   
f303-Universal           *                 *                                                   
iomcu                                                                *                         
revo-mini                           *      *           *       *                 *      *      *
skyviper-journey                                       *                                       
skyviper-v2450                                         *                                       

@peterbarker peterbarker changed the title Pr/rename srv channel function Rename SRV_Channel::Aux_servo_function_t to SRV_Channel::F… 836d7a6 …unction Jan 16, 2025
@peterbarker peterbarker changed the title Rename SRV_Channel::Aux_servo_function_t to SRV_Channel::F… 836d7a6 …unction Rename SRV_Channel::Aux_servo_function_t to SRV_Channel::Function Jan 16, 2025
Copy link
Contributor

@rmackay9 rmackay9 left a comment

Choose a reason for hiding this comment

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

LGTM. As always there are some concerns about difficulties doing backports once this is merged but in that case we could consider backporting this as well I guess

Copy link
Member

@IamPete1 IamPete1 left a comment

Choose a reason for hiding this comment

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

Looks good, maybe we can remove the k_ on all the functions in the future too.

@peterbarker
Copy link
Contributor Author

Looks good, maybe we can remove the k_ on all the functions in the future too.

I did play around with making this actually an enum-class, rather than just looking like one. It involves inserting Function:: into a lot of places where we use this enumeration! Presumably we'd do that at the same to as removing the k_ thing - but you are looking at 1000 patches!

libraries/SRV_Channel/SRV_Channel.h Outdated Show resolved Hide resolved
@peterbarker peterbarker force-pushed the pr/rename-SRV_Channel-Function branch from 1221a33 to 310faf6 Compare January 27, 2025 23:36
@tridge
Copy link
Contributor

tridge commented Jan 27, 2025

happy with the rename, no enum class change in this PR please

@peterbarker peterbarker force-pushed the pr/rename-SRV_Channel-Function branch from 310faf6 to 0cf4dee Compare January 27, 2025 23:48
@peterbarker
Copy link
Contributor Author

I've rebased to resolve conflicts.

Still no compiler output change

@peterbarker peterbarker force-pushed the pr/rename-SRV_Channel-Function branch from 0cf4dee to d771e76 Compare January 28, 2025 04:10
@peterbarker peterbarker merged commit 4fb4556 into ArduPilot:master Jan 28, 2025
101 checks passed
@peterbarker peterbarker deleted the pr/rename-SRV_Channel-Function branch January 29, 2025 10:57
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