|
|
@ -64,6 +64,7 @@ |
|
|
|
#include <uORB/topics/debug_key_value.h> |
|
|
|
#include <uORB/topics/debug_key_value.h> |
|
|
|
#include <uORB/topics/debug_value.h> |
|
|
|
#include <uORB/topics/debug_value.h> |
|
|
|
#include <uORB/topics/debug_vect.h> |
|
|
|
#include <uORB/topics/debug_vect.h> |
|
|
|
|
|
|
|
#include <uORB/topics/debug_array.h> |
|
|
|
#include <uORB/topics/differential_pressure.h> |
|
|
|
#include <uORB/topics/differential_pressure.h> |
|
|
|
#include <uORB/topics/distance_sensor.h> |
|
|
|
#include <uORB/topics/distance_sensor.h> |
|
|
|
#include <uORB/topics/estimator_status.h> |
|
|
|
#include <uORB/topics/estimator_status.h> |
|
|
@ -3707,6 +3708,79 @@ protected: |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MavlinkStreamDebugFloatArray : public MavlinkStream |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
const char *get_name() const |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return MavlinkStreamDebugFloatArray::get_name_static(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static const char *get_name_static() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return "DEBUG_FLOAT_ARRAY"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static uint16_t get_id_static() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return MAVLINK_MSG_ID_DEBUG_FLOAT_ARRAY; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint16_t get_id() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return get_id_static(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static MavlinkStream *new_instance(Mavlink *mavlink) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return new MavlinkStreamDebugFloatArray(mavlink); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned get_size() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return (_debug_time > 0) ? MAVLINK_MSG_ID_DEBUG_FLOAT_ARRAY_LEN + MAVLINK_NUM_NON_PAYLOAD_BYTES : 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
|
|
|
|
MavlinkOrbSubscription *_debug_array_sub; |
|
|
|
|
|
|
|
uint64_t _debug_time; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* do not allow top copying this class */ |
|
|
|
|
|
|
|
MavlinkStreamDebugFloatArray(MavlinkStreamDebugFloatArray &); |
|
|
|
|
|
|
|
MavlinkStreamDebugFloatArray &operator = (const MavlinkStreamDebugFloatArray &); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
explicit MavlinkStreamDebugFloatArray(Mavlink *mavlink) : MavlinkStream(mavlink), |
|
|
|
|
|
|
|
_debug_array_sub(_mavlink->add_orb_subscription(ORB_ID(debug_array))), |
|
|
|
|
|
|
|
_debug_time(0) |
|
|
|
|
|
|
|
{} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool send(const hrt_abstime t) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
struct debug_array_s debug = {}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_debug_array_sub->update(&_debug_time, &debug)) { |
|
|
|
|
|
|
|
mavlink_debug_float_array_t msg = {}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg.time_usec = debug.timestamp; |
|
|
|
|
|
|
|
msg.array_id = debug.id; |
|
|
|
|
|
|
|
memcpy(msg.name, debug.name, sizeof(msg.name)); |
|
|
|
|
|
|
|
/* enforce null termination */ |
|
|
|
|
|
|
|
msg.name[sizeof(msg.name) - 1] = '\0'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (size_t i = 0; i < debug_array_s::ARRAY_SIZE; i++) { |
|
|
|
|
|
|
|
msg.data[i] = debug.data[i]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mavlink_msg_debug_float_array_send_struct(_mavlink->get_channel(), &msg); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
class MavlinkStreamNavControllerOutput : public MavlinkStream |
|
|
|
class MavlinkStreamNavControllerOutput : public MavlinkStream |
|
|
|
{ |
|
|
|
{ |
|
|
|
public: |
|
|
|
public: |
|
|
@ -4546,6 +4620,7 @@ static const StreamListItem streams_list[] = { |
|
|
|
StreamListItem(&MavlinkStreamNamedValueFloat::new_instance, &MavlinkStreamNamedValueFloat::get_name_static, &MavlinkStreamNamedValueFloat::get_id_static), |
|
|
|
StreamListItem(&MavlinkStreamNamedValueFloat::new_instance, &MavlinkStreamNamedValueFloat::get_name_static, &MavlinkStreamNamedValueFloat::get_id_static), |
|
|
|
StreamListItem(&MavlinkStreamDebug::new_instance, &MavlinkStreamDebug::get_name_static, &MavlinkStreamDebug::get_id_static), |
|
|
|
StreamListItem(&MavlinkStreamDebug::new_instance, &MavlinkStreamDebug::get_name_static, &MavlinkStreamDebug::get_id_static), |
|
|
|
StreamListItem(&MavlinkStreamDebugVect::new_instance, &MavlinkStreamDebugVect::get_name_static, &MavlinkStreamDebugVect::get_id_static), |
|
|
|
StreamListItem(&MavlinkStreamDebugVect::new_instance, &MavlinkStreamDebugVect::get_name_static, &MavlinkStreamDebugVect::get_id_static), |
|
|
|
|
|
|
|
StreamListItem(&MavlinkStreamDebugFloatArray::new_instance, &MavlinkStreamDebugFloatArray::get_name_static, &MavlinkStreamDebugFloatArray::get_id_static), |
|
|
|
StreamListItem(&MavlinkStreamNavControllerOutput::new_instance, &MavlinkStreamNavControllerOutput::get_name_static, &MavlinkStreamNavControllerOutput::get_id_static), |
|
|
|
StreamListItem(&MavlinkStreamNavControllerOutput::new_instance, &MavlinkStreamNavControllerOutput::get_name_static, &MavlinkStreamNavControllerOutput::get_id_static), |
|
|
|
StreamListItem(&MavlinkStreamCameraCapture::new_instance, &MavlinkStreamCameraCapture::get_name_static, &MavlinkStreamCameraCapture::get_id_static), |
|
|
|
StreamListItem(&MavlinkStreamCameraCapture::new_instance, &MavlinkStreamCameraCapture::get_name_static, &MavlinkStreamCameraCapture::get_id_static), |
|
|
|
StreamListItem(&MavlinkStreamCameraTrigger::new_instance, &MavlinkStreamCameraTrigger::get_name_static, &MavlinkStreamCameraTrigger::get_id_static), |
|
|
|
StreamListItem(&MavlinkStreamCameraTrigger::new_instance, &MavlinkStreamCameraTrigger::get_name_static, &MavlinkStreamCameraTrigger::get_id_static), |
|
|
|