Skip to content
Snippets Groups Projects
Commit b7660481 authored by Niccolò Betto's avatar Niccolò Betto
Browse files

[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.
parent 1ccae56c
Branches
Tags
1 merge request!369TwoPointAnalogLoadCell improvements
...@@ -96,7 +96,7 @@ protected: ...@@ -96,7 +96,7 @@ protected:
LoadCellData sampleImpl() override LoadCellData sampleImpl() override
{ {
auto voltage = getVoltage(); auto voltage = getVoltage();
auto mass = -(voltage.voltage * staticScale + staticOffset); auto mass = voltage.voltage * staticScale + staticOffset;
miosix::Lock<miosix::FastMutex> lock{offsetMutex}; miosix::Lock<miosix::FastMutex> lock{offsetMutex};
return {voltage.voltageTimestamp, mass - dynamicOffset}; return {voltage.voltageTimestamp, mass - dynamicOffset};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment