阻力灵敏度bug

This commit is contained in:
lishuo 2021-04-29 23:44:47 +08:00
parent b030294bd6
commit aaef57c0b0
6 changed files with 2589 additions and 2595 deletions

View File

@ -653,7 +653,7 @@ Light:
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 1, g: 0.9764706, b: 0.5411765, a: 1}
m_Color: {r: 0.93333334, g: 0.9019608, b: 0.90588236, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30

File diff suppressed because it is too large Load Diff

View File

@ -11,18 +11,10 @@ namespace Assets.Scenes.Ride.Scripts
{
public void TrackResistance(double grade)
{
if (grade > 10)
{
grade = 10;
}
if (grade <-10 )
{
grade = -10;
}
var device = (_device as FitDevice);
if (device != null)
{
Debug.Log(grade);
device.SetTrackResistance(grade);
}
}

View File

@ -175,9 +175,9 @@ namespace Assets.Scenes.Ride.Scripts
void StartRide(BaseEventData baseEvent)
{
var checkAnt = cyclingController.CheckAnt();
#if UNITY_EDITOR
checkAnt = true;
#endif
//#if UNITY_EDITOR
// checkAnt = true;
//#endif
if (!checkAnt)
{
var alert = (GameObject)Instantiate(Resources.Load("UI/Prefab/Ride/Alert"), panel.transform);

View File

@ -32,10 +32,12 @@ namespace Assets.Scenes.Ride.Scripts
cadance = mainController.UpdateCadence();
weight = App.CurrentUser.Weight;
bicycleWeight = App.CurrentUser.BicycleWeight;
#if UNITY_EDITOR
power = 2000;//测试功率
#endif
mainController.TrackResistance(currentSlope * App.rideSetting.sensitivity);
//#if UNITY_EDITOR
//power = 2000;//测试功率
//#endif
Debug.Log(currentSlope.ToString() + "==" + App.rideSetting.sensitivity.ToString());
//mainController.CheckAnt();
mainController.TrackResistance(currentSlope * App.rideSetting.sensitivity/100);
speed = Helper.CalculateSpeed(elevation, currentSlope, power, weight, bicycleWeight);
distance = mainController.UpdateDistance(speed);
totalDistance += distance;

View File

@ -37,7 +37,7 @@ namespace Assets.Scenes.Ride.Scripts
}
private void Save(BaseEventData baseEventData)
{
App.rideSetting.sensitivity = Math.Round(slider.value,0) /100;
App.rideSetting.sensitivity = Math.Round(slider.value,0);
transform.parent.gameObject.SetActive(false);
}
}