mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-30 18:06:39 +08:00
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:
@@ -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;
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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
@@ -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) {};
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user