Skip to content

Commit 0c84aa0

Browse files
authored
Merge pull request #307 from Auterion/upstream-merge-2025-05-20
Upstream merge 2025-05-20
2 parents e9599c1 + 5922d1e commit 0c84aa0

File tree

8 files changed

+202
-94
lines changed

8 files changed

+202
-94
lines changed

.github/workflows/test_and_deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ permissions:
1818
jobs:
1919
format:
2020
name: Formatting check
21-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-22.04
2222
steps:
2323
- uses: actions/checkout@v2
2424
with:
@@ -32,7 +32,7 @@ jobs:
3232
3333
python-tests:
3434
name: Python ${{ matrix.python-version }} tests
35-
runs-on: ubuntu-latest
35+
runs-on: ubuntu-22.04
3636
strategy:
3737
fail-fast: false
3838
matrix:
@@ -75,7 +75,7 @@ jobs:
7575
7676
node-tests:
7777
name: Node ${{ matrix.node-version }} test
78-
runs-on: ubuntu-latest
78+
runs-on: ubuntu-22.04
7979
strategy:
8080
fail-fast: false
8181
matrix:
@@ -101,7 +101,7 @@ jobs:
101101
deploy:
102102
name: Generate and push C headers
103103
needs: [format, python-tests, node-tests]
104-
runs-on: ubuntu-latest
104+
runs-on: ubuntu-22.04
105105
if: github.ref == 'refs/heads/master'
106106
env:
107107
GH_TOKEN: ${{ secrets.GH_TOKEN }}

doc/mavlink_xml_to_markdown.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -696,15 +696,15 @@ class MAVEnumEntry(object):
696696
def __init__(self, soup, basename):
697697
# name, value, description='', end_marker=False, autovalue=False, origin_file='', origin_line=0, has_location=False
698698
self.name = soup['name']
699-
self.value = int(soup.get('value')) if soup.get('value') else print(
699+
self.value = int(soup.get('value'), base = 0) if soup.get('value') else print(
700700
f"TODO MISSING VALUE in MAVEnumEntry: {self.name}")
701701
self.basename = basename
702-
self.description = soup.findChild('description', recursive=False)
702+
self.description = soup.find('description', recursive=False)
703703
self.description = self.description.text if self.description else None
704-
self.deprecated = soup.findChild('deprecated', recursive=False)
704+
self.deprecated = soup.find('deprecated', recursive=False)
705705
self.deprecated = MAVDeprecated(
706706
self.deprecated) if self.deprecated else None
707-
self.wip = soup.findChild('wip', recursive=False)
707+
self.wip = soup.find('wip', recursive=False)
708708
self.wip = MAVWip(self.wip) if self.wip else None
709709
# self.autovalue = autovalue # True if value was *not* specified in XML
710710

@@ -741,16 +741,16 @@ def __init__(self, soup, basename):
741741
print(
742742
f"Debug: MAVEnum: Unexpected attribute: {attr}, Value: {value}")
743743

744-
self.description = soup.findChild('description', recursive=False)
744+
self.description = soup.find('description', recursive=False)
745745
self.description = tidyDescription(
746746
self.description.text) if self.description else None
747-
self.deprecated = soup.findChild('deprecated', recursive=False)
747+
self.deprecated = soup.find('deprecated', recursive=False)
748748
self.deprecated = MAVDeprecated(
749749
self.deprecated) if self.deprecated else None
750750
if self.basename == 'development':
751751
self.wip = MAVWip()
752752
else:
753-
self.wip = soup.findChild('wip', recursive=False)
753+
self.wip = soup.find('wip', recursive=False)
754754
self.wip = MAVWip(self.wip) if self.wip else None
755755
self.bitmask = soup.get('bitmask')
756756
enumEntries = soup.find_all('entry')
@@ -890,13 +890,13 @@ def __init__(self, soup, basename):
890890
self.description = soup.description.text if soup.description else None
891891
if self.description:
892892
self.description = tidyDescription(self.description)
893-
self.deprecated = soup.findChild('deprecated', recursive=False)
893+
self.deprecated = soup.find('deprecated', recursive=False)
894894
self.deprecated = MAVDeprecated(
895895
self.deprecated) if self.deprecated else None
896896
if self.basename == 'development':
897897
self.wip = MAVWip()
898898
else:
899-
self.wip = soup.findChild('wip', recursive=False)
899+
self.wip = soup.find('wip', recursive=False)
900900
self.wip = MAVWip(self.wip) if self.wip else None
901901
# self.autovalue = autovalue # True if value was *not* specified in XML
902902
self.param_fieldnames = set()

message_definitions/v1.0/all.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,19 @@
7171
messages: 52500 - 52599 (< 60000)
7272
commands: 52500 - 52599 (< 60000)
7373
-->
74+
<enums>
75+
<!-- The MAV_CMD enum entries describe either: -->
76+
<!-- * the data payload of mission items (as used in the MISSION_ITEM_INT message) -->
77+
<!-- * the data payload of mavlink commands (as used in the COMMAND_INT and COMMAND_LONG messages) -->
78+
<!-- ALL the entries in the MAV_CMD enum have a maximum of 7 parameters -->
79+
<enum name="MAV_CMD">
80+
<description>Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See https://mavlink.io/en/guide/xml_schema.html#MAV_CMD for information about the structure of the MAV_CMD entries</description>
81+
<entry value="393" name="MAV_CMD_DUMMY_ALL" hasLocation="false" isDestination="false">
82+
<wip/>
83+
<description>Dummy/temporary MAV_CMD that causes all.xml to correctly import all commands from both ardupilotmega.xml and development.xml (otherwise only one is imported, for the reasons given in https://github.com/ArduPilot/pymavlink/pull/544#discussion_r2069976980).
84+
It not be used, and will be removed when the toolchain is fixed.</description>
85+
</entry>
86+
</enum>
87+
</enums>
7488
<messages/>
7589
</mavlink>

message_definitions/v1.0/ardupilotmega.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@
417417
</entry>
418418
</enum>
419419
<!-- RALLY flags - power of 2 (1,2,4,8,16,32,64,128) so we can send as a bitfield -->
420-
<enum name="RALLY_FLAGS" bitmask="true">
420+
<enum name="RALLY_FLAGS">
421421
<description>Flags in RALLY_POINT message.</description>
422422
<entry value="1" name="FAVORABLE_WIND">
423423
<description>Flag set when requiring favorable winds for landing.</description>

message_definitions/v1.0/common.xml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,15 @@
10631063
<description>Erase all mission data stored on the vehicle (both persistent and volatile storage)</description>
10641064
</entry>
10651065
</enum>
1066+
<enum name="REBOOT_SHUTDOWN_CONDITIONS">
1067+
<description>Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted.</description>
1068+
<entry value="0" name="REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED">
1069+
<description>Reboot/Shutdown only if allowed by safety checks, such as being landed.</description>
1070+
</entry>
1071+
<entry value="20190226" name="REBOOT_SHUTDOWN_CONDITIONS_FORCE">
1072+
<description>Force reboot/shutdown of the autopilot/component regardless of system state.</description>
1073+
</entry>
1074+
</enum>
10661075
<!-- The MAV_CMD enum entries describe either: -->
10671076
<!-- * the data payload of mission items (as used in the MISSION_ITEM_INT message) -->
10681077
<!-- * the data payload of mavlink commands (as used in the COMMAND_INT and COMMAND_LONG messages) -->
@@ -1564,7 +1573,7 @@
15641573
<param index="1" label="Speed" units="m/s" minValue="-1">Ground speed, less than 0 (-1) for default</param>
15651574
<param index="2" label="Bitmask" enum="MAV_DO_REPOSITION_FLAGS">Bitmask of option flags.</param>
15661575
<param index="3" label="Radius" units="m">Loiter radius for planes. Positive values only, direction is controlled by Yaw value. A value of zero or NaN is ignored. </param>
1567-
<param index="4" label="Yaw" units="deg">Yaw heading. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise)</param>
1576+
<param index="4" label="Yaw" units="rad">Yaw heading. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise)</param>
15681577
<param index="5" label="Latitude">Latitude</param>
15691578
<param index="6" label="Longitude">Longitude</param>
15701579
<param index="7" label="Altitude" units="m">Altitude</param>
@@ -1908,7 +1917,7 @@
19081917
<param index="3" label="Component action" minValue="0" maxValue="3" increment="1">0: Do nothing for component, 1: Reboot component, 2: Shutdown component, 3: Reboot component and keep it in the bootloader until upgraded</param>
19091918
<param index="4" label="Component ID" minValue="0" maxValue="255" increment="1">MAVLink Component ID targeted in param3 (0 for all components).</param>
19101919
<param index="5">Reserved (set to 0)</param>
1911-
<param index="6">Reserved (set to 0)</param>
1920+
<param index="6" label="Conditions" enum="REBOOT_SHUTDOWN_CONDITIONS">Conditions under which reboot/shutdown is allowed.</param>
19121921
<param index="7">WIP: ID (e.g. camera ID -1 for all IDs)</param>
19131922
</entry>
19141923
<!-- id "247" reserved for MAV_CMD_DO_UPGRADE in development.xml -->
@@ -3908,7 +3917,7 @@
39083917
<description>Zoom one step increment (-1 for wide, 1 for tele)</description>
39093918
</entry>
39103919
<entry value="1" name="ZOOM_TYPE_CONTINUOUS">
3911-
<description>Continuous zoom up/down until stopped (-1 for wide, 1 for tele, 0 to stop zooming)</description>
3920+
<description>Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range.</description>
39123921
</entry>
39133922
<entry value="2" name="ZOOM_TYPE_RANGE">
39143923
<description>Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)</description>
@@ -3926,7 +3935,7 @@
39263935
<description>Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity).</description>
39273936
</entry>
39283937
<entry value="1" name="FOCUS_TYPE_CONTINUOUS">
3929-
<description>Continuous focus up/down until stopped (-1 for focusing in, 1 for focusing out towards infinity, 0 to stop focusing)</description>
3938+
<description>Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range.</description>
39303939
</entry>
39313940
<entry value="2" name="FOCUS_TYPE_RANGE">
39323941
<description>Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)</description>
@@ -5275,7 +5284,11 @@
52755284
<field type="uint32_t" name="onboard_control_sensors_health_extended" enum="MAV_SYS_STATUS_SENSOR_EXTENDED" print_format="0x%04x">Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy.</field>
52765285
</message>
52775286
<message id="2" name="SYSTEM_TIME">
5278-
<description>The system time is the time of the master clock, typically the computer clock of the main onboard computer.</description>
5287+
<description>The system time is the time of the master clock.
5288+
This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.
5289+
Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.
5290+
This allows more broadly accurate date stamping of logs, and so on.
5291+
If precise time synchronization is needed then use TIMESYNC instead.</description>
52795292
<field type="uint64_t" name="time_unix_usec" units="us">Timestamp (UNIX epoch time).</field>
52805293
<field type="uint32_t" name="time_boot_ms" units="ms">Timestamp (time since system boot).</field>
52815294
</message>
@@ -5599,7 +5612,7 @@
55995612
<description>
56005613
Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).
56015614
This message should be streamed all the time (nominally at 1Hz).
5602-
This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or SET_MISSION_CURRENT.
5615+
This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT.
56035616
</description>
56045617
<field type="uint16_t" name="seq">Sequence</field>
56055618
<extensions/>

message_definitions/v1.0/minimal.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,9 @@
206206
<entry value="44" name="MAV_TYPE_ILLUMINATOR">
207207
<description>Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light).</description>
208208
</entry>
209+
<entry value="45" name="MAV_TYPE_SPACECRAFT_ORBITER">
210+
<description>Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification.</description>
211+
</entry>
209212
</enum>
210213
<enum name="MAV_MODE_FLAG" bitmask="true">
211214
<description>These flags encode the MAV mode.</description>

0 commit comments

Comments
 (0)