From 96c80d5bb61d08adb9ef23ba7952260bdff135ef Mon Sep 17 00:00:00 2001 From: Roberto Viola Date: Thu, 2 Nov 2023 15:25:23 +0100 Subject: [PATCH] Use user determined power gain values with Stryd and Incline #1765 reverting #1741 --- src/treadmill.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/treadmill.cpp b/src/treadmill.cpp index 397a52444..ab30f8a36 100644 --- a/src/treadmill.cpp +++ b/src/treadmill.cpp @@ -176,17 +176,7 @@ double treadmill::requestedInclination() { return requestInclination; } double treadmill::currentTargetSpeed() { return targetSpeed; } void treadmill::cadenceSensor(uint8_t cadence) { Cadence.setValue(cadence); } -void treadmill::powerSensor(uint16_t power) { - double vwatts = 0; - if(currentInclination().value() != 0) { - QSettings settings; - double w = settings.value(QZSettings::weight, QZSettings::default_weight).toFloat(); - // calc Watts ref. https://alancouzens.com/blog/Run_Power.html - vwatts = ((9.8 * w) * (currentInclination().value() / 100.0)); - qDebug() << QStringLiteral("overrding power read from the sensor of ") << power << QStringLiteral("with ") << vwatts << QStringLiteral(" for the treadmill inclination"); - } - m_watt.setValue(power + vwatts, false); -} +void treadmill::powerSensor(uint16_t power) { m_watt.setValue(power, false); } void treadmill::speedSensor(double speed) { Speed.setValue(speed); } void treadmill::instantaneousStrideLengthSensor(double length) { InstantaneousStrideLengthCM.setValue(length); } void treadmill::groundContactSensor(double groundContact) { GroundContactMS.setValue(groundContact); }