From a4ce53ab86c85414bc443f170b477bbb34f681b8 Mon Sep 17 00:00:00 2001
From: "luca.conterio" <luca.conterio@skywarder.eu>
Date: Fri, 17 Sep 2021 21:38:15 +0200
Subject: [PATCH] [Sensors] More samples used to calibrate differential
 barometer

---
 src/boards/DeathStack/Main/Sensors.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/boards/DeathStack/Main/Sensors.cpp b/src/boards/DeathStack/Main/Sensors.cpp
index fae04a18..7f40dc58 100644
--- a/src/boards/DeathStack/Main/Sensors.cpp
+++ b/src/boards/DeathStack/Main/Sensors.cpp
@@ -212,7 +212,8 @@ void Sensors::pressPitotInit()
 {
     function<ADCData()> voltage_fun(
         bind(&ADS1118::getVoltage, adc_ads1118, ADC_CH_PITOT_PORT));
-    press_pitot = new SSCDRRN015PDA(voltage_fun, REFERENCE_VOLTAGE);
+    press_pitot = new SSCDRRN015PDA(voltage_fun, REFERENCE_VOLTAGE,
+                                    PRESS_PITOT_CALIB_SAMPLES_NUM);
 
     SensorInfo info("PitotBarometer", SAMPLE_PERIOD_PRESS_PITOT,
                     bind(&Sensors::pressPitotCallback, this), false, true);
-- 
GitLab