Update LeftRightBalance.cpp

Add additional checks in order to differentiate between cycling and running
This commit is contained in:
jgpallero
2019-05-14 12:17:10 +02:00
committed by GitHub
parent 04d4403844
commit 439a7f6e12

View File

@@ -60,7 +60,7 @@ class LeftRightBalance : public RideMetric {
RideFileIterator it(item->ride(), spec);
while (it.hasNext()) {
struct RideFilePoint *point = it.next();
if (point->watts > 0.0f && (point->cad || point->rcad) && point->lrbalance > 0.0f && point->lrbalance < 100.0f) {
if ((point->watts > 0.0f && point->cad) || (point->rcontact && point->rcad) && point->lrbalance > 0.0f && point->lrbalance < 100.0f) {
total += point->lrbalance;
++count;
}