aboutsummaryrefslogtreecommitdiff
path: root/src/modules/mavlink/mavlink_main.h
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2014-06-30 12:31:06 +0200
committerAnton Babushkin <anton.babushkin@me.com>2014-06-30 12:31:06 +0200
commit1a6b2b9c1ebd127a662051393d266e2815d09524 (patch)
treece18d2597a2e61d56247360b20ee8e05942fade3 /src/modules/mavlink/mavlink_main.h
parent72071cdcd39cae6be8533e67d01cbc7533ca6cb1 (diff)
parent857b843d445f59f2dc393e4d5f879fc56f77a0e0 (diff)
downloadpx4-firmware-1a6b2b9c1ebd127a662051393d266e2815d09524.tar.gz
px4-firmware-1a6b2b9c1ebd127a662051393d266e2815d09524.tar.bz2
px4-firmware-1a6b2b9c1ebd127a662051393d266e2815d09524.zip
Merge branch 'master' into dataman_state_nav_rewrite
Diffstat (limited to 'src/modules/mavlink/mavlink_main.h')
-rw-r--r--src/modules/mavlink/mavlink_main.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/modules/mavlink/mavlink_main.h b/src/modules/mavlink/mavlink_main.h
index 91d79057c..b4184b21c 100644
--- a/src/modules/mavlink/mavlink_main.h
+++ b/src/modules/mavlink/mavlink_main.h
@@ -83,9 +83,9 @@ public:
/**
* Display the mavlink status.
*/
- void status();
+ void display_status();
- static int stream(int argc, char *argv[]);
+ static int stream_command(int argc, char *argv[]);
static int instance_count();
@@ -174,12 +174,15 @@ public:
const mavlink_channel_t get_channel();
+ void configure_stream_threadsafe(const char *stream_name, const float rate);
+
bool _task_should_exit; /**< if true, mavlink task should exit */
int get_mavlink_fd() { return _mavlink_fd; }
int send_statustext(const char *string);
int send_statustext(enum MAV_SEVERITY severity, const char *string);
+ MavlinkStream * get_streams() { return _streams; } const
float get_rate_mult();
@@ -195,6 +198,11 @@ public:
void lockMessageBufferMutex(void) { pthread_mutex_lock(&_message_buffer_mutex); }
void unlockMessageBufferMutex(void) { pthread_mutex_unlock(&_message_buffer_mutex); }
+ /**
+ * Count a transmision error
+ */
+ void count_txerr();
+
protected:
Mavlink *next;
@@ -263,6 +271,7 @@ private:
pthread_mutex_t _message_buffer_mutex;
perf_counter_t _loop_perf; /**< loop performance counter */
+ perf_counter_t _txerr_perf; /**< TX error counter */
bool _param_initialized;
param_t _param_system_id;
@@ -320,7 +329,6 @@ private:
int mavlink_open_uart(int baudrate, const char *uart_name, struct termios *uart_config_original, bool *is_usb);
int configure_stream(const char *stream_name, const float rate);
- void configure_stream_threadsafe(const char *stream_name, const float rate);
int message_buffer_init(int size);