From 0e420102dbdd7e9f59617dd00c05a2470f22eef2 Mon Sep 17 00:00:00 2001 From: David Sastre Date: Wed, 20 Nov 2024 04:29:24 +0100 Subject: [PATCH 01/22] development.xml: change OPERATOR_CONTROL id to 32100: (#2174) It collides with a new command in Ardupilotmega.xml, in Ardupilot repo --- message_definitions/v1.0/development.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/message_definitions/v1.0/development.xml b/message_definitions/v1.0/development.xml index bc3e16e1407..6b63cffd0b5 100644 --- a/message_definitions/v1.0/development.xml +++ b/message_definitions/v1.0/development.xml @@ -388,7 +388,7 @@ Empty Empty - + Request GCS control of a system (or of a specific component in a system). A controlled system should only accept MAVLink commands and command-like messages that are sent by its controlling GCS, or from other components with the same system id. From 7ecb8e332705a66005a0a2d879537c487d07c390 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 21 Nov 2024 07:38:29 +1100 Subject: [PATCH 02/22] WIFI_NETWORK_SECURITY - wip removal (#2164) --- message_definitions/v1.0/development.xml | 29 ------------------------ 1 file changed, 29 deletions(-) diff --git a/message_definitions/v1.0/development.xml b/message_definitions/v1.0/development.xml index 6b63cffd0b5..a7bd3aa033f 100644 --- a/message_definitions/v1.0/development.xml +++ b/message_definitions/v1.0/development.xml @@ -5,27 +5,6 @@ 0 0 - - WiFi wireless security protocols. - - Undefined or unknown security protocol. - - - Open network, no security. - - - WEP. - - - WPA1. - - - WPA2. - - - WPA3. - - Airspeed sensor flags @@ -587,14 +566,6 @@ Raw differential pressure. NaN for value unknown/not supplied. Airspeed sensor flags. - - Detected WiFi network status information. This message is sent per each WiFi network detected in range with known SSID and general status parameters. - Name of Wi-Fi network (SSID). - WiFi network operating channel ID. Set to 0 if unknown or unidentified. - WiFi network signal quality. - WiFi network data rate. Set to UINT16_MAX if data_rate information is not supplied. - WiFi network security type. - From 1cf3c7217f0239ae6d52862117b79840ecd70e5f Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 21 Nov 2024 09:36:39 +1100 Subject: [PATCH 03/22] dev: move FUEL_STATUS to common (#2170) --- message_definitions/v1.0/common.xml | 37 +++++++++++++++++++++++- message_definitions/v1.0/development.xml | 36 ----------------------- 2 files changed, 36 insertions(+), 37 deletions(-) diff --git a/message_definitions/v1.0/common.xml b/message_definitions/v1.0/common.xml index ef098602398..74f98897401 100644 --- a/message_definitions/v1.0/common.xml +++ b/message_definitions/v1.0/common.xml @@ -3401,6 +3401,18 @@ Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s). + + Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates. + + Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1). + + + A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second. + + + A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s). + + Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly). @@ -7582,7 +7594,30 @@ Maximum pack discharge burst current. 0: field not provided. Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided. - + + Fuel status. + This message provides "generic" fuel level information for display in a GCS and for triggering failsafes in an autopilot. + The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE. + + The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value. + A recipient can assume that if these fields are supplied they are accurate. + If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume). + Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot). + + This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2. + If both messages are sent for the same fuel system, the ids and corresponding information must match. + + This should be streamed (nominally at 0.1 Hz). + + Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2. + Capacity when full. Must be provided. + Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided. + Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided. + Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided. + Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided. + Fuel temperature. NaN: field not provided. + Fuel type. Defines units for fuel capacity and consumption fields above. + diff --git a/message_definitions/v1.0/development.xml b/message_definitions/v1.0/development.xml index a7bd3aa033f..3f3820536d4 100644 --- a/message_definitions/v1.0/development.xml +++ b/message_definitions/v1.0/development.xml @@ -447,18 +447,6 @@ Channel data may be out of date. This is set when the receiver is unable to validate incoming data from the transmitter and has therefore resent the last valid data it received. - - Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates. - - Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1. - - - A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second. - - - A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s). - - Flags indicating errors in a GPS receiver. @@ -619,30 +607,6 @@ Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided. Fault, health, readiness, and other status indications. - - Fuel status. - This message provides "generic" fuel level information for display in a GCS and for triggering failsafes in an autopilot. - The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE. - - The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value. - A recipient can assume that if these fields are supplied they are accurate. - If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume). - Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot). - - This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2. - If both messages are sent for the same fuel system, the ids and corresponding information must match. - - This should be streamed (nominally at 0.1 Hz). - - Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2. - Capacity when full. Must be provided. - Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided. - Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided. - Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided. - Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided. - Fuel temperature. NaN: field not provided. - Fuel type. Defines units for fuel capacity and consumption fields above. - Emitted during mission execution when control reaches MAV_CMD_GROUP_START. Mission-unique group id (from MAV_CMD_GROUP_START). From a55d0ec5baa0693fefa06fd50683f4e80ac3647a Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 21 Nov 2024 09:43:09 +1100 Subject: [PATCH 04/22] MAV_CMD_GROUP_START and _GROUP_END delete wip (#2176) --- message_definitions/v1.0/development.xml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/message_definitions/v1.0/development.xml b/message_definitions/v1.0/development.xml index 3f3820536d4..14e7dfcf304 100644 --- a/message_definitions/v1.0/development.xml +++ b/message_definitions/v1.0/development.xml @@ -290,22 +290,6 @@ Reserved WIP: upgrade progress report rate (can be used for more granular control). - - Define start of a group of mission items. When control reaches this command a GROUP_START message is emitted. - The end of a group is marked using MAV_CMD_GROUP_END with the same group id. - Group ids are expected, but not required, to iterate sequentially. - Groups can be nested. - Mission-unique group id. - Group id is limited because only 24 bit integer can be stored in 32 bit float. - - - Define end of a group of mission items. When control reaches this command a GROUP_END message is emitted. - The start of the group is marked is marked using MAV_CMD_GROUP_START with the same group id. - Group ids are expected, but not required, to iterate sequentially. - Groups can be nested. - Mission-unique group id. - Group id is limited because only 24 bit integer can be stored in 32 bit float. - Enable the specified standard MAVLink mode. If the mode is not supported the vehicle should ACK with MAV_RESULT_FAILED. From 9938f9405c3df16be283c2e202c858d26ac842cd Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 21 Nov 2024 13:27:34 +1100 Subject: [PATCH 05/22] fetch_dialect_ardupilotmega - create (#2177) --- .../workflows/fetch_dialect_ardupilotmega.yml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/fetch_dialect_ardupilotmega.yml diff --git a/.github/workflows/fetch_dialect_ardupilotmega.yml b/.github/workflows/fetch_dialect_ardupilotmega.yml new file mode 100644 index 00000000000..8ebcff76385 --- /dev/null +++ b/.github/workflows/fetch_dialect_ardupilotmega.yml @@ -0,0 +1,33 @@ +name: Fetch ardupilotmega.xml from downstream +on: + workflow_dispatch: + +jobs: + copy_and_push: + runs-on: ubuntu-latest + steps: + - name: Checkout this repo + uses: actions/checkout@v4 + with: + repository: mavlink/mavlink + + - name: Download source file + run: | + curl -L https://raw.githubusercontent.com/ArduPilot/mavlink/master/message_definitions/v1.0/ardupilotmega.xml -o ardupilotmega.xml + - name: Copy file + run: ls + - name: Copy file + run: mv -f ardupilotmega.xml message_definitions/v1.0/ + - name: Add and commit changes + run: | + git config --global user.name "${{ secrets.PX4BUILDBOT_USER }}" + git config --global user.email "${{ secrets.PX4BUILDBOT_EMAIL }}" + git add message_definitions/v1.0/ardupilotmega.xml + git commit -a -m "ardupilotmega.xml from ArduPilot/mavlink: `date`" + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + title: "[BOT] Fetch ardupilotmega.xml from ArduPilot/mavlink" + body: "ardupilotmega.xml copied from the ArduPilot/mavlink repository." + target: master From 33f8a327ab3d761174c27fb1d6e43dd7bd589414 Mon Sep 17 00:00:00 2001 From: David Sastre Date: Sun, 24 Nov 2024 11:57:05 +0100 Subject: [PATCH 06/22] Some modifications to multi-GCS protocol (#2179) * common.xml: remove recently added MAV_RESULT_PERMISSION_DENIED: This was needed for the new in development multi GCS protocol. It was decided to hold on this new result for the moment, in order to make the current implementation easier to adopt, and evaluate again in the future if this is needed. For the situations meant to use this, we will use RESULT_FAILED * development.xml: use RESULT_FAILED instead of PERMISSION_DENIED * development.xml: add request timeout parameter to REQUEST_OPERATOR_CONTROL * development.xml: In REQUEST_OPERATOR_CONTROL requests revert to takeover not allowed after 10s * development.xml: fix REQUEST_OPERATOR_CONTROL param4 description Co-authored-by: Hamish Willee --------- Co-authored-by: Hamish Willee --- message_definitions/v1.0/common.xml | 4 ---- message_definitions/v1.0/development.xml | 7 ++++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/message_definitions/v1.0/common.xml b/message_definitions/v1.0/common.xml index 74f98897401..cfe8d7ea92b 100644 --- a/message_definitions/v1.0/common.xml +++ b/message_definitions/v1.0/common.xml @@ -2860,10 +2860,6 @@ Command is invalid because a frame is required and the specified frame is not supported. - - - Sender is not authorized to control this MAV component. Control may be requested using MAV_CMD_REQUEST_OPERATOR_CONTROL. - Result of mission operation (in a MISSION_ACK message). diff --git a/message_definitions/v1.0/development.xml b/message_definitions/v1.0/development.xml index 14e7dfcf304..c2571f6566a 100644 --- a/message_definitions/v1.0/development.xml +++ b/message_definitions/v1.0/development.xml @@ -355,7 +355,7 @@ Request GCS control of a system (or of a specific component in a system). A controlled system should only accept MAVLink commands and command-like messages that are sent by its controlling GCS, or from other components with the same system id. - Commands from other systems should be rejected with MAV_RESULT_PERMISSION_DENIED (except for this command, which may be acknowledged with MAV_RESULT_ACCEPTED if control is granted). + Commands from other systems should be rejected with MAV_RESULT_FAILED (except for this command, which may be acknowledged with MAV_RESULT_ACCEPTED if control is granted). Command-like messages should be ignored (or rejected if that is supported by their associated protocol). GCS control of the whole system is managed via a single component that we will refer to here as the "system manager component". @@ -369,9 +369,10 @@ The system manager component should grant control to the GCS if the system does not require takeover permission (or is uncontrolled) and ACK the request with MAV_RESULT_ACCEPTED. The system manager component should then stream CONTROL_STATUS indicating its controlling system: all other components with the same system id should monitor this message and set their own controlling GCS to match that of the system manager component. - If the system manager component cannot grant control (because takeover requires permission), the request should be rejected with MAV_RESULT_PERMISSION_DENIED. + If the system manager component cannot grant control (because takeover requires permission), the request should be rejected with MAV_RESULT_FAILED. The system manager component should then send this same command to the current owning GCS in order to notify of the request. The owning GCS would ACK with MAV_RESULT_ACCEPTED, and might choose to release control of the vehicle, or re-request control with the takeover bit set to allow permission. + In case it choses to re-request control with takeover bit set to allow permission, requestor GCS will only have 10 seconds to get control, otherwise owning GCS will re-request control with takeover bit set to disallow permission, and requestor GCS will need repeat the request if still interested in getting control. Note that the pilots of both GCS should co-ordinate safe handover offline. Note that in most systems the only controlled component will be the "system manager component", and that will be the autopilot. @@ -384,7 +385,7 @@ System ID of GCS requesting control. 0 when command sent from GCS to autopilot (autopilot determines requesting GCS sysid from message header). Sysid of GCS requesting control when command sent by autopilot to controlling GCS. 0: Release control, 1: Request control. Enable automatic granting of ownership on request (by default reject request and notify current owner). 0: Ask current owner and reject request, 1: Allow automatic takeover. - Empty + Timeout in seconds before a request to a GCS to allow takeover is assumed to be rejected. This is used to display the timeout graphically on requestor and GCS in control. Empty Empty Empty From 5c421a334fcdcbff3834f9f34d6ca7ee6372aea6 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Wed, 27 Nov 2024 12:17:59 +1100 Subject: [PATCH 07/22] Speed uncertainty units /s (#2180) --- message_definitions/v1.0/common.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/message_definitions/v1.0/common.xml b/message_definitions/v1.0/common.xml index cfe8d7ea92b..2cf2eeb4a6a 100644 --- a/message_definitions/v1.0/common.xml +++ b/message_definitions/v1.0/common.xml @@ -5288,7 +5288,7 @@ Altitude (above WGS84, EGM96 ellipsoid). Positive for up. Position uncertainty. Altitude uncertainty. - Speed uncertainty. + Speed uncertainty. Heading / track uncertainty Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north. @@ -6333,7 +6333,7 @@ Altitude (above WGS84, EGM96 ellipsoid). Positive for up. Position uncertainty. Altitude uncertainty. - Speed uncertainty. + Speed uncertainty. Heading / track uncertainty From 82b81aa8cdcaa6926e97828b57312b8181f40a21 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 15:15:46 +1100 Subject: [PATCH 08/22] ardupilotmega.xml from ArduPilot/mavlink: Wed Nov 27 04:13:16 UTC 2024 (#2178) Co-authored-by: PX4BuildBot --- message_definitions/v1.0/ardupilotmega.xml | 129 ++++++++++++++++++++- 1 file changed, 124 insertions(+), 5 deletions(-) diff --git a/message_definitions/v1.0/ardupilotmega.xml b/message_definitions/v1.0/ardupilotmega.xml index 9743ef1024b..33e0e9d6e62 100644 --- a/message_definitions/v1.0/ardupilotmega.xml +++ b/message_definitions/v1.0/ardupilotmega.xml @@ -4,6 +4,7 @@ uAvionix.xml icarous.xml + loweheiser.xml cubepilot.xml csAirLink.xml 2 @@ -22,6 +23,7 @@ + @@ -285,8 +287,8 @@ timeout for operation in seconds. Zero means no timeout (0 to 255) argument1. argument2. - Empty - Empty + argument3. + argument4. Empty @@ -313,7 +315,7 @@ Change target altitude at a given rate. This slews the vehicle at a controllable rate between it's previous altitude and the new one. (affects GUIDED only. Outside GUIDED, aircraft ignores these commands. Designed for onboard companion-computer command-and-control, not normally operator/GCS control.) Empty Empty - Rate of change, toward new altitude. 0 for maximum rate change. Positive numbers only, as negative numbers will not converge on the new target alt. + Rate of change, toward new altitude. 0 for maximum rate change. Positive numbers only, as negative numbers will not converge on the new target alt. Empty Empty Empty @@ -329,7 +331,26 @@ Empty Empty - + + Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link. + Timestamp that this message was sent as a time in the transmitters time domain. The sender should wrap this time back to zero based on required timing accuracy for the application and the limitations of a 32 bit float. For example, wrapping at 10 hours would give approximately 1ms accuracy. Recipient must handle time wrap in any timing jitter correction applied to this field. Wrap rollover time should not be at not more than 250 seconds, which would give approximately 10 microsecond accuracy. + The time spent in processing the sensor data that is the basis for this position. The recipient can use this to improve time alignment of the data. Set to zero if not known. + estimated one standard deviation accuracy of the measurement. Set to NaN if not known. + Empty + Latitude + Longitude + Altitude, not used. Should be sent as NaN. May be supported in a future version of this message. + + + Provide a value for height above ground level. This can be used for things like fixed wing and VTOL landing. + Height above ground level. + estimated one standard deviation accuracy of the measurement. Set to NaN if not known. + Timeout for this data. The flight controller should only consider this data valid within the timeout window. + Empty + Empty + Empty + Empty + @@ -345,6 +366,32 @@ Stop execution of scripts and restart. + + + Get an 8 byte session key which is used for remote secure updates which operate on flight controller data such as bootloader public keys. Return data will be 8 bytes on success. The session key remains valid until either the flight controller reboots or another SECURE_COMMAND_GET_SESSION_KEY is run. + + + Get an 8 byte session key which is used for remote secure updates which operate on RemoteID module data. Return data will be 8 bytes on success. The session key remains valid until either the remote ID module reboots or another SECURE_COMMAND_GET_REMOTEID_SESSION_KEY is run. + + + Remove range of public keys from the bootloader. Command data consists of two bytes, first byte if index of first public key to remove. Second byte is the number of keys to remove. If all keys are removed then secure boot is disabled and insecure firmware can be loaded. + + + Get current public keys from the bootloader. Command data consists of two bytes, first byte is index of first public key to fetch, 2nd byte is number of keys to fetch. Total data needs to fit in data portion of reply (max 6 keys for 32 byte keys). Reply data has the index of the first key in the first byte, followed by the keys. Returned keys may be less than the number of keys requested if there are less keys installed than requested. + + + Set current public keys in the bootloader. Data consists of a one byte public key index followed by the public keys. With 32 byte keys this allows for up to 6 keys to be set in one request. Keys outside of the range that is being set will remain unchanged. + + + Get config data for remote ID module. This command should be sent to the component ID of the flight controller which will forward it to the RemoteID module either over mavlink or DroneCAN. Data format is specific to the RemoteID implementation, see RemoteID firmware documentation for details. + + + Set config data for remote ID module. This command should be sent to the component ID of the flight controller which will forward it to the RemoteID module either over mavlink or DroneCAN. Data format is specific to the RemoteID implementation, see RemoteID firmware documentation for details. + + + Flash bootloader from local storage. Data is the filename to use for the bootloader. This is intended to be used with MAVFtp to upload a new bootloader to a microSD before flashing. + + @@ -387,6 +434,12 @@ Flag set when plane is to immediately descend to break altitude and land without GCS intervention. Flag not set when plane is to loiter at Rally point until commanded to land. + + True if the following altitude frame value is valid. + + + 2 bit value representing altitude frame. 0: absolute, 1: relative home, 2: relative origin, 3: relative terrain + @@ -946,6 +999,9 @@ Set if EKF's predicted horizontal position (absolute) estimate is good. + + Set if EKF believes the GPS input data is faulty. + Set if EKF has never been healthy. @@ -1126,6 +1182,7 @@ + Offsets and calibrations values for hardware sensors. This makes it easier to debug the calibration process. Magnetometer X offset. Magnetometer Y offset. @@ -1639,6 +1696,24 @@ Request ID - copied from request. 0 for success, anything else is failure code. + + Send a secure command. Data should be signed with a private key corresponding with a public key known to the recipient. Signature should be over the concatenation of the sequence number (little-endian format), the operation (little-endian format) the data and the session key. For SECURE_COMMAND_GET_SESSION_KEY the session key should be zero length. The data array consists of the data followed by the signature. The sum of the data_length and the sig_length cannot be more than 220. The format of the data is command specific. + System ID. + Component ID. + Sequence ID for tagging reply. + Operation being requested. + Data length. + Signature length. + Signed data. + + + Reply from secure command. + Sequence ID from request. + Operation that was requested. + Result of command. + Data length. + Reply data. + Adaptive Controller tuning information. @@ -1736,7 +1811,6 @@ OSD parameter increment. - Obstacle located as a 3D vector. Timestamp (time since system boot). @@ -1771,5 +1845,50 @@ MCU voltage minimum MCU voltage maximum + + ESC Telemetry Data for ESCs 13 to 16, matching data sent by BLHeli ESCs. + Temperature. + Voltage. + Current. + Total current. + RPM (eRPM). + count of telemetry packets received (wraps at 65535). + + + ESC Telemetry Data for ESCs 17 to 20, matching data sent by BLHeli ESCs. + Temperature. + Voltage. + Current. + Total current. + RPM (eRPM). + count of telemetry packets received (wraps at 65535). + + + ESC Telemetry Data for ESCs 21 to 24, matching data sent by BLHeli ESCs. + Temperature. + Voltage. + Current. + Total current. + RPM (eRPM). + count of telemetry packets received (wraps at 65535). + + + ESC Telemetry Data for ESCs 25 to 28, matching data sent by BLHeli ESCs. + Temperature. + Voltage. + Current. + Total current. + RPM (eRPM). + count of telemetry packets received (wraps at 65535). + + + ESC Telemetry Data for ESCs 29 to 32, matching data sent by BLHeli ESCs. + Temperature. + Voltage. + Current. + Total current. + RPM (eRPM). + count of telemetry packets received (wraps at 65535). + From 8e97709db6548be6927b631fb8d25e2059ed09c7 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Sat, 30 Nov 2024 10:43:56 +1100 Subject: [PATCH 09/22] fetch_dialect_ardupilotmega.yml - add loweheiser (#2183) --- .github/workflows/fetch_dialect_ardupilotmega.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fetch_dialect_ardupilotmega.yml b/.github/workflows/fetch_dialect_ardupilotmega.yml index 8ebcff76385..85c1b954ceb 100644 --- a/.github/workflows/fetch_dialect_ardupilotmega.yml +++ b/.github/workflows/fetch_dialect_ardupilotmega.yml @@ -1,4 +1,4 @@ -name: Fetch ardupilotmega.xml from downstream +name: Fetch ardupilotmega dialects from downstream on: workflow_dispatch: @@ -14,6 +14,7 @@ jobs: - name: Download source file run: | curl -L https://raw.githubusercontent.com/ArduPilot/mavlink/master/message_definitions/v1.0/ardupilotmega.xml -o ardupilotmega.xml + curl -L https://raw.githubusercontent.com/ArduPilot/mavlink/master/message_definitions/v1.0/loweheiser.xml -o loweheiser.xml - name: Copy file run: ls - name: Copy file @@ -23,11 +24,12 @@ jobs: git config --global user.name "${{ secrets.PX4BUILDBOT_USER }}" git config --global user.email "${{ secrets.PX4BUILDBOT_EMAIL }}" git add message_definitions/v1.0/ardupilotmega.xml - git commit -a -m "ardupilotmega.xml from ArduPilot/mavlink: `date`" + git add message_definitions/v1.0/loweheiser.xml + git commit -a -m "ardupilotmega dialects from ArduPilot/mavlink: `date`" - name: Create Pull Request uses: peter-evans/create-pull-request@v7 with: title: "[BOT] Fetch ardupilotmega.xml from ArduPilot/mavlink" - body: "ardupilotmega.xml copied from the ArduPilot/mavlink repository." + body: "ardupilotmega.xml / loweheiser.xml copied from the ArduPilot/mavlink repository." target: master From 75ebfc8ff9a1741622e6d070b7bd097482e32a29 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Sat, 30 Nov 2024 10:47:51 +1100 Subject: [PATCH 10/22] Update fetch_dialect_ardupilotmega.yml - fix copy error (#2184) --- .github/workflows/fetch_dialect_ardupilotmega.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fetch_dialect_ardupilotmega.yml b/.github/workflows/fetch_dialect_ardupilotmega.yml index 85c1b954ceb..55ee9cf5b86 100644 --- a/.github/workflows/fetch_dialect_ardupilotmega.yml +++ b/.github/workflows/fetch_dialect_ardupilotmega.yml @@ -17,8 +17,10 @@ jobs: curl -L https://raw.githubusercontent.com/ArduPilot/mavlink/master/message_definitions/v1.0/loweheiser.xml -o loweheiser.xml - name: Copy file run: ls - - name: Copy file - run: mv -f ardupilotmega.xml message_definitions/v1.0/ + - name: Copy files + run: | + mv -f ardupilotmega.xml message_definitions/v1.0/ + mv -f loweheiser.xml message_definitions/v1.0/ - name: Add and commit changes run: | git config --global user.name "${{ secrets.PX4BUILDBOT_USER }}" From 49fa509a84cc868499bd633f8c30f0513034697e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 30 Nov 2024 10:51:10 +1100 Subject: [PATCH 11/22] ardupilotmega dialects from ArduPilot/mavlink: Fri Nov 29 23:49:36 UTC 2024 (#2185) Co-authored-by: PX4BuildBot --- message_definitions/v1.0/loweheiser.xml | 55 +++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 message_definitions/v1.0/loweheiser.xml diff --git a/message_definitions/v1.0/loweheiser.xml b/message_definitions/v1.0/loweheiser.xml new file mode 100644 index 00000000000..d899db91ebe --- /dev/null +++ b/message_definitions/v1.0/loweheiser.xml @@ -0,0 +1,55 @@ + + + + + + + + minimal.xml + + + + + Set Loweheiser desired states + EFI Index + Desired Engine/EFI State (0: Power Off, 1:Running) + Desired Governor State (0:manual throttle, 1:Governed throttle) + Manual throttle level, 0% - 100% + Electronic Start up (0:Off, 1:On) + Empty + Empty + + + + + + Composite EFI and Governor data from Loweheiser equipment. This message is created by the EFI unit based on its own data and data received from a governor attached to that EFI unit. + + Generator Battery voltage. + Generator Battery current. + Current being produced by generator. + Load current being consumed by the UAV (sum of curr_gen and curr_batt) + Generator fuel remaining in litres. + Throttle Output. + Seconds this generator has run since it was rebooted. + Seconds until this generator requires maintenance. A negative value indicates maintenance is past due. + The Temperature of the rectifier. + The temperature of the mechanical motor, fuel cell core or generator. + + EFI Supply Voltage. + Motor RPM. + Injector pulse-width in miliseconds. + Fuel flow rate in litres/hour. + Fuel consumed. + Atmospheric pressure. + Manifold Air Temperature. + Cylinder Head Temperature. + Throttle Position. + Exhaust gas temperature. + + EFI index. + Generator status. + EFI status. + + + From 1aa8c2d0b1999a4a8e5e08144fc931fb75f70646 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Wed, 4 Dec 2024 09:51:51 +1100 Subject: [PATCH 12/22] ardupilotmega - remove_mav_cmd_external_estimate (#2187) --- message_definitions/v1.0/ardupilotmega.xml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/message_definitions/v1.0/ardupilotmega.xml b/message_definitions/v1.0/ardupilotmega.xml index 33e0e9d6e62..451adda538c 100644 --- a/message_definitions/v1.0/ardupilotmega.xml +++ b/message_definitions/v1.0/ardupilotmega.xml @@ -331,16 +331,7 @@ Empty Empty - - Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link. - Timestamp that this message was sent as a time in the transmitters time domain. The sender should wrap this time back to zero based on required timing accuracy for the application and the limitations of a 32 bit float. For example, wrapping at 10 hours would give approximately 1ms accuracy. Recipient must handle time wrap in any timing jitter correction applied to this field. Wrap rollover time should not be at not more than 250 seconds, which would give approximately 10 microsecond accuracy. - The time spent in processing the sensor data that is the basis for this position. The recipient can use this to improve time alignment of the data. Set to zero if not known. - estimated one standard deviation accuracy of the measurement. Set to NaN if not known. - Empty - Latitude - Longitude - Altitude, not used. Should be sent as NaN. May be supported in a future version of this message. - + Provide a value for height above ground level. This can be used for things like fixed wing and VTOL landing. Height above ground level. From 1ee2ebe1bd02159a05749de6032eba604992e070 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Wed, 4 Dec 2024 10:19:31 +1100 Subject: [PATCH 13/22] fetch_dialect_ardupilotmega.yml: Not fail if nothing to commit (#2181) --- .../workflows/fetch_dialect_ardupilotmega.yml | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/fetch_dialect_ardupilotmega.yml b/.github/workflows/fetch_dialect_ardupilotmega.yml index 55ee9cf5b86..4375a05cad5 100644 --- a/.github/workflows/fetch_dialect_ardupilotmega.yml +++ b/.github/workflows/fetch_dialect_ardupilotmega.yml @@ -11,27 +11,40 @@ jobs: with: repository: mavlink/mavlink - - name: Download source file + - name: Download source file(s) run: | curl -L https://raw.githubusercontent.com/ArduPilot/mavlink/master/message_definitions/v1.0/ardupilotmega.xml -o ardupilotmega.xml curl -L https://raw.githubusercontent.com/ArduPilot/mavlink/master/message_definitions/v1.0/loweheiser.xml -o loweheiser.xml - - name: Copy file - run: ls - - name: Copy files + + - name: Check for changes + id: check-changes + run: | + git status --porcelain | grep -q "^??" # Check for untracked files + if [ $? -eq 0 ]; then + echo "No changes detected in the repository. Skipping commit and PR creation." + else + echo "Changes detected. Proceeding with commit and PR creation." + fi + + - name: Copy file (if changes detected) run: | mv -f ardupilotmega.xml message_definitions/v1.0/ - mv -f loweheiser.xml message_definitions/v1.0/ - - name: Add and commit changes + mv -f loweheiser.xml message_definitions/v1.0/ + if: steps.check-changes.conclusion == 'success' # Check for success in previous step + + - name: Add and commit changes (if changes detected) run: | git config --global user.name "${{ secrets.PX4BUILDBOT_USER }}" git config --global user.email "${{ secrets.PX4BUILDBOT_EMAIL }}" git add message_definitions/v1.0/ardupilotmega.xml git add message_definitions/v1.0/loweheiser.xml git commit -a -m "ardupilotmega dialects from ArduPilot/mavlink: `date`" + if: steps.check-changes.conclusion == 'success' # Check for success in previous step - - name: Create Pull Request + - name: Create Pull Request (if changes detected) uses: peter-evans/create-pull-request@v7 with: - title: "[BOT] Fetch ardupilotmega.xml from ArduPilot/mavlink" + title: "[BOT] Add ardupilotmega dialects from ArduPilot/mavlink" body: "ardupilotmega.xml / loweheiser.xml copied from the ArduPilot/mavlink repository." target: master + if: steps.check-changes.conclusion == 'success' # Check for success in previous step From 57c028560321430fba9246d489efc3e8b6eeac73 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 5 Dec 2024 09:13:35 +1100 Subject: [PATCH 14/22] CAMERA_THERMAL_RANGE - no longer WIP (#2189) --- message_definitions/v1.0/common.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/message_definitions/v1.0/common.xml b/message_definitions/v1.0/common.xml index 2cf2eeb4a6a..0cd4d3110d8 100644 --- a/message_definitions/v1.0/common.xml +++ b/message_definitions/v1.0/common.xml @@ -3835,7 +3835,7 @@ Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS). - Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE) (WIP). + Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE). @@ -3847,7 +3847,7 @@ Stream is thermal imaging - Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE). (WIP). + Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE). @@ -7160,8 +7160,6 @@ Camera id of a non-MAVLink camera attached to an autopilot (1-6). 0 if the component is a MAVLink camera (with its own component id). - - Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras). Timestamp (time since system boot). Video Stream ID (1 for first, 2 for second, etc.) From 35f70c4a7e0c4aa91edc1eaa5205a1077490442c Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Thu, 5 Dec 2024 16:57:30 +1100 Subject: [PATCH 15/22] Create index.md, dialects.md and make notes/warning work with vitepress (#2193) --- doc/mavlink_xml_to_markdown.py | 153 +++++++++++++++++++++++---------- 1 file changed, 107 insertions(+), 46 deletions(-) diff --git a/doc/mavlink_xml_to_markdown.py b/doc/mavlink_xml_to_markdown.py index f78cbd83628..4a7c8df3fea 100644 --- a/doc/mavlink_xml_to_markdown.py +++ b/doc/mavlink_xml_to_markdown.py @@ -265,7 +265,7 @@ def getMarkdown(self): def get_top_level_docs(self, filename): # Inject top level heading and other details. # print('FILENAME (prefix): %s' % filename) - insert_text = '\n\n' + insert_text = '\n' if filename == 'common': insert_text += """ # MAVLINK Common Message Set (common.xml) @@ -284,7 +284,9 @@ def get_top_level_docs(self, filename): The message set is defined in [minimal.xml](https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/minimal.xml) and is managed by the MAVLink project. -> **Tip** The minimal set is included (imported into) other xml definition files, including the [MAVLink Common Message Set (common.xml)](minimal.md). +::: tip +The minimal set is included (imported into) other xml definition files, including the [MAVLink Common Message Set (common.xml)](minimal.md). +::: """ elif filename == 'standard': @@ -326,12 +328,13 @@ def get_top_level_docs(self, filename): - Systems based on these dialects can co-exist on the same MAVLink network. - A Ground Station might (optionally) use libraries generated from **all.xml** to communicate using any of the dialects. -> **Warning** -> -> - New dialect files in the official repository must be added to **all.xml** and restrict themselves to using ids in their own allocated range. -> - Dialects should push changes to mavlink/mavlink in order to avoid potential clashes from changes to other dialects. -> -> A few older dialects are not included because these operate in completely closed networks or because they are only used for tests. +::: warning + +- New dialect files in the official repository must be added to **all.xml** and restrict themselves to using ids in their own allocated range. +- Dialects should push changes to mavlink/mavlink in order to avoid potential clashes from changes to other dialects. + +A few older dialects are not included because these operate in completely closed networks or because they are only used for tests. +::: This topic is a human-readable form of the XML definition file: [all.xml](https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/all.xml). """ @@ -340,21 +343,24 @@ def get_top_level_docs(self, filename): insert_text += """ # Dialect: ArduPilotMega -> **Warning** [ardupilotmega.xml](https://github.com/ArduPilot/mavlink/blob/master/message_definitions/v1.0/ardupilotmega.xml) contains the accurate and up-to-date documentation for this dialect. -> The documentation below may not be accurate if the dialect owner has not pushed changes. +::: warning +[ardupilotmega.xml](https://github.com/ArduPilot/mavlink/blob/master/message_definitions/v1.0/ardupilotmega.xml) contains the documentation for this dialect as used by the ArduPilot flight stack. +The documentation here may not be a precise match if, for example, changes have not been pushed by the owner. +::: -These messages define the [ArduPilot](http://ardupilot.org) specific dialect (as pushed to the [mavlink/mavlink](https://github.com/mavlink/mavlink) GitHub repository by the dialect owner). +These messages define the [ArduPilot](http://ardupilot.org) specific dialect. This topic is a human-readable form of the XML definition file: [ardupilotmega.xml](https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/ardupilotmega.xml). - """ elif filename == 'cubepilot': insert_text += """ # Dialect: cubepilot -> **Warning** [cubepilot.xml](https://github.com/CubePilot/mavlink/blob/master/message_definitions/v1.0/cubepilot.xml) contains the accurate and up-to-date documentation for this dialect. -> The documentation below may not be accurate if the dialect owner has not pushed changes. +::: warning +[cubepilot.xml](https://github.com/CubePilot/mavlink/blob/master/message_definitions/v1.0/cubepilot.xml) contains the accurate and up-to-date documentation for this dialect. +The documentation here may not be a precise match if, for example, changes have not been pushed by the owner. +::: These messages define the [CubePilot](http://www.cubepilot.com) specific dialect (as pushed to the [mavlink/mavlink](https://github.com/mavlink/mavlink) GitHub repository by the dialect owner). @@ -369,18 +375,22 @@ def get_top_level_docs(self, filename): insert_text += f""" # Dialect: {dialectName} -> **Warning** This topic documents the version of the dialect file in the [mavlink/mavlink](https://github.com/mavlink/mavlink) Github repository, which may not be up to date with the file in the source repository (it is up to the dialect owner to push changes when needed). -> The source repo should be listed in the comments at the top of the XML definition file listed below (but may not be). +::: warning +This topic documents the version of the dialect file in the [mavlink/mavlink](https://github.com/mavlink/mavlink) Github repository, which may not be up to date with the file in the source repository (it is up to the dialect owner to push changes when needed). +The source repo should be listed in the comments at the top of the XML definition file listed below (but may not be). +::: This topic is a human-readable form of the XML definition file: [{filenameXML}](https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/{filenameXML}). """ insert_text += """ - -> **Note** -> - MAVLink 2 [extension fields](../guide/define_xml_element.md#message_extensions) are displayed in blue. -> - Entities from dialects are displayed only as headings (with link to original) +::: info + +- MAVLink 2 [extension fields](../guide/define_xml_element.md#message_extensions) are displayed in blue. +- Entities from dialects are displayed only as headings (with link to original) + +:::