Skip to content

Commit

Permalink
Fit : Power phases - limit to 360
Browse files Browse the repository at this point in the history
fix #3030
  • Loading branch information
grauser committed Jun 2, 2019
1 parent 330b5cb commit 27e044f
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/FileIO/FitRideFile.cpp
Expand Up @@ -374,6 +374,7 @@ struct FitFileReaderState
case 2604: return "Garmin Fenix 5x";
case 2691: return "Garmin FR935";
case 2697: return "Garmin Fenix 5";
case 2713: return "Garmin Edge 1030";
case 2886: case 2888: return "Garmin FR645";
case 2900: return "Garmin Fenix 5s +";
case 3110: return "Garmin Fenix 5 +";
Expand Down Expand Up @@ -499,6 +500,14 @@ struct FitFileReaderState
case 2: return "BSX Insight 2";
default: return QString("BSX %1").arg(prod);
}
} else if (manu == 107) {
// Magene
if (prod == -1)
return "Magene";

switch(prod) {
default: return QString("Magene %1").arg(prod);
}
} else if (manu == 115) {
// igpsport
if (prod == -1)
Expand Down Expand Up @@ -1732,18 +1741,46 @@ struct FitFileReaderState
case 69: // ? Left Power Phase ?
leftTopDeathCenter = round(valueList.at(0) * 360.0/256);
leftBottomDeathCenter = round(valueList.at(1) * 360.0/256);

if (leftTopDeathCenter>360) {
leftTopDeathCenter = 0;
}
if (leftBottomDeathCenter>360) {
leftBottomDeathCenter = 0;
}
break;
case 70: // ? Left Peak Phase ?
leftTopPeakPowerPhase = round(valueList.at(0) * 360.0/256);
leftBottomPeakPowerPhase = round(valueList.at(1) * 360.0/256);

if (leftTopPeakPowerPhase>360) {
leftTopPeakPowerPhase = 0;
}
if (leftBottomPeakPowerPhase>360) {
leftBottomPeakPowerPhase = 0;
}
break;
case 71: // ? Right Power Phase ?
rightTopDeathCenter = round(valueList.at(0) * 360.0/256);
rightBottomDeathCenter = round(valueList.at(1) * 360.0/256);

if (rightTopDeathCenter>360) {
rightTopDeathCenter = 0;
}
if (rightBottomDeathCenter>360) {
rightBottomDeathCenter = 0;
}
break;
case 72: // ? Right Peak Phase ?
rightTopPeakPowerPhase = round(valueList.at(0) * 360.0/256);
rightBottomPeakPowerPhase = round(valueList.at(1) * 360.0/256);

if (rightTopPeakPowerPhase>360) {
rightTopPeakPowerPhase = 0;
}
if (rightBottomPeakPowerPhase>360) {
rightBottomPeakPowerPhase = 0;
}
break;
case 83: // VERTICAL_RATIO
native_num = -1;
Expand Down

0 comments on commit 27e044f

Please sign in to comment.