From 8e8d08c4a1979534298b825f950a4aab8576eb88 Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Wed, 13 May 2015 21:55:18 +0200 Subject: [PATCH] OP-1869 "scale" lower case --- flight/modules/Airspeed/baro_airspeed_mpxv.c | 2 +- flight/pios/common/pios_mpxv.c | 2 +- flight/pios/inc/pios_mpxv.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flight/modules/Airspeed/baro_airspeed_mpxv.c b/flight/modules/Airspeed/baro_airspeed_mpxv.c index 2869a5d12..5c7ead777 100644 --- a/flight/modules/Airspeed/baro_airspeed_mpxv.c +++ b/flight/modules/Airspeed/baro_airspeed_mpxv.c @@ -104,7 +104,7 @@ void baro_airspeedGetMPXV(AirspeedSensorData *airspeedSensor, AirspeedSettingsDa } } sensor.zeroPoint = airspeedSettings->ZeroPoint; - sensor.Scale = airspeedSettings->Scale; + sensor.scale = airspeedSettings->Scale; // Filter CAS : airspeedSettings->SamplePeriod value is 0 - 255 range float alpha = 1 - (airspeedSettings->SamplePeriod / ANALOG_BARO_AIRSPEED_TIME_CONSTANT_MS); // Low pass filter. diff --git a/flight/pios/common/pios_mpxv.c b/flight/pios/common/pios_mpxv.c index 9c9c88aa1..dc08d6ed2 100644 --- a/flight/pios/common/pios_mpxv.c +++ b/flight/pios/common/pios_mpxv.c @@ -69,7 +69,7 @@ uint16_t PIOS_MPXV_Calibrate(PIOS_MPXV_descriptor *desc, uint16_t measurement) float PIOS_MPXV_CalcAirspeed(PIOS_MPXV_descriptor *desc, uint16_t measurement) { // Calculate dynamic pressure, as per docs - Apply scale factor (voltage divider) - float Qc = 3.3f / 4096.0f * (float)((measurement - desc->zeroPoint) * desc->Scale); + float Qc = 3.3f / 4096.0f * (float)((measurement - desc->zeroPoint) * desc->scale); // Saturate Qc on the lower bound, in order to make sure we don't have negative airspeeds. No need // to saturate on the upper bound, we'll handle that later with calibratedAirspeed. diff --git a/flight/pios/inc/pios_mpxv.h b/flight/pios/inc/pios_mpxv.h index f68b1f386..842e66335 100644 --- a/flight/pios/inc/pios_mpxv.h +++ b/flight/pios/inc/pios_mpxv.h @@ -38,7 +38,7 @@ typedef struct { uint16_t calibrationCount; uint32_t calibrationSum; uint16_t zeroPoint; - float Scale; + float scale; float maxSpeed; } PIOS_MPXV_descriptor;