diff --git a/src/modules/mavlink/mavlink_ftp.cpp b/src/modules/mavlink/mavlink_ftp.cpp index 6834d91266..3bddfcf8e4 100644 --- a/src/modules/mavlink/mavlink_ftp.cpp +++ b/src/modules/mavlink/mavlink_ftp.cpp @@ -72,7 +72,7 @@ MavlinkFTP::get_name(void) const return "MAVLINK_FTP"; } -uint8_t +uint16_t MavlinkFTP::get_id(void) { return MAVLINK_MSG_ID_FILE_TRANSFER_PROTOCOL; diff --git a/src/modules/mavlink/mavlink_ftp.h b/src/modules/mavlink/mavlink_ftp.h index c2f3a87d75..685a29ebdf 100644 --- a/src/modules/mavlink/mavlink_ftp.h +++ b/src/modules/mavlink/mavlink_ftp.h @@ -117,7 +117,7 @@ public: // MavlinkStream overrides virtual const char *get_name(void) const; - virtual uint8_t get_id(void); + virtual uint16_t get_id(void); virtual unsigned get_size(void); private: diff --git a/src/modules/mavlink/mavlink_log_handler.cpp b/src/modules/mavlink/mavlink_log_handler.cpp index d589e0878c..37a34c9588 100644 --- a/src/modules/mavlink/mavlink_log_handler.cpp +++ b/src/modules/mavlink/mavlink_log_handler.cpp @@ -125,7 +125,7 @@ MavlinkLogHandler::get_name(void) const } //------------------------------------------------------------------- -uint8_t +uint16_t MavlinkLogHandler::get_id(void) { return MAVLINK_MSG_ID_LOG_ENTRY; diff --git a/src/modules/mavlink/mavlink_log_handler.h b/src/modules/mavlink/mavlink_log_handler.h index a44791c311..59fb162993 100644 --- a/src/modules/mavlink/mavlink_log_handler.h +++ b/src/modules/mavlink/mavlink_log_handler.h @@ -99,7 +99,7 @@ public: // Overrides from MavlinkStream const char *get_name(void) const; - uint8_t get_id(void); + uint16_t get_id(void); unsigned get_size(void); void send(const hrt_abstime t); diff --git a/src/modules/mavlink/mavlink_messages.cpp b/src/modules/mavlink/mavlink_messages.cpp index a917faf146..deb457d332 100644 --- a/src/modules/mavlink/mavlink_messages.cpp +++ b/src/modules/mavlink/mavlink_messages.cpp @@ -278,12 +278,12 @@ public: return "HEARTBEAT"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_HEARTBEAT; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -348,12 +348,12 @@ public: return "STATUSTEXT"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_STATUSTEXT; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -493,12 +493,12 @@ public: return "COMMAND_LONG"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_COMMAND_LONG; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -567,12 +567,12 @@ public: return "SYS_STATUS"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_SYS_STATUS; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -681,12 +681,12 @@ public: return "HIGHRES_IMU"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_HIGHRES_IMU; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -800,12 +800,12 @@ public: return "ATTITUDE"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_ATTITUDE; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -869,12 +869,12 @@ public: return "ATTITUDE_QUATERNION"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_ATTITUDE_QUATERNION; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -939,12 +939,12 @@ public: return "VFR_HUD"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_VFR_HUD; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -1052,12 +1052,12 @@ public: return "GPS_RAW_INT"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_GPS_RAW_INT; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -1122,12 +1122,12 @@ public: return "SYSTEM_TIME"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_SYSTEM_TIME; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -1178,12 +1178,12 @@ public: return "TIMESYNC"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_TIMESYNC; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -1231,12 +1231,12 @@ public: return "ADSB_VEHICLE"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_ADSB_VEHICLE; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -1304,12 +1304,12 @@ public: return "CAMERA_TRIGGER"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_CAMERA_TRIGGER; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -1369,12 +1369,12 @@ public: return "GLOBAL_POSITION_INT"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_GLOBAL_POSITION_INT; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -1447,12 +1447,12 @@ public: return "VISION_POSITION_NED"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_VISION_POSITION_ESTIMATE; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -1516,12 +1516,12 @@ public: return "LOCAL_POSITION_NED"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_LOCAL_POSITION_NED; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -1584,12 +1584,12 @@ public: 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; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -1662,12 +1662,12 @@ public: return "ESTIMATOR_STATUS"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_VIBRATION; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -1743,12 +1743,12 @@ public: return "ATT_POS_MOCAP"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_ATT_POS_MOCAP; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -1812,12 +1812,12 @@ public: return "HOME_POSITION"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_HOME_POSITION; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -1887,12 +1887,12 @@ public: return MavlinkStreamServoOutputRaw::get_name_static(); } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_SERVO_OUTPUT_RAW; } - uint8_t get_id() + uint16_t get_id() { 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; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -2076,12 +2076,12 @@ public: return "HIL_CONTROLS"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_HIL_CONTROLS; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -2239,12 +2239,12 @@ public: return "HIL_ACTUATOR_CONTROLS"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -2397,12 +2397,12 @@ public: 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; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -2461,12 +2461,12 @@ public: 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; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -2534,12 +2534,12 @@ public: return "ATTITUDE_TARGET"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_ATTITUDE_TARGET; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -2615,12 +2615,12 @@ public: return "RC_CHANNELS"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_RC_CHANNELS; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -2716,12 +2716,12 @@ public: return "MANUAL_CONTROL"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_MANUAL_CONTROL; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -2789,12 +2789,12 @@ public: return "OPTICAL_FLOW_RAD"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_OPTICAL_FLOW_RAD; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -2862,12 +2862,12 @@ public: return "NAMED_VALUE_FLOAT"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_NAMED_VALUE_FLOAT; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -2927,12 +2927,12 @@ public: return "NAV_CONTROLLER_OUTPUT"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -3000,12 +3000,12 @@ public: return "CAMERA_CAPTURE"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return 0; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -3070,12 +3070,12 @@ public: return "DISTANCE_SENSOR"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_DISTANCE_SENSOR; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -3159,12 +3159,12 @@ public: return "EXTENDED_SYS_STATE"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_EXTENDED_SYS_STATE; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -3254,12 +3254,12 @@ public: return "ALTITUDE"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_ALTITUDE; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } @@ -3386,12 +3386,12 @@ public: return "WIND_COV"; } - static uint8_t get_id_static() + static uint16_t get_id_static() { return MAVLINK_MSG_ID_WIND_COV; } - uint8_t get_id() + uint16_t get_id() { return get_id_static(); } diff --git a/src/modules/mavlink/mavlink_messages.h b/src/modules/mavlink/mavlink_messages.h index 3c302891a2..4bdf0ab841 100644 --- a/src/modules/mavlink/mavlink_messages.h +++ b/src/modules/mavlink/mavlink_messages.h @@ -49,9 +49,9 @@ class StreamListItem public: MavlinkStream *(*new_instance)(Mavlink *mavlink); 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), get_name(name), get_id(id) {}; diff --git a/src/modules/mavlink/mavlink_mission.h b/src/modules/mavlink/mavlink_mission.h index d9cf622844..33d393377b 100644 --- a/src/modules/mavlink/mavlink_mission.h +++ b/src/modules/mavlink/mavlink_mission.h @@ -82,7 +82,7 @@ public: return "MISSION_ITEM"; } - uint8_t get_id() + uint16_t get_id() { return MAVLINK_MSG_ID_MISSION_ITEM; } diff --git a/src/modules/mavlink/mavlink_parameters.h b/src/modules/mavlink/mavlink_parameters.h index bd3678d73e..c2820a3e09 100644 --- a/src/modules/mavlink/mavlink_parameters.h +++ b/src/modules/mavlink/mavlink_parameters.h @@ -61,7 +61,7 @@ public: return "PARAM_VALUE"; } - uint8_t get_id() + uint16_t get_id() { return MAVLINK_MSG_ID_PARAM_VALUE; } diff --git a/src/modules/mavlink/mavlink_stream.h b/src/modules/mavlink/mavlink_stream.h index f77a8d94a1..67b8e359b1 100644 --- a/src/modules/mavlink/mavlink_stream.h +++ b/src/modules/mavlink/mavlink_stream.h @@ -74,7 +74,7 @@ public: */ int update(const hrt_abstime t); 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