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-08 11:24:21 +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);
File diff suppressed because it is too large Load Diff
+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