diff options
author | Simon Wilks <sjwilks@gmail.com> | 2013-07-07 01:10:47 +0200 |
---|---|---|
committer | Simon Wilks <sjwilks@gmail.com> | 2013-07-07 01:10:47 +0200 |
commit | 01255a4cec9683d05263ea4509bd324b7b814156 (patch) | |
tree | 584da776c5039d5494e7885f6faf2a756e4663ba | |
parent | 85b5da8078873a13a5fc0fd4ee3fe0a02917e87c (diff) | |
download | px4-firmware-01255a4cec9683d05263ea4509bd324b7b814156.tar.gz px4-firmware-01255a4cec9683d05263ea4509bd324b7b814156.tar.bz2 px4-firmware-01255a4cec9683d05263ea4509bd324b7b814156.zip |
Remove the <15kmh cuttoff and report kmh via HoTT.
-rw-r--r-- | src/drivers/ets_airspeed/ets_airspeed.cpp | 5 | ||||
-rw-r--r-- | src/drivers/hott_telemetry/messages.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/drivers/ets_airspeed/ets_airspeed.cpp b/src/drivers/ets_airspeed/ets_airspeed.cpp index c39da98d7..b34d3fa5d 100644 --- a/src/drivers/ets_airspeed/ets_airspeed.cpp +++ b/src/drivers/ets_airspeed/ets_airspeed.cpp @@ -84,8 +84,9 @@ /** * The Eagle Tree Airspeed V3 cannot provide accurate reading below speeds of 15km/h. + * You can set this value to 12 if you want a zero reading below 15km/h. */ -#define MIN_ACCURATE_DIFF_PRES_PA 12 +#define MIN_ACCURATE_DIFF_PRES_PA 0 /* Measurement rate is 100Hz */ #define CONVERSION_INTERVAL (1000000 / 100) /* microseconds */ @@ -463,8 +464,8 @@ ETSAirspeed::collect() uint16_t diff_pres_pa = val[1] << 8 | val[0]; + // XXX move the parameter read out of the driver. param_get(param_find("SENS_DPRES_OFF"), &_diff_pres_offset); - if (diff_pres_pa < _diff_pres_offset + MIN_ACCURATE_DIFF_PRES_PA) { diff_pres_pa = 0; diff --git a/src/drivers/hott_telemetry/messages.c b/src/drivers/hott_telemetry/messages.c index d2634ef41..0ce56acef 100644 --- a/src/drivers/hott_telemetry/messages.c +++ b/src/drivers/hott_telemetry/messages.c @@ -108,7 +108,7 @@ build_eam_response(uint8_t *buffer, size_t *size) memset(&airspeed, 0, sizeof(airspeed)); orb_copy(ORB_ID(airspeed), airspeed_sub, &airspeed); - uint16_t speed = (uint16_t)(airspeed.indicated_airspeed_m_s); + uint16_t speed = (uint16_t)(airspeed.indicated_airspeed_m_s * 3.6f); msg.speed_L = (uint8_t)speed & 0xff; msg.speed_H = (uint8_t)(speed >> 8) & 0xff; |