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

Add AP_INVERTED_FLIGHT_ENABLED #24332

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Next Next commit
RC_Channel: add compile-time option to remove inverted-flight capability
  • Loading branch information
peterbarker committed Apr 12, 2024
commit 3f2e600c996f7de801b15f020a561c70267fff36
3 changes: 3 additions & 0 deletions libraries/RC_Channel/RC_Channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <AP_Param/AP_Param.h>
#include <AP_Math/AP_Math.h>
#include <AP_Common/Bitmask.h>
#include <AP_HAL/AP_HAL_Boards.h>

#define NUM_RC_CHANNELS 16

Expand Down Expand Up @@ -144,7 +145,9 @@ class RC_Channel {
AVOID_PROXIMITY = 40, // enable object avoidance using proximity sensors (ie. horizontal lidar)
ARMDISARM_UNUSED = 41, // UNUSED
SMART_RTL = 42, // change to SmartRTL flight mode
#if AP_INVERTED_FLIGHT_ENABLED
Copy link
Member

Choose a reason for hiding this comment

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

This is the first example of using a define to remove something from the enum. This would start a new pattern.

I do think it is a good idea. The "KILL_IMU" option would be a good candidate too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True.

However, we do it a lot in other enumerations, and I'd put down a little bit of money we'll find at least one thing that's Not Quite when we gate them.

INVERTED = 43, // enable inverted flight
#endif
WINCH_ENABLE = 44, // winch enable/disable
WINCH_CONTROL = 45, // winch control
RC_OVERRIDE_ENABLE = 46, // enable RC Override
Expand Down