From 68155565e3f8d06ef23fb1744603ff2b5b9d0ee3 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Wed, 14 Aug 2019 14:01:48 -0700 Subject: [PATCH] Use coarser weight values and don't start them at 0 --- .../Core/Core/HW/WiimoteEmu/Extension/BalanceBoard.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Source/Core/Core/HW/WiimoteEmu/Extension/BalanceBoard.h b/Source/Core/Core/HW/WiimoteEmu/Extension/BalanceBoard.h index 664692c90e..69935f1a75 100644 --- a/Source/Core/Core/HW/WiimoteEmu/Extension/BalanceBoard.h +++ b/Source/Core/Core/HW/WiimoteEmu/Extension/BalanceBoard.h @@ -53,11 +53,13 @@ public: void LoadDefaults(const ControllerInterface& ciface) override; // Use the same calibration data for all sensors. - // Wii Fit appears to convert to this internally (so it doesn't care about differences smaller - // than a gram). Normal balance boards tend to be less precise, usually around 10 grams. - static constexpr u16 WEIGHT_0_KG = 0; - static constexpr u16 WEIGHT_17_KG = 17000; - static constexpr u16 WEIGHT_34_KG = 34000; + // Wii Fit internally converts to grams, but using grams for the actual values leads to + // overflowing values, and also underflowing values when a sensor gets negative if balance is + // extremely tilted. Actual balance boards tend to have a sensitivity of about 10 grams. + static constexpr u16 WEIGHT_0_KG = 10000; + static constexpr u16 WEIGHT_17_KG = 11700; + static constexpr u16 WEIGHT_34_KG = 13400; + // Chosen arbitrarily from the value for pokechu22's board. As long as the calibration and // actual temperatures match, the value here doesn't matter. static constexpr u8 TEMPERATURE = 0x19;