Copter: correct GuidedOptions enum after peer review
Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>
This commit is contained in:
parent
29fedff826
commit
9104b4800f
@ -986,12 +986,12 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = {
|
||||
#endif
|
||||
|
||||
#if MODE_GUIDED_ENABLED == ENABLED
|
||||
// @Param: GUIDED_OPTIONS
|
||||
// @Param: GUID_OPTIONS
|
||||
// @DisplayName: Guided mode options
|
||||
// @Description: Options that can be applied to change guided mode behaviour
|
||||
// @Bitmask: 0:Allow Arming from Transmitter
|
||||
// @User: Advanced
|
||||
AP_GROUPINFO("GUIDED_OPTIONS", 41, ParametersG2, guided_options, 0),
|
||||
AP_GROUPINFO("GUID_OPTIONS", 41, ParametersG2, guided_options, 0),
|
||||
#endif
|
||||
|
||||
AP_GROUPEND
|
||||
|
@ -833,9 +833,9 @@ protected:
|
||||
|
||||
private:
|
||||
|
||||
// enum for GUIDED_OPTIONS parameter
|
||||
// enum for GUID_OPTIONS parameter
|
||||
enum class Options : int32_t {
|
||||
AllowArmingFromTX = (1 << 0U),
|
||||
AllowArmingFromTX = (1U << 0),
|
||||
};
|
||||
|
||||
void pos_control_start();
|
||||
@ -865,7 +865,6 @@ public:
|
||||
|
||||
bool requires_GPS() const override { return false; }
|
||||
bool has_manual_throttle() const override { return false; }
|
||||
bool allows_arming(bool from_gcs) const override { return from_gcs; }
|
||||
bool is_autopilot() const override { return true; }
|
||||
|
||||
protected:
|
||||
|
@ -89,7 +89,7 @@ bool ModeGuided::allows_arming(bool from_gcs) const
|
||||
}
|
||||
|
||||
// optionally allow arming from the transmitter
|
||||
return (copter.g2.guided_options & (int32_t)Options::AllowArmingFromTX) != 0;
|
||||
return (copter.g2.guided_options & (uint32_t)Options::AllowArmingFromTX) != 0;
|
||||
};
|
||||
|
||||
// do_user_takeoff_start - initialises waypoint controller to implement take-off
|
||||
|
Loading…
Reference in New Issue
Block a user