mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
OP-1869 "scale" lower case
This commit is contained in:
parent
11e83bd0e8
commit
8e8d08c4a1
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -38,7 +38,7 @@ typedef struct {
|
||||
uint16_t calibrationCount;
|
||||
uint32_t calibrationSum;
|
||||
uint16_t zeroPoint;
|
||||
float Scale;
|
||||
float scale;
|
||||
float maxSpeed;
|
||||
} PIOS_MPXV_descriptor;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user