|
@@ -7,6 +7,8 @@ namespace Display
|
|
{
|
|
{
|
|
public class BikeDataDisplay : MonoBehaviour
|
|
public class BikeDataDisplay : MonoBehaviour
|
|
{
|
|
{
|
|
|
|
+ public bool usePolarForHeartRate = true;
|
|
|
|
+
|
|
public TextMeshProUGUI cadenceDisplay;
|
|
public TextMeshProUGUI cadenceDisplay;
|
|
public TextMeshProUGUI heartRateDisplay;
|
|
public TextMeshProUGUI heartRateDisplay;
|
|
|
|
|
|
@@ -53,7 +55,9 @@ namespace Display
|
|
|
|
|
|
if (torqueDisplayAvailable) torqueDisplay.text = $"{sensorData.PowermeterData?.CrankTorque ?? 0f:F2} Nm";
|
|
if (torqueDisplayAvailable) torqueDisplay.text = $"{sensorData.PowermeterData?.CrankTorque ?? 0f:F2} Nm";
|
|
|
|
|
|
- if (heartRateDisplayAvailable) heartRateDisplay.text = $"{sensorData.HrData?.HeartRate ?? 0:0} bpm";
|
|
|
|
|
|
+ if (heartRateDisplayAvailable)
|
|
|
|
+ heartRateDisplay.text =
|
|
|
|
+ $"{(usePolarForHeartRate ? sensorData.PolarData?.Hr : sensorData.HrData?.HeartRate) ?? 0:0} bpm";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|