-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Copter: add Copter::option_enabled(...) replacing bitops vs copter.g2… #27334
Copter: add Copter::option_enabled(...) replacing bitops vs copter.g2… #27334
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the uint32_t into the enum class and then LGTM
ArduCopter/Copter.h
Outdated
@@ -622,11 +622,13 @@ class Copter : public AP_Vehicle { | |||
}; | |||
|
|||
|
|||
enum class FlightOptions { | |||
enum class FlightOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum class FlightOption { | |
enum class FlightOption : uint32_t { |
these strigs would only be released if release() or grab were called a second time
61f97a6
to
9ae58d6
Compare
Now also fixes intermittent new test by fixing the Gripper code to emit messages correctly. |
@@ -104,8 +104,10 @@ void AP_Gripper_Servo::update_gripper() | |||
// Check for successful grabbed or released | |||
if (config.state == AP_Gripper::STATE_GRABBING && has_state_pwm(config.grab_pwm)) { | |||
config.state = AP_Gripper::STATE_GRABBED; | |||
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Gripper load grabbed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this perhaps result in duplicate messages being output? I see we're already outputting these messages higher up in the file
On Wed, 19 Jun 2024, Randy Mackay wrote:
Does this perhaps result in duplicate messages being output? I see we're already outputting these messages higher up in the file
Only if "release" is called again - and in that case we're supposed to let
the user know that we've done that, so duplkicates are in the design.
|
….flight_options
I've already added a test for an option bit in autotest and played with same in SITL