Skip to content

Commit

Permalink
Merge branch 'BetaPilot' into bp-merge
Browse files Browse the repository at this point in the history
# Conflicts:
#	libraries/AP_CANManager/AP_CANManager.cpp
#	libraries/AP_DroneCAN/AP_DroneCAN.h
  • Loading branch information
olliw42 committed Sep 29, 2024
2 parents ecec9c4 + 8f49cdd commit ff7bf58
Show file tree
Hide file tree
Showing 57 changed files with 14,723 additions and 25 deletions.
6 changes: 6 additions & 0 deletions ArduCopter/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

#define THISFIRMWARE "ArduCopter V4.6.0-dev"

//OW
#undef THISFIRMWARE
#include "../libraries/bp_version.h"
#define THISFIRMWARE "BetaCopter V4.6.0-dev " BETAPILOTVERSION " " DATEOFBASEBRANCH
//OWEND

// the following line is parsed by the autotest scripts
#define FIRMWARE_VERSION 4,6,0,FIRMWARE_VERSION_TYPE_DEV

Expand Down
4 changes: 4 additions & 0 deletions ArduPlane/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,10 @@ const AP_Param::Info Plane::var_info[] = {
// @User: Advanced
ASCALAR(crash_detection_enable, "CRASH_DETECT", 0),

//OW THR_SUPP
GSCALAR(takeoff_throttle_suppress, "TKOFF_THR_SUPP", 0),
//OWEND

// @Group: BARO
// @Path: ../libraries/AP_Baro/AP_Baro.cpp
GOBJECT(barometer, "BARO", AP_Baro),
Expand Down
6 changes: 6 additions & 0 deletions ArduPlane/Parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ class Parameters {
k_param_autotune_options,
k_param_takeoff_throttle_min,
k_param_takeoff_options,
//OW THR_SUPP
k_param_takeoff_throttle_suppress,
//OWEND

k_param_pullup = 270,
};
Expand Down Expand Up @@ -471,6 +474,9 @@ class Parameters {
AP_Int8 override_channel;
#endif
AP_Int16 gcs_pid_mask;
//OW THR_SUPP
AP_Int8 takeoff_throttle_suppress;
//OWEND
};

/*
Expand Down
7 changes: 7 additions & 0 deletions ArduPlane/servos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,13 @@ void Plane::set_throttle(void)
}

if (suppress_throttle()) {
//OW THR_SUPP
if (control_mode == &mode_takeoff && g.takeoff_throttle_suppress) {
// in takeoff mode set throttle to specified value
SRV_Channels::set_output_scaled(SRV_Channel::k_throttle, constrain_float(g.takeoff_throttle_suppress, 0.0f, 100.0f));

} else
//OWEND
if (g.throttle_suppress_manual) {
// manual pass through of throttle while throttle is suppressed
SRV_Channels::set_output_scaled(SRV_Channel::k_throttle, get_throttle_input(true));
Expand Down
6 changes: 6 additions & 0 deletions ArduPlane/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

#define THISFIRMWARE "ArduPlane V4.6.0-dev"

//OW
#undef THISFIRMWARE
#include "../libraries/bp_version.h"
#define THISFIRMWARE "BetaPlane V4.6.0-dev " BETAPILOTVERSION " " DATEOFBASEBRANCH
//OWEND

// the following line is parsed by the autotest scripts
#define FIRMWARE_VERSION 4,6,0,FIRMWARE_VERSION_TYPE_DEV

Expand Down
294 changes: 294 additions & 0 deletions bp_mavlink/ASLUAV.xml

Large diffs are not rendered by default.

198 changes: 198 additions & 0 deletions bp_mavlink/AVSSUAS.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
<?xml version="1.0"?>
<!-- AVSS is a Canadian aerospace company commercializing safety technologies for Urban Air Mobility. -->
<!-- AVSS is first commercially available products are parachute recovery systems for commercial drones. -->
<!-- AVSS contact info: -->
<!-- company URL: https://www.avss.co -->
<!-- email contact: josh.boudreau@avss.co thomas.li@avss.co llxxgg@gmail.com-->
<!-- mavlink messenger ID range: 60050 - 60099, mavlink command ID range: 60050 - 60099-->
<mavlink>
<include>common.xml</include>
<version>2</version>
<dialect>1</dialect>
<enums>
<enum name="MAV_CMD">
<!-- AVSS specific MAV_CMD_PRS* commands -->
<entry name="MAV_CMD_PRS_SET_ARM" value="60050" isDestination="false" hasLocation="false">
<description>AVSS defined command. Set PRS arm statuses.</description>
<param index="1" label="ARM status">PRS arm statuses</param>
<param index="2">User defined</param>
<param index="3">User defined</param>
<param index="4">User defined</param>
<param index="5">User defined</param>
<param index="6">User defined</param>
<param index="7">User defined</param>
</entry>
<entry name="MAV_CMD_PRS_GET_ARM" value="60051" isDestination="false" hasLocation="false">
<description>AVSS defined command. Gets PRS arm statuses</description>
<param index="1">User defined</param>
<param index="2">User defined</param>
<param index="3">User defined</param>
<param index="4">User defined</param>
<param index="5">User defined</param>
<param index="6">User defined</param>
<param index="7">User defined</param>
</entry>
<entry name="MAV_CMD_PRS_GET_BATTERY" value="60052" isDestination="false" hasLocation="false">
<description>AVSS defined command. Get the PRS battery voltage in millivolts</description>
<param index="1">User defined</param>
<param index="2">User defined</param>
<param index="3">User defined</param>
<param index="4">User defined</param>
<param index="5">User defined</param>
<param index="6">User defined</param>
<param index="7">User defined</param>
</entry>
<entry name="MAV_CMD_PRS_GET_ERR" value="60053" isDestination="false" hasLocation="false">
<description>AVSS defined command. Get the PRS error statuses.</description>
<param index="1">User defined</param>
<param index="2">User defined</param>
<param index="3">User defined</param>
<param index="4">User defined</param>
<param index="5">User defined</param>
<param index="6">User defined</param>
<param index="7">User defined</param>
</entry>
<entry name="MAV_CMD_PRS_SET_ARM_ALTI" value="60070" isDestination="false" hasLocation="false">
<description>AVSS defined command. Set the ATS arming altitude in meters.</description>
<param index="1" label="Altitude" units="m">ATS arming altitude</param>
<param index="2">User defined</param>
<param index="3">User defined</param>
<param index="4">User defined</param>
<param index="5">User defined</param>
<param index="6">User defined</param>
<param index="7">User defined</param>
</entry>
<entry name="MAV_CMD_PRS_GET_ARM_ALTI" value="60071" isDestination="false" hasLocation="false">
<description>AVSS defined command. Get the ATS arming altitude in meters.</description>
<param index="1">User defined</param>
<param index="2">User defined</param>
<param index="3">User defined</param>
<param index="4">User defined</param>
<param index="5">User defined</param>
<param index="6">User defined</param>
<param index="7">User defined</param>
</entry>
<entry name="MAV_CMD_PRS_SHUTDOWN" value="60072" isDestination="false" hasLocation="false">
<description>AVSS defined command. Shuts down the PRS system.</description>
<param index="1">User defined</param>
<param index="2">User defined</param>
<param index="3">User defined</param>
<param index="4">User defined</param>
<param index="5">User defined</param>
<param index="6">User defined</param>
<param index="7">User defined</param>
</entry>
</enum>
<enum name="MAV_AVSS_COMMAND_FAILURE_REASON">
<entry name="PRS_NOT_STEADY" value="1">
<description>AVSS defined command failure reason. PRS not steady.</description>
</entry>
<entry name="PRS_DTM_NOT_ARMED" value="2">
<description>AVSS defined command failure reason. PRS DTM not armed.</description>
</entry>
<entry name="PRS_OTM_NOT_ARMED" value="3">
<description>AVSS defined command failure reason. PRS OTM not armed.</description>
</entry>
</enum>
<enum name="AVSS_M300_OPERATION_MODE">
<entry name="MODE_M300_MANUAL_CTRL" value="0">
<description>In manual control mode</description>
</entry>
<entry name="MODE_M300_ATTITUDE" value="1">
<description>In attitude mode </description>
</entry>
<entry name="MODE_M300_P_GPS" value="6">
<description>In GPS mode</description>
</entry>
<entry name="MODE_M300_HOTPOINT_MODE" value="9">
<description>In hotpoint mode </description>
</entry>
<entry name="MODE_M300_ASSISTED_TAKEOFF" value="10">
<description>In assisted takeoff mode</description>
</entry>
<entry name="MODE_M300_AUTO_TAKEOFF" value="11">
<description>In auto takeoff mode</description>
</entry>
<entry name="MODE_M300_AUTO_LANDING" value="12">
<description>In auto landing mode</description>
</entry>
<entry name="MODE_M300_NAVI_GO_HOME" value="15">
<description>In go home mode</description>
</entry>
<entry name="MODE_M300_NAVI_SDK_CTRL" value="17">
<description>In sdk control mode</description>
</entry>
<entry name="MODE_M300_S_SPORT" value="31">
<description>In sport mode</description>
</entry>
<entry name="MODE_M300_FORCE_AUTO_LANDING" value="33">
<description>In force auto landing mode</description>
</entry>
<entry name="MODE_M300_T_TRIPOD" value="38">
<description>In tripod mode</description>
</entry>
<entry name="MODE_M300_SEARCH_MODE" value="40">
<description>In search mode</description>
</entry>
<entry name="MODE_M300_ENGINE_START" value="41">
<description>In engine mode</description>
</entry>
</enum>
<enum name="AVSS_HORSEFLY_OPERATION_MODE">
<entry name="MODE_HORSEFLY_MANUAL_CTRL" value="0">
<description>In manual control mode</description>
</entry>
<entry name="MODE_HORSEFLY_AUTO_TAKEOFF" value="1">
<description>In auto takeoff mode</description>
</entry>
<entry name="MODE_HORSEFLY_AUTO_LANDING" value="2">
<description>In auto landing mode</description>
</entry>
<entry name="MODE_HORSEFLY_NAVI_GO_HOME" value="3">
<description>In go home mode</description>
</entry>
<entry name="MODE_HORSEFLY_DROP" value="4">
<description>In drop mode</description>
</entry>
</enum>
</enums>
<messages>
<message name="AVSS_PRS_SYS_STATUS" id="60050">
<description> AVSS PRS system status.</description>
<field name="time_boot_ms" units="ms" type="uint32_t">Timestamp (time since PRS boot).</field>
<field name="error_status" type="uint32_t">PRS error statuses</field>
<field name="battery_status" type="uint32_t">Estimated battery run-time without a remote connection and PRS battery voltage</field>
<field name="arm_status" type="uint8_t">PRS arm statuses</field>
<field name="charge_status" type="uint8_t">PRS battery charge statuses</field>
</message>
<message name="AVSS_DRONE_POSITION" id="60051">
<description> Drone position.</description>
<field name="time_boot_ms" units="ms" type="uint32_t">Timestamp (time since FC boot).</field>
<field name="lat" units="degE7" type="int32_t">Latitude, expressed</field>
<field name="lon" units="degE7" type="int32_t">Longitude, expressed</field>
<field name="alt" units="mm" type="int32_t">Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL.</field>
<field name="ground_alt" units="m" type="float">Altitude above ground, This altitude is measured by a ultrasound, Laser rangefinder or millimeter-wave radar</field>
<field name="barometer_alt" units="m" type="float">This altitude is measured by a barometer</field>
</message>
<message name="AVSS_DRONE_IMU" id="60052">
<description> Drone IMU data. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0).</description>
<field name="time_boot_ms" units="ms" type="uint32_t">Timestamp (time since FC boot).</field>
<field name="q1" type="float">Quaternion component 1, w (1 in null-rotation)</field>
<field name="q2" type="float">Quaternion component 2, x (0 in null-rotation)</field>
<field name="q3" type="float">Quaternion component 3, y (0 in null-rotation)</field>
<field name="q4" type="float">Quaternion component 4, z (0 in null-rotation)</field>
<field name="xacc" units="m/s/s" type="float">X acceleration</field>
<field name="yacc" units="m/s/s" type="float">Y acceleration</field>
<field name="zacc" units="m/s/s" type="float">Z acceleration</field>
<field name="xgyro" units="rad/s" type="float">Angular speed around X axis</field>
<field name="ygyro" units="rad/s" type="float">Angular speed around Y axis</field>
<field name="zgyro" units="rad/s" type="float">Angular speed around Z axis</field>
</message>
<message name="AVSS_DRONE_OPERATION_MODE" id="60053">
<description> Drone operation mode.</description>
<field name="time_boot_ms" units="ms" type="uint32_t">Timestamp (time since FC boot).</field>
<field name="M300_operation_mode" type="uint8_t">DJI M300 operation mode</field>
<field name="horsefly_operation_mode" type="uint8_t">horsefly operation mode</field>
</message>
</messages>
</mavlink>
52 changes: 52 additions & 0 deletions bp_mavlink/all.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0"?>
<mavlink>
<include>ardupilotmega.xml</include>
<!-- ASLUAV.xml range of IDs:
messages: 8000 - 8999
commands: 40001 - 41999
-->
<include>ASLUAV.xml</include>
<include>common.xml</include>
<include>development.xml</include>
<include>icarous.xml</include>
<!-- matrixpilot.xml: ERROR: Duplicate message id 150 for FLEXIFUNCTION_SET (matrixpilot.xml:50) also used by SENSOR_OFFSETS (ardupilotmega.xml:1101) -->
<!-- <include>matrixpilot.xml</include> -->
<include>minimal.xml</include>
<!-- paparazzi.xml: : ERROR: Duplicate message id 180 for SCRIPT_ITEM (paparazzi.xml:9) also used by CAMERA_FEEDBACK (ardupilotmega.xml:1370) -->
<!-- <include>paparazzi.xml</include> -->
<include>python_array_test.xml</include>
<include>standard.xml</include>
<include>test.xml</include>
<include>ualberta.xml</include>
<include>uAvionix.xml</include>
<!-- loweheiser.xml range of IDs:
messages: 10150 - 10199
commands: 10150 - 10199
-->
<include>loweheiser.xml</include>
<!-- storm32.xml range of IDs:
messages: 60000 - 60049
commands: 60000 - 60049
-->
<include>storm32.xml</include>
<!-- AVSSUAS.xml range of IDs:
messages: 60050 - 60099
commands: 60050 - 60099
-->
<include>AVSSUAS.xml</include>
<!-- Herelink.xml range of IDs:
messages: 50000 - 50099
commands: 50000 - 50099
-->
<include>cubepilot.xml</include>
<include>csAirLink.xml</include>
<!-- csAirLink.xml range of IDs:
messages: 52000 - 52099
commands: 52000 - 52099
-->
<!--Next range to allocate range of IDs:
messages: 52100 - ? < 60000
commands: 52100 - ? < 60000
-->
<messages/>
</mavlink>
Loading

0 comments on commit ff7bf58

Please sign in to comment.