Skip to content

Commit 72037b9

Browse files
committed
fixed error in error enums
1 parent f8a2df7 commit 72037b9

File tree

4 files changed

+144
-5
lines changed

4 files changed

+144
-5
lines changed

comms/mavlink/rosflight.xml

Lines changed: 98 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ python3 -m pymavlink.tools.mavgen --lang=C --wire-protocol=1.0 --output=generate
9696
<entry value="0x08" name="ROSFLIGHT_ERROR_UNHEALTHY_ESTIMATOR"/>
9797
<entry value="0x10" name="ROSFLIGHT_ERROR_TIME_GOING_BACKWARDS"/>
9898
<entry value="0x20" name="ROSFLIGHT_ERROR_UNCALIBRATED_IMU"/>
99-
<entry value="0x40" name="ROSFLIGHT_ERROR_BUFFER_OVERRUN"/>
99+
<entry value="0x40" name="ROSFLIGHT_ERROR_INVALID_FAILSAFE"/>
100+
<entry value="0x80" name="ROSFLIGHT_ERROR_BUFFER_OVERRUN"/>
100101
</enum>
101102
<enum name="ROSFLIGHT_RANGE_TYPE">
102103
<entry value="0" name="ROSFLIGHT_RANGE_SONAR"/>
@@ -207,7 +208,103 @@ python3 -m pymavlink.tools.mavgen --lang=C --wire-protocol=1.0 --output=generate
207208
<description>VTOL is in fixed-wing state</description>
208209
</entry>
209210
</enum>
211+
<enum name="MAV_COMPONENT">
212+
<entry value="0" name="MAV_COMP_ID_ALL">
213+
<description/>
214+
</entry>
215+
<entry value="220" name="MAV_COMP_ID_GPS">
216+
<description/>
217+
</entry>
218+
<entry value="190" name="MAV_COMP_ID_MISSIONPLANNER">
219+
<description/>
220+
</entry>
221+
<entry value="195" name="MAV_COMP_ID_PATHPLANNER">
222+
<description/>
223+
</entry>
224+
<entry value="180" name="MAV_COMP_ID_MAPPER">
225+
<description/>
226+
</entry>
227+
<entry value="100" name="MAV_COMP_ID_CAMERA">
228+
<description/>
229+
</entry>
230+
<entry value="200" name="MAV_COMP_ID_IMU">
231+
<description/>
232+
</entry>
233+
<entry value="201" name="MAV_COMP_ID_IMU_2">
234+
<description/>
235+
</entry>
236+
<entry value="202" name="MAV_COMP_ID_IMU_3">
237+
<description/>
238+
</entry>
239+
<entry value="240" name="MAV_COMP_ID_UDP_BRIDGE">
240+
<description/>
241+
</entry>
242+
<entry value="241" name="MAV_COMP_ID_UART_BRIDGE">
243+
<description/>
244+
</entry>
245+
<entry value="250" name="MAV_COMP_ID_SYSTEM_CONTROL">
246+
<description/>
247+
</entry>
248+
<entry value="140" name="MAV_COMP_ID_SERVO1">
249+
<description/>
250+
</entry>
251+
<entry value="141" name="MAV_COMP_ID_SERVO2">
252+
<description/>
253+
</entry>
254+
<entry value="142" name="MAV_COMP_ID_SERVO3">
255+
<description/>
256+
</entry>
257+
<entry value="143" name="MAV_COMP_ID_SERVO4">
258+
<description/>
259+
</entry>
260+
<entry value="144" name="MAV_COMP_ID_SERVO5">
261+
<description/>
262+
</entry>
263+
<entry value="145" name="MAV_COMP_ID_SERVO6">
264+
<description/>
265+
</entry>
266+
<entry value="146" name="MAV_COMP_ID_SERVO7">
267+
<description/>
268+
</entry>
269+
<entry value="147" name="MAV_COMP_ID_SERVO8">
270+
<description/>
271+
</entry>
272+
<entry value="148" name="MAV_COMP_ID_SERVO9">
273+
<description/>
274+
</entry>
275+
<entry value="149" name="MAV_COMP_ID_SERVO10">
276+
<description/>
277+
</entry>
278+
<entry value="150" name="MAV_COMP_ID_SERVO11">
279+
<description/>
280+
</entry>
281+
<entry value="151" name="MAV_COMP_ID_SERVO12">
282+
<description/>
283+
</entry>
284+
<entry value="152" name="MAV_COMP_ID_SERVO13">
285+
<description/>
286+
</entry>
287+
<entry value="153" name="MAV_COMP_ID_SERVO14">
288+
<description/>
289+
</entry>
290+
<entry value="154" name="MAV_COMP_ID_GIMBAL">
291+
<description/>
292+
</entry>
293+
<entry value="155" name="MAV_COMP_ID_LOG">
294+
<description/>
295+
</entry>
296+
<entry value="156" name="MAV_COMP_ID_ADSB">
297+
<description/>
298+
</entry>
299+
<entry value="157" name="MAV_COMP_ID_OSD">
300+
<description>On Screen Display (OSD) devices for video links</description>
301+
</entry>
302+
<entry value="158" name="MAV_COMP_ID_PERIPHERAL">
303+
<description>Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter sub-protocol</description>
304+
</entry>
305+
</enum>
210306
</enums>
307+
211308
<messages>
212309
<message id="180" name="OFFBOARD_CONTROL">
213310
<description>Offboard Control (6-DOF)</description>

comms/mavlink/v1.0/rosflight/mavlink.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef MAVLINK_H
77
#define MAVLINK_H
88

9-
#define MAVLINK_PRIMARY_XML_HASH -5544324496021157498
9+
#define MAVLINK_PRIMARY_XML_HASH 5306014299006910312
1010

1111
#ifndef MAVLINK_STX
1212
#define MAVLINK_STX 254

comms/mavlink/v1.0/rosflight/rosflight.h

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#error Wrong include order: MAVLINK_ROSFLIGHT.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
1111
#endif
1212

13-
#define MAVLINK_ROSFLIGHT_XML_HASH -5544324496021157498
13+
#define MAVLINK_ROSFLIGHT_XML_HASH 5306014299006910312
1414

1515
#ifdef __cplusplus
1616
extern "C" {
@@ -121,8 +121,9 @@ typedef enum ROSFLIGHT_ERROR_CODE
121121
ROSFLIGHT_ERROR_UNHEALTHY_ESTIMATOR=8, /* | */
122122
ROSFLIGHT_ERROR_TIME_GOING_BACKWARDS=16, /* | */
123123
ROSFLIGHT_ERROR_UNCALIBRATED_IMU=32, /* | */
124-
ROSFLIGHT_ERROR_BUFFER_OVERRUN=64, /* | */
125-
ROSFLIGHT_ERROR_CODE_ENUM_END=65, /* | */
124+
ROSFLIGHT_ERROR_INVALID_FAILSAFE=64, /* | */
125+
ROSFLIGHT_ERROR_BUFFER_OVERRUN=128, /* | */
126+
ROSFLIGHT_ERROR_CODE_ENUM_END=129, /* | */
126127
} ROSFLIGHT_ERROR_CODE;
127128
#endif
128129

@@ -229,6 +230,46 @@ typedef enum MAV_VTOL_STATE
229230
} MAV_VTOL_STATE;
230231
#endif
231232

233+
/** @brief */
234+
#ifndef HAVE_ENUM_MAV_COMPONENT
235+
#define HAVE_ENUM_MAV_COMPONENT
236+
typedef enum MAV_COMPONENT
237+
{
238+
MAV_COMP_ID_ALL=0, /* | */
239+
MAV_COMP_ID_CAMERA=100, /* | */
240+
MAV_COMP_ID_SERVO1=140, /* | */
241+
MAV_COMP_ID_SERVO2=141, /* | */
242+
MAV_COMP_ID_SERVO3=142, /* | */
243+
MAV_COMP_ID_SERVO4=143, /* | */
244+
MAV_COMP_ID_SERVO5=144, /* | */
245+
MAV_COMP_ID_SERVO6=145, /* | */
246+
MAV_COMP_ID_SERVO7=146, /* | */
247+
MAV_COMP_ID_SERVO8=147, /* | */
248+
MAV_COMP_ID_SERVO9=148, /* | */
249+
MAV_COMP_ID_SERVO10=149, /* | */
250+
MAV_COMP_ID_SERVO11=150, /* | */
251+
MAV_COMP_ID_SERVO12=151, /* | */
252+
MAV_COMP_ID_SERVO13=152, /* | */
253+
MAV_COMP_ID_SERVO14=153, /* | */
254+
MAV_COMP_ID_GIMBAL=154, /* | */
255+
MAV_COMP_ID_LOG=155, /* | */
256+
MAV_COMP_ID_ADSB=156, /* | */
257+
MAV_COMP_ID_OSD=157, /* On Screen Display (OSD) devices for video links | */
258+
MAV_COMP_ID_PERIPHERAL=158, /* Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter sub-protocol | */
259+
MAV_COMP_ID_MAPPER=180, /* | */
260+
MAV_COMP_ID_MISSIONPLANNER=190, /* | */
261+
MAV_COMP_ID_PATHPLANNER=195, /* | */
262+
MAV_COMP_ID_IMU=200, /* | */
263+
MAV_COMP_ID_IMU_2=201, /* | */
264+
MAV_COMP_ID_IMU_3=202, /* | */
265+
MAV_COMP_ID_GPS=220, /* | */
266+
MAV_COMP_ID_UDP_BRIDGE=240, /* | */
267+
MAV_COMP_ID_UART_BRIDGE=241, /* | */
268+
MAV_COMP_ID_SYSTEM_CONTROL=250, /* | */
269+
MAV_COMPONENT_ENUM_END=251, /* | */
270+
} MAV_COMPONENT;
271+
#endif
272+
232273
// MAVLINK VERSION
233274

234275
#ifndef MAVLINK_VERSION

include/state_manager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class StateManager
7575
ERROR_TIME_GOING_BACKWARDS = 0x0010,
7676
ERROR_UNCALIBRATED_IMU = 0x0020,
7777
ERROR_INVALID_FAILSAFE = 0x0040,
78+
ERROR_BUFFER_OVERRUN = 0x0080,
7879
};
7980

8081
/**

0 commit comments

Comments
 (0)