From 65921c3cf130a9ff2da3ed49d470ecc3ad4bc7b6 Mon Sep 17 00:00:00 2001
From: EmilioCorigliano <emilio.corigliano@mail.polimi.it>
Date: Thu, 20 Apr 2023 01:10:04 +0200
Subject: [PATCH] [InternalADC] Suppressed cppcheck warning

---
 src/shared/drivers/adc/InternalADC.cpp | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/shared/drivers/adc/InternalADC.cpp b/src/shared/drivers/adc/InternalADC.cpp
index d97632d06..91909daed 100644
--- a/src/shared/drivers/adc/InternalADC.cpp
+++ b/src/shared/drivers/adc/InternalADC.cpp
@@ -196,7 +196,9 @@ void InternalADC::disableVbat()
 InternalADCData InternalADC::getVoltage(Channel channel)
 {
     return {timestamp, channel,
-            channelsRawValues[channel] * V_DDA_VOLTAGE / ADC_RESOLUTION};
+            channelsRawValues[channel] *
+                V_DDA_VOLTAGE /  // cppcheck-suppress ConfigurationNotChecked
+                ADC_RESOLUTION};
 }
 
 TemperatureData InternalADC::getTemperature()
@@ -206,7 +208,10 @@ TemperatureData InternalADC::getTemperature()
 
     if (temperatureRawValue != 0)
     {
-        data.temperature = temperatureRawValue * V_DDA_VOLTAGE / ADC_RESOLUTION;
+        data.temperature =
+            temperatureRawValue *
+            V_DDA_VOLTAGE /  // cppcheck-suppress ConfigurationNotChecked
+            ADC_RESOLUTION;
 
 #ifdef WITHOUT_CALIBRATION
         // Default conversion
@@ -229,7 +234,9 @@ TemperatureData InternalADC::getTemperature()
 InternalADCData InternalADC::getVbatVoltage()
 {
     return {timestamp, VBAT_CH,
-            vbatVoltageRawValue * V_DDA_VOLTAGE / ADC_RESOLUTION * VBAT_DIV};
+            vbatVoltageRawValue *
+                V_DDA_VOLTAGE /  // cppcheck-suppress ConfigurationNotChecked
+                ADC_RESOLUTION * VBAT_DIV};
 }
 
 inline void InternalADC::resetRegisters()
-- 
GitLab