mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Copter: added DEV_OPTIONS parameter
this is for little used options to allow standard firmware builds to enable those options for development purposes First option is for MAVLink based ADSB avoidance
This commit is contained in:
parent
9b83781b4f
commit
d0dd10aeea
@ -960,7 +960,10 @@ void GCS_MAVLINK_Copter::handle_change_alt_request(AP_Mission::Mission_Command &
|
|||||||
void GCS_MAVLINK_Copter::packetReceived(const mavlink_status_t &status,
|
void GCS_MAVLINK_Copter::packetReceived(const mavlink_status_t &status,
|
||||||
mavlink_message_t &msg)
|
mavlink_message_t &msg)
|
||||||
{
|
{
|
||||||
copter.avoidance_adsb.handle_msg(msg);
|
if (copter.g2.dev_options.get() & DevOptionADSBMAVLink) {
|
||||||
|
// optional handling of GLOBAL_POSITION_INT as a MAVLink based avoidance source
|
||||||
|
copter.avoidance_adsb.handle_msg(msg);
|
||||||
|
}
|
||||||
GCS_MAVLINK::packetReceived(status, msg);
|
GCS_MAVLINK::packetReceived(status, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1000,6 +1000,13 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = {
|
|||||||
// @Path: ../libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe.cpp
|
// @Path: ../libraries/AP_AdvancedFailsafe/AP_AdvancedFailsafe.cpp
|
||||||
AP_SUBGROUPINFO(afs, "AFS_", 6, ParametersG2, AP_AdvancedFailsafe),
|
AP_SUBGROUPINFO(afs, "AFS_", 6, ParametersG2, AP_AdvancedFailsafe),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// @Param: DEV_OPTIONS
|
||||||
|
// @DisplayName: Development options
|
||||||
|
// @Description: Bitmask of developer options. The meanings of the bit fields in this parameter may vary at any time. Developers should check the source code for current meaning
|
||||||
|
// @Bitmask: 0:ADSBMavlinkProcessing
|
||||||
|
// @User: Advanced
|
||||||
|
AP_GROUPINFO("DEV_OPTIONS", 7, ParametersG2, dev_options, 0),
|
||||||
|
|
||||||
AP_GROUPEND
|
AP_GROUPEND
|
||||||
};
|
};
|
||||||
|
@ -562,6 +562,9 @@ public:
|
|||||||
// advanced failsafe library
|
// advanced failsafe library
|
||||||
AP_AdvancedFailsafe_Copter afs;
|
AP_AdvancedFailsafe_Copter afs;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// developer options
|
||||||
|
AP_Int32 dev_options;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const AP_Param::Info var_info[];
|
extern const AP_Param::Info var_info[];
|
||||||
|
@ -276,6 +276,11 @@ enum LandStateType {
|
|||||||
LandStateType_Descending = 1
|
LandStateType_Descending = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// bit options for DEV_OPTIONS parameter
|
||||||
|
enum DevOptions {
|
||||||
|
DevOptionADSBMAVLink = 1,
|
||||||
|
};
|
||||||
|
|
||||||
// Logging parameters
|
// Logging parameters
|
||||||
#define TYPE_AIRSTART_MSG 0x00
|
#define TYPE_AIRSTART_MSG 0x00
|
||||||
#define TYPE_GROUNDSTART_MSG 0x01
|
#define TYPE_GROUNDSTART_MSG 0x01
|
||||||
|
Loading…
Reference in New Issue
Block a user