Browse Source

Update airspeed topic to use message generation

sbg
Lorenz Meier 10 years ago
parent
commit
f7c9e918b1
  1. 4
      msg/airspeed.msg
  2. 40
      src/modules/uORB/topics/airspeed.h

4
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

40
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 * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
@ -31,31 +31,37 @@
* *
****************************************************************************/ ****************************************************************************/
/** /* Auto-generated by genmsg_cpp from file /Users/lorenzmeier/src/Firmware/msg/airspeed.msg */
* @file airspeed.h
*
* Definition of airspeed topic
*/
#ifndef TOPIC_AIRSPEED_H_ #pragma once
#define TOPIC_AIRSPEED_H_
#include <platforms/px4_defines.h>
#include <stdint.h> #include <stdint.h>
#include <uORB/uORB.h>
#ifndef __cplusplus
#endif
/** /**
* @addtogroup topics * @addtogroup topics
* @{ * @{
*/ */
/**
* Airspeed #ifdef __cplusplus
*/ struct __EXPORT airspeed_s {
#else
struct airspeed_s { struct airspeed_s {
uint64_t timestamp; /**< microseconds since system boot, needed to integrate */ #endif
float indicated_airspeed_m_s; /**< indicated airspeed in meters per second, -1 if unknown */ uint64_t timestamp;
float true_airspeed_m_s; /**< true airspeed in meters per second, -1 if unknown */ float indicated_airspeed_m_s;
float air_temperature_celsius; /**< air temperature in degrees celsius, -1000 if unknown */ 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 */ /* register this as object request broker structure */
ORB_DECLARE(airspeed); ORB_DECLARE(airspeed);
#endif

Loading…
Cancel
Save