From 0fec44f90877989d711830b7107f463f0d5fc67d Mon Sep 17 00:00:00 2001 From: tangzhaobao Date: Thu, 26 Aug 2021 16:56:51 +0800 Subject: [PATCH] Modify code Signed-off-by: tangzhaobao --- model/sensor/driver/chipset/barometer/barometer_bmp180.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/model/sensor/driver/chipset/barometer/barometer_bmp180.c b/model/sensor/driver/chipset/barometer/barometer_bmp180.c index d39ba1de4..4001a49ef 100644 --- a/model/sensor/driver/chipset/barometer/barometer_bmp180.c +++ b/model/sensor/driver/chipset/barometer/barometer_bmp180.c @@ -234,7 +234,9 @@ static int32_t CalcBarometerData(struct BarometerRawData *barometerData, int32_ coefficientData.x1 = (coefficientData.x1 * BMP180_CONSTANT_10) >> BMP180_CONSTANT_9; coefficientData.x2 = (BMP180_CONSTANT_0 * coefficientData.p) >> BMP180_CONSTANT_9; tnp[BAROMETER_BAROMETER] = coefficientData.p + ((coefficientData.x1 + coefficientData.x2 - + BMP180_CONSTANT_11) >> BMP180_CONSTANT_3); + + BMP180_CONSTANT_11) >> BMP180_CONSTANT_3); + + return 0; } int32_t ReadBmp180Data(struct SensorCfgData *data) -- Gitee