diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-05-13 16:04:02 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-05-16 14:00:58 +0200 |
commit | fbb3adde06e5ecf88a4c39e332a539fa12d173b3 (patch) | |
tree | 4871f0791f891ec2d9a5385579af61fe1fd1bec2 /src/modules/mavlink/mavlink_messages.h | |
parent | a72015c260dbb4e70d23c35120269cef61a439cc (diff) | |
download | px4-firmware-fbb3adde06e5ecf88a4c39e332a539fa12d173b3.tar.gz px4-firmware-fbb3adde06e5ecf88a4c39e332a539fa12d173b3.tar.bz2 px4-firmware-fbb3adde06e5ecf88a4c39e332a539fa12d173b3.zip |
mavlink app: Clean up allocations
Diffstat (limited to 'src/modules/mavlink/mavlink_messages.h')
-rw-r--r-- | src/modules/mavlink/mavlink_messages.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/modules/mavlink/mavlink_messages.h b/src/modules/mavlink/mavlink_messages.h index b8823263a..ee64d0e42 100644 --- a/src/modules/mavlink/mavlink_messages.h +++ b/src/modules/mavlink/mavlink_messages.h @@ -43,6 +43,19 @@ #include "mavlink_stream.h" -extern MavlinkStream *streams_list[]; +class StreamListItem { + +public: + MavlinkStream* (*new_instance)(); + const char* (*get_name)(); + + StreamListItem(MavlinkStream* (*inst)(), const char* (*name)()) : + new_instance(inst), + get_name(name) {}; + + ~StreamListItem() {}; +}; + +extern StreamListItem *streams_list[]; #endif /* MAVLINK_MESSAGES_H_ */ |