Skip to content
Snippets Groups Projects
Commit ed561fc7 authored by Federico Lolli's avatar Federico Lolli
Browse files

[Main-ADAController] now uses the pressure sample from SFD

parent 01bed745
No related branches found
No related tags found
No related merge requests found
...@@ -64,7 +64,7 @@ void ADAController::update() ...@@ -64,7 +64,7 @@ void ADAController::update()
{ {
ModuleManager& modules = ModuleManager::getInstance(); ModuleManager& modules = ModuleManager::getInstance();
PressureData barometerData = PressureData barometerData =
modules.get<Sensors>()->getStaticPressure1LastSample(); modules.get<Sensors>()->getSFDPressureLastSample();
// Get a snapshot of the situation. There is no need to synchronize because // Get a snapshot of the situation. There is no need to synchronize because
// the getter are already thread safe with a PauseKernel // the getter are already thread safe with a PauseKernel
...@@ -143,8 +143,7 @@ void ADAController::calibrate() ...@@ -143,8 +143,7 @@ void ADAController::calibrate()
for (int i = 0; i < ADAConfig::CALIBRATION_SAMPLES_COUNT; i++) for (int i = 0; i < ADAConfig::CALIBRATION_SAMPLES_COUNT; i++)
{ {
PressureData data = PressureData data = modules.get<Sensors>()->getSFDPressureLastSample();
modules.get<Sensors>()->getStaticPressure1LastSample();
pressure.add(data.pressure); pressure.add(data.pressure);
miosix::Thread::sleep(ADAConfig::CALIBRATION_SLEEP_TIME); miosix::Thread::sleep(ADAConfig::CALIBRATION_SLEEP_TIME);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment