微调
This commit is contained in:
parent
da4fed58b0
commit
b8a5982bc5
@ -103,7 +103,7 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
MapUDPService.Send(route.RouteInstance.Id, recorderData.BelongUserId,
|
||||
new double[] { lastData._Lat, lastData._Lon },
|
||||
recorderData.IsCompleted, false, recorderData.EndDistance,
|
||||
true, 1, lastData._Speed, false, preDistance, weightKg, competitionId: recorderData.Competitionid, recorderData.Saved, lastData._HeartRate, lastData._Power, lastData._Cadence, lastData.Ticks);
|
||||
true, 1, lastData._Speed, false, preDistance, weightKg, competitionId: recorderData.Competitionid, recorderData.Saved, 0, lastData._Power, lastData._Cadence, lastData.Ticks);
|
||||
}
|
||||
else if (recorderData.EndDistance > 0)//没有骑,但是有初始位置的情况
|
||||
{
|
||||
|
||||
@ -330,7 +330,7 @@ namespace Assets.Scenes.Ride.Scripts.Model
|
||||
public double Speed { get; set; }
|
||||
|
||||
public double Power { get; set; }
|
||||
public double? Heart { get; set; }
|
||||
public double? HeartRate { get; set; }
|
||||
public double? Cadence { get; set; }
|
||||
public int TotalTicks { get; set; }
|
||||
|
||||
|
||||
@ -208,7 +208,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
Speed = speed,
|
||||
|
||||
Power = power,
|
||||
Heart = heartRate,
|
||||
HeartRate = heartRate,
|
||||
Cadence = cadence,
|
||||
TotalTicks = totalTicks,
|
||||
|
||||
|
||||
@ -196,12 +196,11 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
}
|
||||
}
|
||||
if (totalDistance >= mapData.TotalDistance && !stopRecord)
|
||||
if (totalDistance > mapData.TotalDistance)
|
||||
{
|
||||
distance = totalDistance - mapData.TotalDistance;
|
||||
totalDistance = mapData.TotalDistance;
|
||||
stopRecord = true;
|
||||
mainController.cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
|
||||
StartCoroutine("LateUpload");
|
||||
}
|
||||
|
||||
|
||||
@ -650,7 +650,6 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
//}
|
||||
isStart = false;
|
||||
isQuit = true;
|
||||
cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -677,7 +676,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
|
||||
public void Save(double totalDistance)
|
||||
{
|
||||
//cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
|
||||
cyclingController.recorderData.EndTime = UIManager.Now.GetDateTime();
|
||||
isQuit = true;
|
||||
isStart = false;
|
||||
string recordId = Guid.NewGuid().ToString();
|
||||
@ -688,7 +687,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
string imageFileName = path +"/"+ Guid.NewGuid().ToString() + ".png";
|
||||
CaptureCamera(Camera.main, new Rect(Screen.width * 0f, Screen.height * 0f, Screen.width * 0.5f, Screen.height * 0.5f), imageFileName);
|
||||
cyclingController.recorderData.StartTime = startTime;
|
||||
cyclingController.recorderData.IsCompleted = totalDistance == mapData.TotalDistance;
|
||||
cyclingController.recorderData.IsCompleted = totalDistance >= mapData.TotalDistance;
|
||||
cyclingController.recorderData.EndDistance = totalDistance;
|
||||
cyclingController.recorderData.AntModelId = AntModelId;
|
||||
cyclingController.recorderData.ManufacturerId = ManufacturerId;
|
||||
|
||||
@ -56,7 +56,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
weight = App.CurrentUser.Weight;
|
||||
bicycleWeight = App.CurrentUser.BicycleWeight;
|
||||
#if UNITY_EDITOR
|
||||
power = 2000;
|
||||
power = 50;
|
||||
#endif
|
||||
mainController.TrackResistance(currentSlope * App.RideSetting.Sensitivity / 100);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user