mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
OP-1273 Adaptations to include MS4525DO PixHawk speed sensor
This commit is contained in:
parent
4512798213
commit
f8f53d8801
@ -41,6 +41,7 @@
|
|||||||
#include "hwsettings.h"
|
#include "hwsettings.h"
|
||||||
#include "airspeedsettings.h"
|
#include "airspeedsettings.h"
|
||||||
#include "airspeedsensor.h" // object that will be updated by the module
|
#include "airspeedsensor.h" // object that will be updated by the module
|
||||||
|
#include "baro_airspeed_ms4525do.h"
|
||||||
#include "baro_airspeed_etasv3.h"
|
#include "baro_airspeed_etasv3.h"
|
||||||
#include "baro_airspeed_mpxv.h"
|
#include "baro_airspeed_mpxv.h"
|
||||||
#include "gps_airspeed.h"
|
#include "gps_airspeed.h"
|
||||||
@ -165,6 +166,12 @@ static void airspeedTask(__attribute__((unused)) void *parameters)
|
|||||||
// Eagletree Airspeed v3
|
// Eagletree Airspeed v3
|
||||||
baro_airspeedGetETASV3(&airspeedData, &airspeedSettings);
|
baro_airspeedGetETASV3(&airspeedData, &airspeedSettings);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#if defined(PIOS_INCLUDE_MS4525DO)
|
||||||
|
case AIRSPEEDSETTINGS_AIRSPEEDSENSORTYPE_PIXHAWKAIRSPEEDMS4525DO:
|
||||||
|
// PixHawk Airpeed based on MS4525DO
|
||||||
|
baro_airspeedGetMS4525DO(&airspeedData, &airspeedSettings);
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
case AIRSPEEDSETTINGS_AIRSPEEDSENSORTYPE_GROUNDSPEEDBASEDWINDESTIMATION:
|
case AIRSPEEDSETTINGS_AIRSPEEDSENSORTYPE_GROUNDSPEEDBASEDWINDESTIMATION:
|
||||||
gps_airspeedGet(&airspeedData, &airspeedSettings);
|
gps_airspeedGet(&airspeedData, &airspeedSettings);
|
||||||
|
@ -229,6 +229,12 @@
|
|||||||
#include <pios_etasv3.h>
|
#include <pios_etasv3.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PIOS_INCLUDE_MS4525DO
|
||||||
|
/* PixHawk Airspeed Sensor based on MS4525DO */
|
||||||
|
#include <pios_ms4525do.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef PIOS_INCLUDE_HCSR04
|
#ifdef PIOS_INCLUDE_HCSR04
|
||||||
/* HC-SR04 Ultrasonic Sensor */
|
/* HC-SR04 Ultrasonic Sensor */
|
||||||
#include <pios_hcsr04.h>
|
#include <pios_hcsr04.h>
|
||||||
|
@ -87,6 +87,8 @@
|
|||||||
#define PIOS_INCLUDE_MS5611
|
#define PIOS_INCLUDE_MS5611
|
||||||
#define PIOS_INCLUDE_MPXV
|
#define PIOS_INCLUDE_MPXV
|
||||||
#define PIOS_INCLUDE_ETASV3
|
#define PIOS_INCLUDE_ETASV3
|
||||||
|
#define PIOS_INCLUDE_MS4525DO
|
||||||
|
|
||||||
/* #define PIOS_INCLUDE_HCSR04 */
|
/* #define PIOS_INCLUDE_HCSR04 */
|
||||||
|
|
||||||
/* PIOS receiver drivers */
|
/* PIOS receiver drivers */
|
||||||
|
@ -125,6 +125,7 @@ extern uint32_t pios_i2c_mag_pressure_adapter_id;
|
|||||||
extern uint32_t pios_i2c_flexiport_adapter_id;
|
extern uint32_t pios_i2c_flexiport_adapter_id;
|
||||||
#define PIOS_I2C_FLEXI_ADAPTER (pios_i2c_flexiport_adapter_id)
|
#define PIOS_I2C_FLEXI_ADAPTER (pios_i2c_flexiport_adapter_id)
|
||||||
#define PIOS_I2C_ETASV3_ADAPTER (PIOS_I2C_FLEXI_ADAPTER)
|
#define PIOS_I2C_ETASV3_ADAPTER (PIOS_I2C_FLEXI_ADAPTER)
|
||||||
|
#define PIOS_I2C_MS4525DO_ADAPTER (PIOS_I2C_FLEXI_ADAPTER)
|
||||||
|
|
||||||
// -------------------------
|
// -------------------------
|
||||||
// PIOS_USART
|
// PIOS_USART
|
||||||
|
@ -69,6 +69,7 @@ SRC += $(PIOSCOMMON)/pios_i2c_esc.c
|
|||||||
SRC += $(PIOSCOMMON)/pios_l3gd20.c
|
SRC += $(PIOSCOMMON)/pios_l3gd20.c
|
||||||
SRC += $(PIOSCOMMON)/pios_mpu6000.c
|
SRC += $(PIOSCOMMON)/pios_mpu6000.c
|
||||||
SRC += $(PIOSCOMMON)/pios_mpxv.c
|
SRC += $(PIOSCOMMON)/pios_mpxv.c
|
||||||
|
SRC += $(PIOSCOMMON)/pios_ms4525do.c
|
||||||
SRC += $(PIOSCOMMON)/pios_ms5611.c
|
SRC += $(PIOSCOMMON)/pios_ms5611.c
|
||||||
SRC += $(PIOSCOMMON)/pios_oplinkrcvr.c
|
SRC += $(PIOSCOMMON)/pios_oplinkrcvr.c
|
||||||
SRC += $(PIOSCOMMON)/pios_video.c
|
SRC += $(PIOSCOMMON)/pios_video.c
|
||||||
|
@ -3,7 +3,11 @@
|
|||||||
<description>The raw data from the dynamic pressure sensor with pressure, temperature and airspeed.</description>
|
<description>The raw data from the dynamic pressure sensor with pressure, temperature and airspeed.</description>
|
||||||
<field name="SensorConnected" units="" type="enum" elements="1" options="False,True"/>
|
<field name="SensorConnected" units="" type="enum" elements="1" options="False,True"/>
|
||||||
<field name="SensorValue" units="raw" type="uint16" elements="1"/>
|
<field name="SensorValue" units="raw" type="uint16" elements="1"/>
|
||||||
|
<field name="SensorValueTemperature" units="raw" type="uint16" elements="1"/>
|
||||||
|
<field name="DifferentialPressure" units="Pa" type="float" elements="1"/>
|
||||||
|
<field name="Temperature" units="K" type="float" elements="1"/>
|
||||||
<field name="CalibratedAirspeed" units="m/s" type="float" elements="1"/>
|
<field name="CalibratedAirspeed" units="m/s" type="float" elements="1"/>
|
||||||
|
<field name="TrueAirspeed" units="m/s" type="float" elements="1" defaultvalue="-1"/>
|
||||||
<access gcs="readwrite" flight="readwrite"/>
|
<access gcs="readwrite" flight="readwrite"/>
|
||||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||||
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
|
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<field name="SamplePeriod" units="ms" type="uint8" elements="1" defaultvalue="100"/>
|
<field name="SamplePeriod" units="ms" type="uint8" elements="1" defaultvalue="100"/>
|
||||||
<field name="ZeroPoint" units="raw" type="uint16" elements="1" defaultvalue="0"/>
|
<field name="ZeroPoint" units="raw" type="uint16" elements="1" defaultvalue="0"/>
|
||||||
<field name="Scale" units="raw" type="float" elements="1" defaultvalue="1.0"/>
|
<field name="Scale" units="raw" type="float" elements="1" defaultvalue="1.0"/>
|
||||||
<field name="AirspeedSensorType" units="" type="enum" elements="1" options="EagleTreeAirspeedV3,DIYDronesMPXV5004,DIYDronesMPXV7002,GroundSpeedBasedWindEstimation" defaultvalue="DIYDronesMPXV7002"/>
|
<field name="AirspeedSensorType" units="" type="enum" elements="1" options="PixHawkAirspeedMS4525DO,EagleTreeAirspeedV3,DIYDronesMPXV5004,DIYDronesMPXV7002,GroundSpeedBasedWindEstimation" defaultvalue="DIYDronesMPXV7002"/>
|
||||||
<field name="GroundSpeedBasedEstimationLowPassAlpha" units="" type="float" elements="1" defaultvalue="0.08" />
|
<field name="GroundSpeedBasedEstimationLowPassAlpha" units="" type="float" elements="1" defaultvalue="0.08" />
|
||||||
<access gcs="readwrite" flight="readwrite"/>
|
<access gcs="readwrite" flight="readwrite"/>
|
||||||
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
<telemetrygcs acked="true" updatemode="onchange" period="0"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user