mavlink: move the msg id from uint8_t to uint16_t

With mavlink2 new messages are added with msg IDs greated than 255.
Therefore the msg ID types needed to be raised everywhere.
This commit is contained in:
Julian Oes
2016-11-09 10:23:34 +01:00
committed by Beat Küng
parent 278d63eef6
commit 8ddda0a8fa
9 changed files with 83 additions and 83 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ MavlinkFTP::get_name(void) const
return "MAVLINK_FTP"; return "MAVLINK_FTP";
} }
uint8_t uint16_t
MavlinkFTP::get_id(void) MavlinkFTP::get_id(void)
{ {
return MAVLINK_MSG_ID_FILE_TRANSFER_PROTOCOL; return MAVLINK_MSG_ID_FILE_TRANSFER_PROTOCOL;
+1 -1
View File
@@ -117,7 +117,7 @@ public:
// MavlinkStream overrides // MavlinkStream overrides
virtual const char *get_name(void) const; virtual const char *get_name(void) const;
virtual uint8_t get_id(void); virtual uint16_t get_id(void);
virtual unsigned get_size(void); virtual unsigned get_size(void);
private: private:
+1 -1
View File
@@ -125,7 +125,7 @@ MavlinkLogHandler::get_name(void) const
} }
//------------------------------------------------------------------- //-------------------------------------------------------------------
uint8_t uint16_t
MavlinkLogHandler::get_id(void) MavlinkLogHandler::get_id(void)
{ {
return MAVLINK_MSG_ID_LOG_ENTRY; return MAVLINK_MSG_ID_LOG_ENTRY;
+1 -1
View File
@@ -99,7 +99,7 @@ public:
// Overrides from MavlinkStream // Overrides from MavlinkStream
const char *get_name(void) const; const char *get_name(void) const;
uint8_t get_id(void); uint16_t get_id(void);
unsigned get_size(void); unsigned get_size(void);
void send(const hrt_abstime t); void send(const hrt_abstime t);
+74 -74
View File
@@ -278,12 +278,12 @@ public:
return "HEARTBEAT"; return "HEARTBEAT";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_HEARTBEAT; return MAVLINK_MSG_ID_HEARTBEAT;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -348,12 +348,12 @@ public:
return "STATUSTEXT"; return "STATUSTEXT";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_STATUSTEXT; return MAVLINK_MSG_ID_STATUSTEXT;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -493,12 +493,12 @@ public:
return "COMMAND_LONG"; return "COMMAND_LONG";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_COMMAND_LONG; return MAVLINK_MSG_ID_COMMAND_LONG;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -567,12 +567,12 @@ public:
return "SYS_STATUS"; return "SYS_STATUS";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_SYS_STATUS; return MAVLINK_MSG_ID_SYS_STATUS;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -681,12 +681,12 @@ public:
return "HIGHRES_IMU"; return "HIGHRES_IMU";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_HIGHRES_IMU; return MAVLINK_MSG_ID_HIGHRES_IMU;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -800,12 +800,12 @@ public:
return "ATTITUDE"; return "ATTITUDE";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_ATTITUDE; return MAVLINK_MSG_ID_ATTITUDE;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -869,12 +869,12 @@ public:
return "ATTITUDE_QUATERNION"; return "ATTITUDE_QUATERNION";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_ATTITUDE_QUATERNION; return MAVLINK_MSG_ID_ATTITUDE_QUATERNION;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -939,12 +939,12 @@ public:
return "VFR_HUD"; return "VFR_HUD";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_VFR_HUD; return MAVLINK_MSG_ID_VFR_HUD;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -1052,12 +1052,12 @@ public:
return "GPS_RAW_INT"; return "GPS_RAW_INT";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_GPS_RAW_INT; return MAVLINK_MSG_ID_GPS_RAW_INT;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -1122,12 +1122,12 @@ public:
return "SYSTEM_TIME"; return "SYSTEM_TIME";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_SYSTEM_TIME; return MAVLINK_MSG_ID_SYSTEM_TIME;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -1178,12 +1178,12 @@ public:
return "TIMESYNC"; return "TIMESYNC";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_TIMESYNC; return MAVLINK_MSG_ID_TIMESYNC;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -1231,12 +1231,12 @@ public:
return "ADSB_VEHICLE"; return "ADSB_VEHICLE";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_ADSB_VEHICLE; return MAVLINK_MSG_ID_ADSB_VEHICLE;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -1304,12 +1304,12 @@ public:
return "CAMERA_TRIGGER"; return "CAMERA_TRIGGER";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_CAMERA_TRIGGER; return MAVLINK_MSG_ID_CAMERA_TRIGGER;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -1369,12 +1369,12 @@ public:
return "GLOBAL_POSITION_INT"; return "GLOBAL_POSITION_INT";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_GLOBAL_POSITION_INT; return MAVLINK_MSG_ID_GLOBAL_POSITION_INT;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -1447,12 +1447,12 @@ public:
return "VISION_POSITION_NED"; return "VISION_POSITION_NED";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_VISION_POSITION_ESTIMATE; return MAVLINK_MSG_ID_VISION_POSITION_ESTIMATE;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -1516,12 +1516,12 @@ public:
return "LOCAL_POSITION_NED"; return "LOCAL_POSITION_NED";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_LOCAL_POSITION_NED; return MAVLINK_MSG_ID_LOCAL_POSITION_NED;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -1584,12 +1584,12 @@ public:
return "LOCAL_POSITION_NED_COV"; return "LOCAL_POSITION_NED_COV";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV; return MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -1662,12 +1662,12 @@ public:
return "ESTIMATOR_STATUS"; return "ESTIMATOR_STATUS";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_VIBRATION; return MAVLINK_MSG_ID_VIBRATION;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -1743,12 +1743,12 @@ public:
return "ATT_POS_MOCAP"; return "ATT_POS_MOCAP";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_ATT_POS_MOCAP; return MAVLINK_MSG_ID_ATT_POS_MOCAP;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -1812,12 +1812,12 @@ public:
return "HOME_POSITION"; return "HOME_POSITION";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_HOME_POSITION; return MAVLINK_MSG_ID_HOME_POSITION;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -1887,12 +1887,12 @@ public:
return MavlinkStreamServoOutputRaw<N>::get_name_static(); return MavlinkStreamServoOutputRaw<N>::get_name_static();
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_SERVO_OUTPUT_RAW; return MAVLINK_MSG_ID_SERVO_OUTPUT_RAW;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -1989,12 +1989,12 @@ public:
} }
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_ACTUATOR_CONTROL_TARGET; return MAVLINK_MSG_ID_ACTUATOR_CONTROL_TARGET;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -2076,12 +2076,12 @@ public:
return "HIL_CONTROLS"; return "HIL_CONTROLS";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_HIL_CONTROLS; return MAVLINK_MSG_ID_HIL_CONTROLS;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -2239,12 +2239,12 @@ public:
return "HIL_ACTUATOR_CONTROLS"; return "HIL_ACTUATOR_CONTROLS";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS; return MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -2397,12 +2397,12 @@ public:
return "POSITION_TARGET_GLOBAL_INT"; return "POSITION_TARGET_GLOBAL_INT";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_POSITION_TARGET_GLOBAL_INT; return MAVLINK_MSG_ID_POSITION_TARGET_GLOBAL_INT;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -2461,12 +2461,12 @@ public:
return "POSITION_TARGET_LOCAL_NED"; return "POSITION_TARGET_LOCAL_NED";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_POSITION_TARGET_LOCAL_NED; return MAVLINK_MSG_ID_POSITION_TARGET_LOCAL_NED;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -2534,12 +2534,12 @@ public:
return "ATTITUDE_TARGET"; return "ATTITUDE_TARGET";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_ATTITUDE_TARGET; return MAVLINK_MSG_ID_ATTITUDE_TARGET;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -2615,12 +2615,12 @@ public:
return "RC_CHANNELS"; return "RC_CHANNELS";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_RC_CHANNELS; return MAVLINK_MSG_ID_RC_CHANNELS;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -2716,12 +2716,12 @@ public:
return "MANUAL_CONTROL"; return "MANUAL_CONTROL";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_MANUAL_CONTROL; return MAVLINK_MSG_ID_MANUAL_CONTROL;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -2789,12 +2789,12 @@ public:
return "OPTICAL_FLOW_RAD"; return "OPTICAL_FLOW_RAD";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_OPTICAL_FLOW_RAD; return MAVLINK_MSG_ID_OPTICAL_FLOW_RAD;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -2862,12 +2862,12 @@ public:
return "NAMED_VALUE_FLOAT"; return "NAMED_VALUE_FLOAT";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_NAMED_VALUE_FLOAT; return MAVLINK_MSG_ID_NAMED_VALUE_FLOAT;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -2927,12 +2927,12 @@ public:
return "NAV_CONTROLLER_OUTPUT"; return "NAV_CONTROLLER_OUTPUT";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT; return MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -3000,12 +3000,12 @@ public:
return "CAMERA_CAPTURE"; return "CAMERA_CAPTURE";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return 0; return 0;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -3070,12 +3070,12 @@ public:
return "DISTANCE_SENSOR"; return "DISTANCE_SENSOR";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_DISTANCE_SENSOR; return MAVLINK_MSG_ID_DISTANCE_SENSOR;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -3159,12 +3159,12 @@ public:
return "EXTENDED_SYS_STATE"; return "EXTENDED_SYS_STATE";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_EXTENDED_SYS_STATE; return MAVLINK_MSG_ID_EXTENDED_SYS_STATE;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -3254,12 +3254,12 @@ public:
return "ALTITUDE"; return "ALTITUDE";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_ALTITUDE; return MAVLINK_MSG_ID_ALTITUDE;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
@@ -3386,12 +3386,12 @@ public:
return "WIND_COV"; return "WIND_COV";
} }
static uint8_t get_id_static() static uint16_t get_id_static()
{ {
return MAVLINK_MSG_ID_WIND_COV; return MAVLINK_MSG_ID_WIND_COV;
} }
uint8_t get_id() uint16_t get_id()
{ {
return get_id_static(); return get_id_static();
} }
+2 -2
View File
@@ -49,9 +49,9 @@ class StreamListItem
public: public:
MavlinkStream *(*new_instance)(Mavlink *mavlink); MavlinkStream *(*new_instance)(Mavlink *mavlink);
const char *(*get_name)(); const char *(*get_name)();
uint8_t (*get_id)(); uint16_t (*get_id)();
StreamListItem(MavlinkStream * (*inst)(Mavlink *mavlink), const char *(*name)(), uint8_t (*id)()) : StreamListItem(MavlinkStream * (*inst)(Mavlink *mavlink), const char *(*name)(), uint16_t (*id)()) :
new_instance(inst), new_instance(inst),
get_name(name), get_name(name),
get_id(id) {}; get_id(id) {};
+1 -1
View File
@@ -82,7 +82,7 @@ public:
return "MISSION_ITEM"; return "MISSION_ITEM";
} }
uint8_t get_id() uint16_t get_id()
{ {
return MAVLINK_MSG_ID_MISSION_ITEM; return MAVLINK_MSG_ID_MISSION_ITEM;
} }
+1 -1
View File
@@ -61,7 +61,7 @@ public:
return "PARAM_VALUE"; return "PARAM_VALUE";
} }
uint8_t get_id() uint16_t get_id()
{ {
return MAVLINK_MSG_ID_PARAM_VALUE; return MAVLINK_MSG_ID_PARAM_VALUE;
} }
+1 -1
View File
@@ -74,7 +74,7 @@ public:
*/ */
int update(const hrt_abstime t); int update(const hrt_abstime t);
virtual const char *get_name() const = 0; virtual const char *get_name() const = 0;
virtual uint8_t get_id() = 0; virtual uint16_t get_id() = 0;
/** /**
* @return true if steam rate shouldn't be adjusted * @return true if steam rate shouldn't be adjusted