From a74e2fb68befa265513e632be2c2a9b6858ba4f5 Mon Sep 17 00:00:00 2001
From: Alberto Nidasio <alberto.nidasio@skywarder.eu>
Date: Sat, 1 Jul 2023 17:14:15 +0200
Subject: [PATCH] [ADS131] Removed reset from init function

This would cause a configuration reset when starting the sensormanager!
---
 src/shared/sensors/ADS131M04/ADS131M04.cpp | 12 +-----------
 src/shared/sensors/ADS131M08/ADS131M08.cpp | 12 +-----------
 2 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/src/shared/sensors/ADS131M04/ADS131M04.cpp b/src/shared/sensors/ADS131M04/ADS131M04.cpp
index ab9cebda4..e8619ac47 100644
--- a/src/shared/sensors/ADS131M04/ADS131M04.cpp
+++ b/src/shared/sensors/ADS131M04/ADS131M04.cpp
@@ -54,17 +54,7 @@ void ADS131M04::setOversamplingRatio(OversamplingRatio ratio)
                    REG_CLOCK_OSR);
 }
 
-bool ADS131M04::init()
-{
-    if (!reset())
-    {
-        lastError = SensorErrors::INIT_FAIL;
-        LOG_ERR(logger, "Initialization failed");
-        return false;
-    }
-
-    return true;
-}
+bool ADS131M04::init() { return true; }
 
 bool ADS131M04::reset()
 {
diff --git a/src/shared/sensors/ADS131M08/ADS131M08.cpp b/src/shared/sensors/ADS131M08/ADS131M08.cpp
index 4b926068b..667ccd244 100644
--- a/src/shared/sensors/ADS131M08/ADS131M08.cpp
+++ b/src/shared/sensors/ADS131M08/ADS131M08.cpp
@@ -54,17 +54,7 @@ void ADS131M08::setOversamplingRatio(OversamplingRatio ratio)
                    REG_CLOCK_OSR);
 }
 
-bool ADS131M08::init()
-{
-    if (!reset())
-    {
-        lastError = SensorErrors::INIT_FAIL;
-        LOG_ERR(logger, "Initialization failed");
-        return false;
-    }
-
-    return true;
-}
+bool ADS131M08::init() { return true; }
 
 bool ADS131M08::reset()
 {
-- 
GitLab