From b766048156a4091a65f51b8f33a1058b96d233fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niccol=C3=B2=20Betto?= <niccolo.betto@skywarder.eu>
Date: Thu, 29 May 2025 16:03:00 +0200
Subject: [PATCH] [TwoPointAnalogLoadCell] Remove negative sign from mass
 sample

All loadcells samples through this class returned an inverted mass measure, but the negative sign was there for no particular reason.
---
 src/shared/sensors/analog/TwoPointAnalogLoadCell.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/sensors/analog/TwoPointAnalogLoadCell.h b/src/shared/sensors/analog/TwoPointAnalogLoadCell.h
index 0a2051d61..12bd198a0 100644
--- a/src/shared/sensors/analog/TwoPointAnalogLoadCell.h
+++ b/src/shared/sensors/analog/TwoPointAnalogLoadCell.h
@@ -96,7 +96,7 @@ protected:
     LoadCellData sampleImpl() override
     {
         auto voltage = getVoltage();
-        auto mass    = -(voltage.voltage * staticScale + staticOffset);
+        auto mass    = voltage.voltage * staticScale + staticOffset;
 
         miosix::Lock<miosix::FastMutex> lock{offsetMutex};
         return {voltage.voltageTimestamp, mass - dynamicOffset};
-- 
GitLab