From f7c9e918b1fb933dd431076b53444c1d004099d9 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 25 May 2015 18:13:38 +0200 Subject: [PATCH] Update airspeed topic to use message generation --- msg/airspeed.msg | 4 +++ src/modules/uORB/topics/airspeed.h | 40 ++++++++++++++++-------------- 2 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 msg/airspeed.msg diff --git a/msg/airspeed.msg b/msg/airspeed.msg new file mode 100644 index 0000000000..8d6af2138d --- /dev/null +++ b/msg/airspeed.msg @@ -0,0 +1,4 @@ +uint64 timestamp # microseconds since system boot, needed to integrate +float32 indicated_airspeed_m_s # indicated airspeed in meters per second, -1 if unknown +float32 true_airspeed_m_s # true airspeed in meters per second, -1 if unknown +float32 air_temperature_celsius # air temperature in degrees celsius, -1000 if unknown diff --git a/src/modules/uORB/topics/airspeed.h b/src/modules/uORB/topics/airspeed.h index 676c37c778..df4b315146 100644 --- a/src/modules/uORB/topics/airspeed.h +++ b/src/modules/uORB/topics/airspeed.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (C) 2012-2013 PX4 Development Team. All rights reserved. + * Copyright (C) 2013-2015 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,31 +31,37 @@ * ****************************************************************************/ -/** - * @file airspeed.h - * - * Definition of airspeed topic - */ +/* Auto-generated by genmsg_cpp from file /Users/lorenzmeier/src/Firmware/msg/airspeed.msg */ + -#ifndef TOPIC_AIRSPEED_H_ -#define TOPIC_AIRSPEED_H_ +#pragma once -#include #include +#include + + +#ifndef __cplusplus + +#endif /** * @addtogroup topics * @{ */ -/** - * Airspeed - */ + +#ifdef __cplusplus +struct __EXPORT airspeed_s { +#else struct airspeed_s { - uint64_t timestamp; /**< microseconds since system boot, needed to integrate */ - float indicated_airspeed_m_s; /**< indicated airspeed in meters per second, -1 if unknown */ - float true_airspeed_m_s; /**< true airspeed in meters per second, -1 if unknown */ - float air_temperature_celsius; /**< air temperature in degrees celsius, -1000 if unknown */ +#endif + uint64_t timestamp; + float indicated_airspeed_m_s; + float true_airspeed_m_s; + float air_temperature_celsius; +#ifdef __cplusplus + +#endif }; /** @@ -64,5 +70,3 @@ struct airspeed_s { /* register this as object request broker structure */ ORB_DECLARE(airspeed); - -#endif